Question

I have been running Apache HTTPD in 64bit mode by stripping out the 32bit architecture from the binary (along with the ppc parts). I did this to make it more compatible for python and mysql.

However I have another machine that needs it to be run in 32bit mode (it has all four original architectures still in it). Is it possible to make sure that it is running in 32 bit mode and that anything compiled against it uses said mode.

Are my options limited to stripping it, or are there start up optiosn that I do not know about.

Was it helpful?

Solution

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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top