Ethernetz
Ethernetz

Reputation: 978

PHP load error: %1 is not a valid Win32 application.

Running a win64 architecture, attempting to run php with Apache for the first time. After loading the php module in the httpd.conf, apache fails to start and the error log displays

Cannot load c:/php/php5apache2_4.dll into server: %1 is not a valid Win32 application.  

Other sources claim this is a compatbility issue, and that there is either a win32 version of php with win64 apache, or vice versa, I do not think this is the case. I downoaded the win64 vc14 version of apache from http://www.apachelounge.com/download/ and the win64 vc11 version of php from http://windows.php.net/download#php-5.6 - What is causing the error when I attempt to load the php module?

Upvotes: 30

Views: 40370

Answers (2)

temo
temo

Reputation: 698

With this error I also got

 (%1 is not a valid Win32 application.)
 Warning: Module 'pdo_mysql' already loaded in Unknown on line 0

I just commented

;extension=php_pdo.dll
;extension=php_pdo_mysql.dll

Those two lines and both errors disappeared, and everything works fine. I commented those lines because of 'already loaded' errors, but it fixed both somehow...

Upvotes: 0

Alpesh Panchal
Alpesh Panchal

Reputation: 1713

It is actually binary version difference so compatibility issue between apache and php.

Since you've installed apache vc14 windows 64, download this php of vc14

http://windows.php.net/downloads/releases/php-7.0.13-Win32-VC14-x86.zip to config php with apache.

Upvotes: 28

Related Questions