PHP5/Apache2/Windows config
G'day folks
I have got a new install of Apache set up but cannot get it to run with the PHP module. I have added these lines into httpd.conf as instructed in php.ini.:
Code:
LoadModule php5_module "C:/php5/php5apache2.dll"
# ...
<IfModule php5_module>
AddType application/x-httpd-php .php
PHPIniDir "C:/php5"
</IfModule>
However Apache will not start (it gives me a detail-less oh-crap message when I try to start the service). If I comment out the LoadModule line it works. The DLL location is valid and it is a freshly downloaded PHP 5.1.4 binary.
Apache is 2.2.3
Any thoughts?
- P
Re: PHP5/Apache2/Windows config
Perhaps PHP itself can't find a DLL it needs?
Do the Apache logs contain anything interesting?
Re: PHP5/Apache2/Windows config
Not that I can see, the last item in error.log is the last shutdown of the service.
Is there a way to alter the verbosity level of the logging?
Re: PHP5/Apache2/Windows config
Yes, somewhere in Apache's config. But errors shouldn't be swallowed ...
There's really no information in the startup error you get?
1 Attachment(s)
Re: PHP5/Apache2/Windows config
Re: PHP5/Apache2/Windows config
Oh dear. Do you have an Apache executable somewhere that you could start from the command line?
Re: PHP5/Apache2/Windows config
Aha. Doing that, I got this message:
Quote:
httpd: Syntax error on line 32 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/php5/php5apache2.dll into server: The specified module could not be found.
Yet the path is perfectly fine.
I tried various other things like casing and changing the slashes, to no avail.
:confused:
Re: PHP5/Apache2/Windows config
I was able to do phpinfo() using the PHP CLI, so it doesn't seem to be a PHP config issue...
Edit: Also tried c:\php like default, same issue, so for some reason it is not resolving the path, or maybe it is and the library is missing a dependency, although I would have thought the error would be different in that case.
Re: PHP5/Apache2/Windows config
The file does indeed exist, but, its the php module which is complaining about not being able to find the file related to mysql.
This file is libmysql.dll and you should be able to find somewhere under the root install directory for mysql. You need to ensure the file containing this dll is in the
system PATH environment variable or copied to a directory in the system PATH.
Copying it to C:\windows or C:\winnt should suffice.
Re: PHP5/Apache2/Windows config
Small update:
It works through CGI. However after about 5 hours of fartarsing around I still cannot get it to work as a SAPI module.