Visit Mac-connect: PHP installation on Windows XP July 30, 2010 Installing PHP on a Windows XP computer
intel mac

Installing Apache, MySQL and PHP on Windows XP

Step 3 - Installing PHP

Installing PHP on Windows XP from the downloaded PHP zip file is just a matter of extracting the zip file to a directory and altering the Apache configuration file to use the PHP interpreter for PHP scripts.

Instructions:

Right click on the PHP zip archive (retrieved in step 1 of this guide) and click "Extract All..." and then "Next".
Change C:\Downloads\php-4.3.3-Win32 to C:\ and click "Next", followed by "Finish".
There should now exist a folder C:\php-4.3.3-Win32 .
Rename the this folder from C:\php-4.3.3-Win32 to C:\php.

Open the httpd.conf (C:\Program Files\Apache Group\Apache\conf\httpd.conf) file and find the line:

<IfModule mod_alias.c>

Immediately under this line insert the following lines:
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php .phtml
Action application/x-httpd-php "/php/php.exe"

Save the file as httpd.conf.


To test that PHP and Apache now work together, create a plain text file and insert the following:
<?php phpinfo(); ?>


Save this file as test.php in the C:\Program Files\Apache Group\Apache\htdocs folder.
Restart the Apache server (Start > Programs > Apache HTTP Server > Control Apache Server > Restart) so Apache will use the altered configuration file.
If you go to http://127.0.0.1/test.php in a web browser you should see a page like this:

The PHP test page confirms that PHP has been installed correctly for use with the Apache Web Server


<< Back to Installing the Apache Web Server || Continue to Installing MySQL >>


Navigate this article:
Intro | Page 1 | Page 2 | Page 3 | Page 4
 

Mac Connect | About | Newsletter | Contact Us | Privacy | Terms of Use | Advertising | Links

Copyright © 2004-2005 Mac-connect.comMac Connect: PHP installation on Windows XP All rights reserved.