Force Apache HTTPD to run in 32bit

…衆ロ難τιáo~ 提交于 2019-12-06 08:46:06

You can use the arch(1) command to change the which architecture is used. This will try Intel 32-bit first and then PPC 32-bit:

% arch -i386 -ppc /usr/sbin/httpd

This method will make a copy of the Apache binary and ensure that apachectl (and hence, the normal OS config) will properly start the 32-bit version:

First, create the 32-bit version of httpd:

sudo lipo -thin i386 /usr/sbin/httpd -output /usr/sbin/httpd.i386

Second, edit the system configuration so it uses the new version instead of the default. Change "/usr/sbin/httpd" to "/usr/sbin/httpd.i386":

sudo vi /System/Library/LaunchDaemons/org.apache.httpd.plist

Lastly, restart Apache:

sudo apachectl restart

Note that doing so will prevent apache from loading any 64bit shared modules - if you're using EntropyPHP, for instance, this can be a problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!