Thursday, February 26, 2009

Configuring The Apache Web server to PHP

Now we want to configure the apache web server to the php so that we will be able to use this code for developement of the code locally. 
First step is to type 
http://localhost on the web browser. 

Now Go to Server directory , which is in C:/Program folders / Apache .
Now if you have app servers installed , these will also be located in the same folder, make sure u select the web server ( version 2.2) and not tomcat . 

Now go to Conf folder and locate the file httpd.conf 

Open the file and search for "#LoadModule" . Once you find the LoadModule, append the last line in the same para with the following value :
"#LoadModule php5_module c:/php5apache2_2.dll" 

Now search for "AddType" and add 
"AddType application/x-httpd-php .php"

restart server :)