if you can’t load/find phpapache2.dll

Posted by Montu on July 07, 2008

If you are trying to do what I did, install PHP5 and Apache 2 on Windows XP machine using an Apache installer and a zipped PHP, then you are bound to see these messages
HTTPD: Syntax error on line 485 of C:/amp/apache2/conf/httpd.conf: Cannot load C:/amp/apache2/php5apache2.dll into server: The specified module could not be found.

The solution is to add this to your file

#load the php main library to avoid dll hell
Loadfile "C:\pathtophp\php5ts.dll"

#load the sapi so that apache can use php
LoadModule php5_module “C:\pathtophp\php5apache2_2.dll”

#set the php.ini location so that you don’t have to waste time guessing where it is
PHPIniDir “C:\pathtophp”

#Hook the php file extensions, notice that Addtype is NOT USED, since that’s just stupid
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .phps

More on this page.

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

Comments


Fine Print: I own this domain & many more & same way I own my views, if you don't like something on my blog, I am sorry, I can't help you. In fact I am not even sorry. Ch33r5.