Exclusive Affiliate-Only Offer:
$9.99 Domain Names
Drive sales with one of the most aggressive domain offers out there: A domain and professional email account for only $9.99!
This is a tutorial about installing PHP 5.2 on Apache Web Server running on
a machine with Windows XP.You can visit the PHP website and download the
file php-5.2.4-Win32.zip for the manual installation.
First step unzip the file in this directory C:\Program
Files\PHP.
Then open the newly created PHP folder
and copy the file php.ini -dist and rename it
php.ini jn the same directory.
To tell PHP to load particular modules
when it starts ,open php.ini with notepad or any text editor
,find extension_dir and change it as extension_dir = "C:\Program
Files\PHP\ext" and then find Dynamic Extension,in this section
there are all the modules Find out which one you need from the
PHP website and to enable it just remove the ";" in front of it.
Now you have to tell Windows where PHP is.Click Start,Right-click
MyComputer and choose Properties/Advanced tab/Envirement
variables A window like below opens,Select Path
by clicking on it and click Edit
Then, Go to the end and type the directory where you installed PHP,in
this case is C:\Program Files\PHP and click OK
Now you back on System Variables,click New ,in the Variable Name type
PHPRC, in the varable value type the directory where PHP is installed
C:\Program Files\PHP and click OK.This is to tell PHP that php.ini is in
the same directory instead that in the system directory.
Now,assuming you have Apache Installed(if not go
here for tutorial),go to C:\Program
Files\Apache Group\Apache2\Conf and open the file httpd.conf.
Find the section Dynamic Shared object(DSO)Support and add in the row
below: loadmodule php_module "C:/Program
Files/PHP/php5apache2.dll". Note the slash orientated
forward.This module is loaded by Apache on start.
Find the section related to AddType and add a
row like this one: Addtype Application/x httpd-php .php
Next step you have to
restart Apache, go to start/AllPrograms/Apache/Restart.Now everything should
be fine.
To check it,open a new file
with notepad and type:<?php phpinfo(); ?> Save it in C:\Program
Files\.Apache Group\Apache2|\htdocs as phpTest.php not as text file but all
files or it wont work.pen your web browser and type in the address bar http:/localhost/phptest.php
and ,if a page with all the php info appears ,it means that you have php
succesfully installed and running.
Thanks Sir.
I have installed apache & it work well on explorer when i type http:\\localhost
But on configuring PHP on Apache Server I have a problem.
Problem:-
Syntex Error on line 134 of C:\Program Files\Apache Group\Apache2\Conf
LoadModule take two arguments module name and name of the shared object file to be load it from.
how can i takle with it.plz help me.
After this congiguration my Apache does not start.
plz help me.i shall be thankful to you.
vishal chalana
From: SIMMI KAUR
Comment Nr 3
Posted on 11/04/09
Thanks Sir.
I have installed apache & it work well on explorer when i type http:\\localhost
But on configuring PHP on Apache Server I have a problem.
Problem:-
Syntex Error on line 134 of C:\Program Files\Apache Group\Apache2\Conf
LoadModule take two arguments module name and name of the shared object file to be load it from.
how can i takle with it.plz help me.
After this congiguration my Apache does not start.
plz help me.i shall be thankful to you.
vishal chalana
From: admin
Comment Nr 4
Posted on 11/04/09
I think your problem is on the loadmodule string.
Maybe if you copied and pasted check if some unwanted character is in the string that must look like this
loadmodule php_module "C:/Program Files/PHP/php5apache2.dll"
However,to restart Apache go to Programs Control Apache Server Stop and Start
If something goes wrong you should see it or else have a look in the log file on apache root folder.