Page 1 of 1

installing php on apache using windows xp

Posted: Fri Jul 06, 2007 9:05 pm
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

Posted: Fri Jul 06, 2007 9:27 pm
by feyd
What changes did you make and what versions of each did you install?

Posted: Fri Jul 06, 2007 9:43 pm
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.

Posted: Fri Jul 06, 2007 10:05 pm
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

Posted: Fri Jul 06, 2007 10:17 pm
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 ?

Posted: Fri Jul 06, 2007 10:19 pm
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.

Posted: Fri Jul 06, 2007 11:18 pm
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.

Posted: Sat Jul 07, 2007 6:12 am
by volka
Why did you downgrade apache instead of upgrading php?