Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

php

apache

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?

like image 257
Ethernetz Avatar asked Jul 30 '15 03:07

Ethernetz


People also ask

What is not a valid Win32 application Windows 7?

The error not a valid Win32 application may be caused by the corrupt file during downloading. So, in order to fix the error that .exe is not a valid Win32 application, you can try to download the program again and reinstall it. And then run it and check whether the error not a valid Win32 application is solved.


1 Answers

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.

like image 178
Alpesh Panchal Avatar answered Sep 20 '22 13:09

Alpesh Panchal