简体   繁体   English

在WAMP 64位上将64位PHP转换为32位

[英]Convert 64bit PHP to 32bit on WAMP 64bit

I now have a scenario where I need PHP to be 32bit (I need to connect to a 32bit COM object, no 64bit version is available for this particular one (Sage SDO)). 现在,我有一个场景,我需要PHP为32位(我需要连接到32位COM对象,该特定版本(Sage SDO)没有64位版本可用)。

I want to keep MySQL as it is, 64bit, but how would I go about changing just PHP to 32bit without wrecking everything? 我想将MySQL保持为64位,但是如何将PHP更改为32位而又不破坏所有内容?

I have tried to simply drop in 32bit PHP in place of the 64bit, copying the php.ini file so the config is the same, but this doesn't work and the server won't start. 我试图简单地用32位PHP代替64位,复制php.ini文件,使配置相同,但是这不起作用,服务器也无法启动。

I am using WAMP 2.4 with PHP 5.4.12. 我正在将WAMP 2.4与PHP 5.4.12一起使用。

Am I better off ditching WAMP completely and doing my own custom build so that everything is the latest version? 我是否最好完全放弃WAMP并进行自己的自定义构建,以使所有内容均为最新版本?

I am afraid you would have to change Apache to 32bit as well as PHP. 恐怕您将不得不将Apache更改为32bit以及PHP。 This is because Apache basically runs PHP as a subroutine in the WAMP setup so they both have to be compiled using the same compiler version and bit count. 这是因为Apache在WAMP设置中基本上将PHP作为子例程运行,因此它们都必须使用相同的编译器版本和位数进行编译。

MySQL you could keep as a 64bit version as PHP talks to MySQL through a TCP port and not directly. MySQL可以保留为64位版本,因为PHP通过TCP端口而不是直接与MySQL通讯。

However there is no great advantage to keeping MYSQL as 64bit as the 32 and 64 bit databases are interchangable as far as I know. 但是,据我所知,将MYSQL保持为64位并没有很大的优势,因为据我所知,32位和64位数据库可以互换。

I would suggest you save your databases and site code and then uninstall the 64bit WAMP and the install the 32bit WAMP. 我建议您保存数据库和站点代码,然后卸载64位WAMP并安装32位WAMP。

It is still the case that there are more extension available in the 32bit arena than there are in the 64bit, so this will also make your environement more flexible for the next time you need a less mainstream extension in your websites. 仍然是32位领域比64位领域有更多扩展的情况,因此,当您下次在网站中需要主流扩展时,这也将使您的环境更加灵活。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM