cannot load c:/PHP5/php5apache2_2.dll into server I am getting this error while running apache 2.2 on window XP machine
anyone have any idea what could be the problem. I can see there is no php5apache2_2.dll in c:/php5 folder.
What worked for me was obtaining php5apache2_4.dll-php-5.4-win32.zip from apachelounge and using "php5apache2_4.dll" file from the "PHP 5.4.8" unzipped folder. I had apache 2.3.4 (32-bit) from apachelounge.com and php 5.4.9 (32-bit) from windows.php.net installed on my Win 7 (64-bit).
The dll worked despite 5.4.8 - 5.4.9 mismatch.
The corrsponding changes within "php.ini" and "httpd.conf" are to be maintained acoording to this helpful guide.
Best regards.
First you must downlaod de .dll file (php5apache2_2.dll) then put it in your extensions directory.
Then edit your php.ini file, find de text:
;extension=php5apache2_2.dll
// and change y to extension=php5apache2_2.dll
if the text is not present put the line yourself. Then restart apache and it should load your extension.
PD: you can see where your extensions directory is located looking for the text "extension_dir" in your php.ini, sometimes looks like: extension_dir = C:\php\extensions
Hope this help you, if not please paste the error here, you can find an error log file in apache/error/error.log or something like that.
You should download the dll
file from PHP distribution package. And see three ways to set up PHP to work with Apache 2.x.
You can configure PHP as Apache handler in <[apache_home]>\conf\httpd.conf as follow:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
#configure the path to php.ini
PHPIniDir 'C:\php\'
NOTE: To avoid the error while starting apache, the php ini dir
path should be in single quotes with backslash. Don't forget to end it with backslash.
Here is how I got it to GO:
localhost
as Network Domain and Server NameFrom browser, typed in url http://localhost/
and page came up with "It Works"
(I do not know if there is a God, but took that as a good sign:)
Created the folder C:\PHP
From browser, typed in url http://127.0.0.1/phpinfo.php
It did not work (i.e. it did not run the .php program file)
Hmm, oh yeah, you have to restart Apache for it to see updates to its
own configuration file
Start, Apache, Control..
-> generated the error that it could not find C:\Apache\php5apache2_2.dll
Well, I found it in C:\PHP and I copied it to C:\Apache\
Start, Apache, Control..
-> generated an error about a problem with the PHPINIDir directive on line 495 of C:/Apache/conf/httpd.conf
Fixed that by editing this line in the above file to
PHPIniDir "C:/PHP/php.ini"
Tried to restart Apache again, run the test file in the browser. Still, it did not work:(
Recalled seeing this before and decided to reboot computer Restarted (or started) the Apache Server
Ran the test file again.. IT WORKED!
Note that in some of the above I may have mixed up some forward and back slashes Good luck!
You are getting an error due to the fact that the c:/PHP5/php5apache2_2.dll is not shipped with the non-thread safe version of PHP that you probably downloaded. Two options:
Download and install the thread safe version of PHP instead and you will get everything you need.
If the non-thread safe version is important to what you want to accomplish, download the zip bundle of the thread safe version and take only the .dll you need from there.
Which version: For Apache Server 2.2, you need to download PHP 5.4 thread safe, which is shipped with both php5apache2_2.dll and php5apache2_4.dll. Some earlier versions probably work as well. PHP 5.5 is only shipped with php5apache2_4.dll which will mismatch with your version.
Cf the download links here on the official site: http://windows.php.net/download/.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With