Page 1 of 1

php5apache2_2.dll error on Apache

PostPosted: 16. July 2012 05:44
by Camo Yoshi
After installing the latest version of XAMPP 1.8.0 for Windows, I get the following error when trying to start apache:

httpd: Syntax error on line 456 of D:/xampp/apache/conf/httpd.conf: Syntax error on line 18 of D:/xampp/apache/conf/extra/httpd-extra.conf: Cannot load D:/xampp/php/php5apache2_2.dll into server: The specified procedure could not be found.

The funny thing is, the DLL is there in the directory listing in the error; so I'm not sure what's going on. Any ideas? Thanks for the help. :)

-Camo Yoshi

Re: php5apache2_2.dll error on Apache

PostPosted: 16. July 2012 07:47
by JonB
Any ideas?

Code: Select all
Cannot load D:/xampp/php/php5apache2_2.dll

yes, check your Apache version for XAMPP 1.8.0

Did you copy a prior httpd.conf into the new install?

:?:

Re: php5apache2_2.dll error on Apache

PostPosted: 16. July 2012 14:54
by Camo Yoshi
httpd -v output shows Apache2.4.2. (Win32).

Yes, I copied a httpd.conf after the install.

Re: php5apache2_2.dll error on Apache

PostPosted: 16. July 2012 15:02
by Altrea
Camo Yoshi wrote:Yes, I copied a httpd.conf after the install.

This will not work because of module incompatibility.

Re: php5apache2_2.dll error on Apache

PostPosted: 16. July 2012 21:22
by Camo Yoshi
Ok, how can I fix that?

Re: php5apache2_2.dll error on Apache

PostPosted: 16. July 2012 21:52
by JonB
AFAIK - you don't have to fix anything - this is Apache 2.4.2 and the PHP handler that is included with XAMPP 1.8.0 is correct for this version.

You should just comment it out.

Good Luck
8)

Re: php5apache2_2.dll error on Apache

PostPosted: 17. July 2012 01:49
by Camo Yoshi
JonB wrote:AFAIK - you don't have to fix anything - this is Apache 2.4.2 and the PHP handler that is included with XAMPP 1.8.0 is correct for this version.

You should just comment it out.

Good Luck
8)

I'm not sure if I did it right but, here's what I did:

In httpd-xampp.conf I commented out the following lines:

#LoadFile "D:/xampp/php/php5ts.dll"
#LoadModule php5_module "D:/xampp/php/php5apache2_2.dll"

However I lose PHP entirely with this modification. Apache runs correctly however.

Thanks for all the help. I'm a bit of a noob but greatly appreciate all the advice, and glad that you're not all grouchy and stuff. :)

-Camo

Re: php5apache2_2.dll error on Apache

PostPosted: 17. July 2012 13:55
by hackattack142
Generally, you really should not blindly overwrite configuration files especially with such a major upgrade to Apache because you don't know what other configuration file changes you might have overwritten/deleted. I like to compare them side-by-side in a Diff utility to see the changes so I can copy over the things I want without unintentionally removing other stuff.

the php5apache2_2.dll is the bridge file for Apache 2.2.x, you need to use php5apache2_4.dll which is for Apache 2.4.x

These should be in your Apache config and be uncommented:
Code: Select all
LoadFile "D:/xampp/php/php5ts.dll"
LoadModule php5_module "D:/xampp/php/php5apache2_4.dll"

Re: php5apache2_2.dll error on Apache

PostPosted: 17. July 2012 22:09
by Camo Yoshi
hackattack142 wrote:Generally, you really should not blindly overwrite configuration files especially with such a major upgrade to Apache because you don't know what other configuration file changes you might have overwritten/deleted. I like to compare them side-by-side in a Diff utility to see the changes so I can copy over the things I want without unintentionally removing other stuff.

the php5apache2_2.dll is the bridge file for Apache 2.2.x, you need to use php5apache2_4.dll which is for Apache 2.4.x

These should be in your Apache config and be uncommented:
Code: Select all
LoadFile "D:/xampp/php/php5ts.dll
LoadModule php5_module "D:/xampp/php/php5apache2_4.dll


Even after uncommenting, I still do not have php working... Apache doesn't give any errors to the command line window, and the error log has nothing... Any more ideas? :P

Re: php5apache2_2.dll error on Apache

PostPosted: 18. July 2012 03:18
by JonB
You might be missing the close quotation marks - I think HA them missed by accident

Code: Select all
LoadFile "D:/xampp/php/php5ts.dll"
LoadModule php5_module "D:/xampp/php/php5apache2_4.dll"



Good Luck
8)

Re: php5apache2_2.dll error on Apache

PostPosted: 18. July 2012 03:40
by Camo Yoshi
Wish it was as simple as that, but it still didn't work, even with or without closing quotes.

Re: php5apache2_2.dll error on Apache

PostPosted: 18. July 2012 04:01
by Altrea
Simply do a fresh install of XAMPP and do just these changes to your configuration files which are really needed (so only change things if you get specific problems).

Re: php5apache2_2.dll error on Apache

PostPosted: 18. July 2012 04:05
by Camo Yoshi
I will try that now, thanks.