Home >Backend Development >PHP Tutorial >Error when running PHP on 64-bit system_PHP Tutorial
Problem 1: php running error: 1% is not a valid win32 application
After the php environment is configured, the html is successfully run, but an error is reported when running php. The error message is "1% is not a valid win32 application", and the English report is %1 is not a valid Win32 application. This is the first time I encountered this After searching and testing, the problem was finally solved.
Reason for the error: In a 64-bit operating system, under the default configuration, IIS works in 64-bit mode, which will prevent many 32-bit applications from working properly.
Solution:
1) Enter the command prompt: Start->Run cmd
2) Execute script:
cscript %SYSTEMDRIVE%inetpubadminscriptsadsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
Explanation;%SYSTEMDRIVE% represents the system disk. For example, if your system disk is C, then the above statement is changed to:
cscript c:inetpubadminscriptsadsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
Question 2: Error when accessing the webpage: Service Unavailable
After going through the above operations, I thought I was done, but this is not the case. When accessing the website, another error message appears: Service Unavailable.
The solution is as follows:
1) Enter the command prompt: Start->Run cmd
2) Execute script:
%SYSTEMROOT%Microsoft.NETFrameworkv1.1.4322aspnet_regiis.exe -i
Explanation: %SYSTEMROOT% represents the system directory, usually "C:WINDOWS"; v1.1.4322 is the default. net version, you can also change it to "v2.0.50727" and other other versions. The key is not to write the wrong path name, otherwise the execution will not be successful.