Installing PHP 5 and apache on windows xp
PHP is best suited for LAMP [Linux, Apache, MySQL and PHP] environment, but we can use in WAMP [Windows, Apache, MySQL and PHP] environment also, here are the options to install & configure php with apache in windows machines.
1] Use WAMP Server or XAMPP server for one click installation, no need for configuration.
2] Manually install and configure apache & php.
The first option is very easy, you can download a windows set up package from their site and can install in a single click.
Here are the steps for installing apache and php manually in a windows machine:
1] Download apache for windows from http://www.apache.org/
2] Install it.
3] Create your document root folder [Which will be accessed like http://localhost/], for example I am going to create this under C drive ie “C:myprojects”
4] Now open the apache http configuration file[httpd.conf]
5] Search for DocumentRoot, replace the old value by “C:myprojects”, Also set <Directory “C:myprojects”>
6] Now save the file and restart the apache web server.
7] Open your browser and type “http://localhost/”, now you can see apache working.
8] Download the latest PHP [Normal package without installer] from http://www.php.net/
9] Extract it under C drive ie, the “C:php”
10] Again open the apache http conf file, and search for “ScriptAlias”, add the following to work php
ScriptAlias /php/ “c:/php/”
11] Then add
AddType application/x-httpd-php .php and Action application/x-httpd-php “/php/php-cgi.exe”
12] Restart apache
13] Create an “index.php” file under “C:myprojects”, with the following code
‘); ?> 14]Open your browser, and type http://localhost, now you can see php is working..