PHP + MySQL running but not ZLIB


Hi guys,
I'm not a Unix guru but I'm a good student. I installed properly PHP + MySQL on my 10.0.4 then I upgraded to 10.1 MySQL and PHP are still working under 10.1 but PHP seems to ignore Zlib functions... And no PNG or JPEG functions work either...

I tried to reinstall Zlib, GD, LibPNG and JPEG-6. (But maybe I should reinstall PHP to take to load all this libraries during ./configure ?) Here is the error message I get during the compilation of zLib-1.1.3 ...

[localhost:/Users/michel/zlib] root# ./configure
Checking for gcc...
Building static library libz.a version 1.1.3 with cc.
Checking for unistd.h... Yes.
Checking for errno.h... Yes.
Checking for mmap support... Yes.

[localhost:/Users/michel/zlib] root# make
cc -O -DHAVE_UNISTD_H -DUSE_MMAP -o example example.o -L. -lz
/usr/bin/ld: /usr/lib/libz.dylib load command 7 unknown cmd field
/usr/bin/ld: /usr/lib/libSystem.dylib load command 6 unknown cmd field
make: *** [example] Error 1

[localhost:/Users/michel/zlib] root#

It seems that the MAKE doesn't work at all. I do not have the Dev Tools (but I didn't have them either for installing PHP + MySQL). Is there something changed in 10.1 ? There is package for MacOS X I get to install Zlib but with no effects ? Maybe there was some hidding error messages during unpackaging ?

I know there is a shell script that installs GD + Zlib + libPNG etc... but this shell script needs the Dev Tools10.1 to be installed. I'm not a developper so I don't have them. I only have the 10.0 Dev Tools from the original install CD.

Please help me guys understanding what's wrong. Thanks.


House pianist
I bet you'll want to install the Dev Tools. Between installing 10.1 and the new Dev Tools, I noticed that a lot of functions from the command line were broken or messed up. I'm also seeing that a lot of what's in /usr/bin was updated (or at least touched) when I installed the Dev Tools.

I just tried to remake zlib 1.1.3 and it finished without a problem.

Note that these are available for free from Apple Developer Connection ( You need to create an account if you don't have one yet, but you do not need one of the paid memberships to access the Dev Tools. The download is 187 MB, though, so you'll probably want a fast connection!


Thank you Billbaloney! You we're right. I went to the Apple's website and just typed the same ID and Password as the AppleStore. I could open a Developper Accompt then downloaded for 2 hours de 190 Mo Dev Tools...

Why didn't the Dev Tools installed by default ? It's more than usefull. It's obligatory to use the Term App properly!

I could run the Apache Super Script which installs everything I need in just one click. This script will compile and install libjpeg, libpng, and the FreeType libraries, and then build the gd library linked against those libraries.... Plus installs the latest versions of MySQL, PHP and Apache! Fantastic! I don't know anything about compiling! The script did everything.

sudo sh

Michael A. Peters' (the Super Script Author) page :