I know you cannot install the MongoDB server on a PowerPC Mac, but I can’t find any instructions on installing JUST the PHP driver to XAMPP.
Does anyone know if this is possible. If so, how do you do it? I’ve done extensive searching and can’t find an answer to this.
I dusted off a G4 Powerbook with OS X 10.5.8 to test. Turns out that the current precompiled version of mongo.so for PHP 5.3 on github doesn’t support PowerPC (the PHP 5.2 build appears to).
I downloaded the PHP 5.3.1 source to match XAMPP 1.7.3 and compiled my own mongo.so (1.2.12).
I did some minimal testing with XAMPP 1.7.3 on PowerPC to confirm this appears to work. Essentially, I just pasted the example from the MongoDB PHP Driver Tutorial, and inserted some documents into MongoDB 2.0.6 running on another computer.
Note this is an unofficial & unsupported mongo.so build, the same as what you should get building successfully from source with
pecl install mongo. As a bonus, this is a much newer driver version than the precompiled OS X ones currently on github.
As a warning: I’m not sure about limitations or quirks of using this on PowerPC. Most of the OS X world has moved on to Intel architecture now.
So, instructions to use:
Download and install XAMPP Mac OS X 1.7.3 universal binary.
mongo-ppc-1.2.12.sofrom my github: mongodb-php-driver/downloads
Rename that to
mongo.soand copy into
Edit XAMPP/etc/php.ini and add a last line with:
Check via phpinfo() that the
mongoextension is available. Make sure you stop/start Apache if it was already running when you added the extension.