Self-install/Self-setup PHP Installation

Recently, I decided to give IIS another try in preparation for learning the WCF Framework. I also decided to try PHP as well with IIS (7.5 in this case).

Unfortunately, I ran into some issues with installation as I tried to install PHP 5.4 along with IIS. The actual installation and use of PHP worked, however, I couldn’t figure out why PHP was looking in “C:WINDOWS” for my php.ini, rather than the actual directory where I (then) extracted PHP to. I noticed later, when I downgraded to 5.3 since it had an installer available, rather than just a .zip download.

If you are setting up PHP with IIS, manually or via installer, you need to log the HTTPd’s account out of Windows and back in again. The issue mentioned above is PHP is looking for “php.ini” in “C:WINDOWS” which is undesirable. The PHP 5.3 installer edits your Windows PATH environment variable to include “C:PHP” (or wherever you installed PHP). Windows doesn’t associate this change until you logout and log back in again.

If you happen to install it manually, edit your path variable to include your PHP directory. See the screenshot for other details that would be useful.

This was done on Windows 7 Professional, 64-bit.

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax