Apache can't find php5appache2_2.dll

Ignore my rambling below. I see that many others on the forum have had this problem with very little success at fixing it. I’ve tried most of the fixes offered up but nothing fixes the problem.


Just started Kevin Yank’s book on PHP and MYSQL, 4th ed.

I’ve tried installing the trio (apache, mysql, and php) twice now and each time apache will not start because it can’t find php5apache2_2.dll in the PHP directory (yes, it’s there). At first, apache works, but after I change the conf file it bombs.

I’m using all the lastest installs designed for my XP Pro box.

I’ve check and double-check pathnames and locations and nothing is mis-typed or where it shouldn’t be.

Any help will be greatly appreciated.

Apache, MySQL, and PHP can be tricky to get working right. As a newbie, next time you may want to look into XAMMP which will install those three things plus Perl, phpMyAdmin, and more all from one package.

In your Apache httpd.conf file, make sure you have an entry to load the php5 module like this:

LoadModule php5_module "c:/php/php5apache2_2.dll"

The “c:/php/php5apache2_2.dll” is my filepath. Your filepath (which you put between the quotes) will be the path to your php5apache2_2.dll.

I added these lines to my Apache configuration file to get it to work.

Win32DisableAcceptEx
PHPIniDir "C:/php"
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php

Win32DisableAcceptEx - this disables something which causes Apache to race at 99% CPU on Windows unless this line is added. I am using Windows XP for a development server.

PHPIniDir lets Apache know where PHP is located (specific to your computer).

LoadModule load the module you are missing.

And the AddType line, I’m not sure if I need that. But it does not hurt, so it is in there.

Now, to get MySQL extensions to work, you are going to have to uncomment them in your php.ini file. Remove the “;” comment delimiter from the beginning of the lines:

extension=php_mysql.dll
extension=php_mysqli.dll

Also, you are going to have to paste and copy (not cut) libmysql.dll from wherever it resides (I don’t remember) into your Apache /bin folder.

Those are the major issues getting it to work when installing everything separately. Next time, check out XAMMP.

I tried this a many other workarounds suggested in this tread and still my Apache will not start. It just can’t find the php5apache2_2.dll.

Thanks for the suggestion.