The only way I've been able to get PHP (5.5) to work with Apache (2.4) on Windows (7 and 8) is to make sure Apache and PHP are both either 32-bit (x86) or 64-bit (x64) and that Apache and PHP are both Thread Safe (TS). Using Non-Thread Safe (NTS) did not work for me (or others), and the Thread Safe build comes bundled with the needed Apache Module for PHP "php5apache2_4.dll". Once all my bit-depths and thread safety was matched up, Apache 2.4 and PHP 5.5 work well together on my Windows systems.
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).
php5apache2 4.dll the requested operation has failed
Download: https://urluso.com/2vGNtM
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.
Update 01-17-2013: The version of the php5apache2_4.dll must match the version of PHP you are installing. The link that was reference before has been changed and moved to for versions 5.4.9 and earlier. As of PHP 5.4.10 the module is now included in the Windows build.
Download PHP 5.4.9 VC9 x86 Thread Safe from -5.4.9-Win32-VC9-x86.zip . Extract and rename folder to php and move to C:\Also, download php5apache2_4.dll-php-5.4-win32.zip ( -2.4/php5apache2_4.dll-php-5.4-win32.zip)Runs with PHP 5.4 Thread Safe (TS), and only with Apache 2.4 Win32 VC9 or VC10.
Update 01-17-2013: This next edit seems to cause issues with php5apache2_4.dll not found errors, so I have added two options for PHP 5.4.9 and earlier and PHP 5.4.10 and above. I want to thank all those who have brought this to my attention and I hope this helps out. Also, due to the addition of the php5apache2_4.dll being included in PHP 5.4.10 and above builds you no longer need to download the module separately.
Solved!In my case it was 64 bit version of Apache with 32 bit version of PHP. Downloaded PHP 64 ( -5.4.3-Win32-VC9-x64.zip), now it works like a charm. Btw, php5apache2_4.dll was included in php zip archive. As for the rest, I was just following this article.
C:\apache24\bin>httpd -Shttpd: Syntax error on line 172 of C:/apache24/conf/httpd.conf: Cannot load C:/PHP/ext/php5apache2_4.dll into server: The specified procedure could not be found.
C:\apache24\bin>httpd -k starthttpd: Syntax error on line 172 of C:/apache24/conf/httpd.conf: Cannot load C:/PHP/ext/php5apache2_4.dll into server: The specified procedure could not be found.
C:\apache24\bin>httpd -Shttpd: Syntax error on line 172 of C:/apache24/conf/httpd.conf: Cannot load C:/php/ext/php5apache2_4.dll into server: The specified procedure could not be found.
or The Apache service named reported the following error:>>> httpd.exe: Syntax error on line 526 of C:/Apache24/conf/httpd.conf: Cannot load c:/php/ext/php5apache2_4.dll into server: The specified procedure could not be found.
C:\Users\LARM>c:\Apache24\bin\httpd -Shttpd: Syntax error on line 525 of C:/Apache24/conf/httpd.conf: Cannot load c:/php/php5apache2_4.dll into server: No se puede encontrar el m\xf3dulo especificado.
PHP installed fine, and lives in c:\php. In the c:\php\ folder I have:12/10/2012 10:51 26,624 php5apache2_2.dll12/10/2012 10:51 26,112 php5apache2_3.dll12/10/2012 11:18 25,600 php5apache2_4.dll
Errors reported here must be corrected before the service can be started.httpd: Syntax error on line 525 of C:/Apache24/conf/httpd.conf: Cannot load c:/php/ext/php5apache2_4.dll into server: The specified module could not be found.
For PHP I would copy the php.ini file before running the upgrade install and you will have to replace the php5apache2_4.dll file to match the version you are upgrading to. With Apache copy the httpd.conf file and perform the upgrade.
and check to make sure php5apache2_4.dll is there. One last thing is to make sure your path includes c:\php in it and you have rebooted the system. Open a command prompt with Administrator rights and type set path=%path%;c:\php. This will put it in the path, restart apache and try again. This will add c:\php for the session.
Did you install both 64 bit versions of Apache and PHP or one 64 bit and the other 32 bit? If you mix it will not find it. If they are same then try changing the httpd.conf file to look in c:/php/php5apache2_4.dll. Also, make sure the environment variable for the path has been added for c:\php and c:\apache24. You may want to look at my latest post for installing on server 2012 x64. It will work on Windows 7.
Everything seems to be going great but when I installed apache and tested it, I get an error with the php setting in the config file that we added. Cannot Load C:/php/php5apache2_4.dll into server: %1 is not a valid Win32 application.
First of all, it is worth understanding why a php5apache2_4.dll file is missing and why php5apache2_4.dll errors occur. It is widespread for users to encounter situations where software does not work due to flaws in .dll files. 2ff7e9595c
Comentários