Friday
Oct232009
How to install PHP on Windows XP (IIS)
Friday, October 23, 2009 at 10:38PM For some reason the "automated" installer that PHP.Net has listed on their site has never worked for me. So here’s a set of instructions that should help people that have to install PHP manually on IIS.
This article assumes you already have a working copy of IIS.
- Download the latest release from PHP.Net, the Windows package.
- Extract the files from the zip file to c:\php\
- Copy the php5ts.dll file to your web server folder (c:\inetpub\wwwroot) and your windows system directory (c:\windows\system32)
- Rename php.ini-dist to php.ini and copy the file to windows folder (c:\windows), this file is contained in the main php folder (c:\php)
- Edit the php.ini file and change the doc_root so that it points to your web server folder
(doc_root ="c:\inetpub\wwwroot\")
You will also need to change the CGI Force Redirct to 0
(cgi.force_redirect = 0) - Time to setup some Environment Variables.
- Right-click on My Computer and choose Properties.
- Go to Advanced Tab and click the Environment Variables button.
- In system variables find the variable PATH.
- There, go to the end of the line and add an ";c:\php".
- Now click OK to exit these menus. This will require a restart, but we can do that later.
- Time to setup IIS.
- Right click on Default Server and choose Properties.
- Go to Home directory, set Execute Permissions to Scripts Only and click Configuration.
- Click Add, choose Executable c:\php\php5isapi.dll and set Extension to .php.
- After that, go to Isapi Filters, click Add and set Filter Name to PHP and Executable to c:\php\php5isapi.dll.
- Click Apply and then OK.
- ALL DONE... Now you will need to restart your computer, if you didn't back on step 6.5. If you already restarted, then you will need to restart IIS after applying the changes from step 7.
Lets Test it our to make sure everything is running properly. Start by creating a new file in the root of your web server folder (c:\inetpub\wwwroot) called phpinfo.php. Inside this file you will need to place the following code:
<?php
echo phpinfo();
?>
Now browse to http://localhost/phpinfo.php and you should see the details about your PHP Installation.
Reader Comments