Posted on
March 04, 2008 by
Juan
The nice thing about
MacOS X 10.5 Leopard is that it comes with PHP 5.2.4 pre-installed. Unfortunately one of the features Apple choose not to compile in was support for the
GD graphics library, which I use extensively
. Furthermore compiling in new features has proven to be somewhat troublesome. When I tried to configure PHP 5.2.5 on my Leopard box which the following commands (a variant of the configure command I would issue under Tiger with no complaints):
The result was a failed configure due to an error in mysql configuration. I pinned this down to a request for a library at
/usr/local/mysql/lib/mysql/libmysqlclient.15.dylib which is actually located one directory up. This can be fixed via the command line using:
cd /usr/local/mysql/lib
mkdir mysql
cp libmysqlclient.15.dylib mysql/libmysqlclient.15.dylib
Then the
./configure worked just fine. Unfortunately, when I did a
make
make test
to compile the PHP and test it, there was no happiness. There were over 50 errors, some of them major. Crud.
This is just the setup. See, all I needed was
GD graphics library support in PHP for my website. Well, after googling for some time for some master hacker’s notes on getting PHP 5.2.5 to compile on Leopard, I discovered a fellow named Hill Pei had
hacked GD support into the Leopard PHP without too much effort. His method simply requires some comfort with the command line and editing text files. In five minutes, I had GD support with Leopard’s built-in PHP. Excellent!
[Despite a report in the comments to the contrary. This still appears to be necessary if you apply Security Update 2008-002, which installs PHP version 5.2.5. In which case, you should grab the php 5.2.5 code and work from there. I can confirm Hill Pei's instructions do work after Security Update 20008-002 if you grab the PHP-5.2.5 code instead of 5.2.4 as he suggests.]
Category
Command Line Tricks, MacOS X Annoyances
Posted on
March 04, 2008 by
Juan
I have taken part of my day to get my main web server upgraded to MacOS X 10.5 (aka Leopard). I spent quite a bit of time waiting, removing programs I knew were incompatible, and so on. Still, this upgrade was not without a few bumps:
So the adventure continues. Back to research, I have invested about 5 hours of my spring break into this upgrade, that is enough for now.
Category
Astronomical Software, MacOS X, MacOS X Annoyances, MacPorts, X11