≡ Menu

Apache 2.2.x won’t load php5apache2.dll solution

Recently, I started upgrading all my applications to the latest versions or at least upto the version my hosting providers uses – i was using Apache 1.3.x HTTP Server, but I’ve finally upgraded to the latest version which is Apache 2.2.15 & PHP 5.3.2 as of writing this post. I think it’s a good idea to keep your Apache / PHP and MySQL up-to date with the latest release or at least up-to date to match your Web Hosting Provider. Anyways, while i was upgrading from Apache 1.3.4 to Apache 2.2.15 i ran into a problem – Apache 2 actually installed pretty smoothly without any complicated issues arising. After the Apache & PHP Installation I started to setup Apache to use PHP where the real problem begin, Apache couldn’t load the php5apache2.dll Module, it was saying that the module can’t be found (look at the below pic to see the error i was getting). Apache 2.2.x Can't Load php5apache2.dll Module Error I was using the PHP Installation Manual (install.txt) all this time that came included with the PHP zip file, i had the below values added as said in that install file: # For PHP 5 do something like this: LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .php # configure the path to php.ini PHPIniDir "C:/php" I then double checked the PHP installation directory to make sure there is a file called php5apache2.dll and sure enough, it was there. While i was checking for the above file I also noticed that there is another file in that directory called php5apache2_2.dll. I tried giving that file a try and change the file name in httpd.conf from php5apache2.dll to php5apache2_2.dll, Which got it working! It was a really simple fix but very easy to overlook it. Hope this will save others (who come across this issue) some valuable time.

{ 7 comments… add one }
  • AndyDamico September 1, 2010, 12:13 pm

    You’re life saver! i couldn’t for the life of me figure out why i was seeing that error but i finally got that sorted out, thanks!

  • Andy Wybenga September 9, 2010, 2:02 am

    Thanks for posting this! All the examples I came across said to load php5apache2.dll, so that’s what I did; I’d get the same error you did. Thankfully, I found your fix which worked perfectly for me.

    • Zubair September 9, 2010, 6:08 am

      @Andy Wybenga:

      You’re welcome, I’m happy to hear that this helped you out 🙂

  • vonericf January 7, 2011, 4:40 pm

    i have the same problem.. but still the same error Cannot load C:/PHP5/php5apache2_2.dll
    i freshly installed the latest version of APACHE and PHP binary file. please help..thanks

  • 4nmu July 10, 2011, 2:24 am

    Thanks for sharing, really helped.

  • adh March 3, 2012, 3:19 pm

    people who say that they cant load php5apache2.dll/php5apache2_2.dll.please check that for using apache you should download VC6 version of php.VC9 will not work..

  • Kevin Solveson December 24, 2012, 8:07 pm

    Thank you very much for the tip. Fixed my problem, too! 🙂

Leave a Comment