installing php on apache using windows xp

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
NasirMunir
Forum Newbie
Posts: 4
Joined: Fri Jul 06, 2007 6:45 am

installing php on apache using windows xp

Post by NasirMunir »

I am trying to install php with apache, but having trouble with that. I have successfully been able to install apache, however, when I go for php; after making necessary changes and copying of php.ini files I am getting this error:

Code: Select all

httpd.exe: Syntax error on line 68 of c:/apache/conf/httpd.conf: cannot load c:/apache/php/sapi/php4apache.dll into server: the specified module could not be found.
can I get some help here?
Thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

What changes did you make and what versions of each did you install?
NasirMunir
Forum Newbie
Posts: 4
Joined: Fri Jul 06, 2007 6:45 am

Post by NasirMunir »

"php-4.4.7-Win32.zip" for PHP
"apache_2.2.4-win32-x86-no_ssl.msi" for Apache

Changes made so far:
1. copy php.ini to c:\windows
2. copy all the librarys from c:\php\dlls to c:\windows\system
3. Copy php4apache.dll to c:\apache\modules and php4ts.dll to c:\windows\system
4. Edit your autoexec.bat file, adding c:\apache to your %PATH% statement
5. Add the following line to httpd.conf:
LoadModule php4_module modules/php4apache.dll
5. Restart Apache.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Your first post is saying a few different things. Which one is it?

Edit: from what I can see, PHP 4.4.7 does not include a module for Apache 2.2.x
NasirMunir
Forum Newbie
Posts: 4
Joined: Fri Jul 06, 2007 6:45 am

Post by NasirMunir »

so which version of php should i use ?
If I try the latest one, what changes should i make to the httpd.conf, also what should i add to environment "path" variable , and what files do i need to copy to apache folders or else ?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

PHP 5 (in later versions) has support for Apache 2.2. However if you need PHP 4, you will need to install Apache 2 at the latest.
NasirMunir
Forum Newbie
Posts: 4
Joined: Fri Jul 06, 2007 6:45 am

Post by NasirMunir »

case resolved: this time I used;
apache_2.0.59-win32-x86-no_ssl.msi
php-4.4.7-Win32(2)
and installation instruction from this site:
http://www.php-mysql-tutorial.com/insta ... .php#mysql

It is working fine now, thanks a lot for your help.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Why did you downgrade apache instead of upgrading php?
Post Reply