Thursday, June 5, 2008

Cannot Load php5apache2.dll Solution

The newer installation files of PHP for Apache in Windows throws an error.

Cannot Load phpapache2.dll

To solve this problem

1. Go to your Apache installation directory

2. then go to the conf subdirectory

3. Look for httpd.conf and open it with notepad.

4. Replace

LoadModule php5_module "c:\php5\php5apache2.dll" with
LoadModule php5_module "c:\php5\php5apache2_2.dll"


Then restart Apache.

Take note that my PHP installation directory maybe different with yours. My PHP installation in this case is C:\php5. Make sure to replace this with your own installation folder location.