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)).
I want to keep MySQL as it is, 64bit, but how would I go about changing just PHP to 32bit without wrecking everything?
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.
I am using WAMP 2.4 with PHP 5.4.12.
Am I better off ditching WAMP completely and doing my own custom build so that everything is the latest version?
I am afraid you would have to change Apache to 32bit as well as 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.
MySQL you could keep as a 64bit version as PHP talks to MySQL through a TCP port and not directly.
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.
I would suggest you save your databases and site code and then uninstall the 64bit WAMP and the install the 32bit 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.