php5.5不是有效的win32,【已验证】64位windows下php安装起来提示“1%不是有效WIN32应用程序”的解决办法...

今天给一台Win 2003 64位的机器IIS配置PHP出现1%不是有效WIN32应用程序的错误,各处配置都是正确的,只是出现这个。于是百度一下,找到

解决方法:由于在64位操作系统里,默认配置下,IIS工作在64位模式下,这会让许多32位的应用不能正常工作.此时,可用以下命令启用32位模式:(因为php还没有64位版本,所以需要设置IIS以32位模式运行)32位PHP程序在64位系统下跑时,需要执行:

1).进入命令提示符:开始->运行 cmd

2). 输入:

cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

查看iis运行状态是否支持32位程序。

cscript "c:\InetPub\AdminScripts\adsutil.vbs" get w3svc/AppPools/Enable32bitAppOnWin64

###############################################################################################

操作后又出现Service Unavailable 同时应用程序池挂掉。应该是其有调用了64位的isapi 在网站属性中,检查是否有其他的isapi去除即可。

Event Type:  Error

Event Source:  W3SVC-WP

Event Category:  None

Event ID:  2274

Date:    2011-11-7

Time:    9:08:45

User:    N/A

Computer:  407650A

Description:

ISAPI Filter 'c:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\\aspnet_filter.dll' could not be loaded due to a configuration problem. The current configuration only supports loading images built for a x86 processor architecture. The data field contains the error number. To learn more about this issue, including how to troubleshooting this kind of processor architecture mismatch error, see http://go.microsoft.com/fwlink/?LinkId=29349.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Data:

0000: c1 00 00 00               Á...

##################################################

其他参考资料:

PHP on 64 bit Windows(http://www.iis-aid.com/articles/how_to_guides/php_64_bit_windows)

64-bit operating systems are becoming increasingly popular, not without teething pains though. When using IIS on 64 bit versions of Windows 32 bit applications are disabled by default. In this guide we'll look at how you can enable 32 bit support on your 64 bit Windows installation.

If you have tried running PHP on IIS on a default install of 64 bit version Windows, then you'll probably have seen this error in your Internet browser window;

%1 is not a valid Win32 application

This is because the Enable32bitAppOnWin64 metabase property in IIS is preventing the use of 32 bit applications. The solution is quite simple, simply open a command prompt and navigate to your C:\Inetpub\adminscripts directory and run this command;

cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

From here you should be able to run PHP (and other 32 bit applications) on IIS when using a 64 bit version of Windows.

Bookmark/Search this post with:

################################################################################

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值