Unfortunately, Leopard’s PHP installation does not ship with a GD module. If you use this PHP version, Drupal will report that it can’t find a GD library (and no image processing will be performed either). There is a tutorial on the web that explains step by step how to compile GD2 for the stock PHP 5.2.4 that comes with Leopard; however, PHP segfaults after the installation (at least for me).
Fortunately, there is an alternative: Entropy.ch’s PHP 5.2.5 beta package comes with all kinds of modules prepackaged. The folks over at Moodle created a very good step by step instruction for setting that bug.
The drawback: On my (32bit) machine, PHP would refuse to log in (connecting worked fine!) to my (unaltered) database server. At the same time, I was able to connect to it using the mysql CLI binary with the exact same credentials. It turns out that the MySQL Client API in Entropy’s PHP package is somewhat broken on 32bit Intel and PPC (but works fine on 64bit Intel!). After some debugging (checking socks, reviewing debug logs, …) I stumbled upon a forum post which provides a quick fix for this issue: Just copy over the stock Leopard MySQL Client libs to the new PHP installation and you’re done.
Comments
I ended up using MAMP, and just adding the following to my ~/.profile
export PATH=/Applications/MAMP/bin/php5/bin:/Applications/MAMP/bin/apache2/bin:/opt/local/bin:/opt/local/sbin:$PATHI ended up using mamp to after pulling my hair out with the entropy package, including trying what you mentioned. (I’m sure I just did something wrong, of course)
But still I’m not very excited about the entropy version anymore. Marc Liyanage does not seem to have much of a commitment to it at this point from what I’ve seen.
So, after figuring out how to get mamp to work with the commandline and switching the port over to 80 instead of 8080 and changing mamp’s doc root to match Leopard’s default (so that I can just type “localhost” as I could before) - I’ve got all the advantages of the previous setup and then some.
Thanks for this pointer, Konstantin.
I found that the Entropy 5.2.5 Release 6 beta worked fine for me, with the MySQL MacOS X package version 5.0.51a, using the mysql driver (as opposed to mysqli, which gave the reported authentication problems). I had to change the location of the socket for server and client to /tmp/mysql.sock.
However, I found that the entropy port does not provide tidy support, so I wound up starting with the MacPort OpenDarwin PHP 5.2.5 distribution and building my own.
Cheers, Djun
I posted some instructions on getting GD built on OS X: http://drewish.com/node/110
Andrew, thank you for the instructions you posted in your comment above. I’d been beating my head against this question for weeks, and had not found a thorough step-through of the process. While your tutorial was dense and complex for a not-exactly-expert like me, by working slowly and carefully I got just the result I needed.