I tried the G4 Powerbook with OS X 10.5.8 for testing. It turns out that the current precompiled version of mongo.so for PHP 5.3 on github does not support PowerPC (PHP 5.2 build is being created).
I downloaded the PHP 5.3.1 source according to XAMPP 1.7.3 and compiled my own mongo.so file (1.2.12).
I did some minimal testing with XAMPP 1.7.3 on PowerPC to confirm that this works. Essentially, I just pasted the example from the PHP PHP MongoDB tutorial and pasted some documents into MongoDB 2.0.6 running on another computer.
Please note that this is an unofficial and unsupported build of mongo.so, the same as what you must successfully build from source using pecl install mongo . As a bonus, this is a much newer version of the driver than the pre-compiled OS X, which is currently located on github.
As a warning: I'm not sure about the limitations or quirks of using this on PowerPC. Currently, most of the world of OS X has switched to Intel architecture.
So, instructions for use:
Download and install the XAMPP Mac OS X 1.7.3 universal binary .
Download mongo-ppc-1.2.12.so from my github: mongodb-php-driver / downloads
Rename this to mongo.so and copy to /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/
Edit XAMPP / etc / php.ini and add the last line with:
extension=mongo.so
Check via phpinfo () that the mongo extension mongo available. Make sure you stop / start Apache if it was already running when you added the extension.
Stennie
source share