Installing GD library with apache2.2 (mac os 10.5.8)

Hi there,

Luckily for me I do not have any hair on my head. If I did, then I probably would have pulled most of it out by now!

There is a huge amount of conflicting info on the web regarding GD and how to install it, so I have finally decided to submit a post specific to my unique requirements.

I am using apache 2.2 on my mac os 10.5.8. This is the bundled version of apache. I have changed the httpd.conf file to include the php_5 module. The phpinfo(); command tells me that I am running php 5.2.8, which, according to various sources, includes the GD library, I just have to compile php --with-gd.

I have looked through the php.ini file, and the httpd.conf and not been able to find a way to add the line ‘–with-gd=usr/’ to the configure command.

To be honest, I don’t really know what the configure command is… Something that is set when you compile php at the command line is my best guess. But I didn’t compile php at all, it was already done for me, I just had to remove a hash from httpd.conf and restart apache.

Because all of these files are (rightfully) hidden from the user, I can’t search for the gd library very easily either, so I can’t be sure if I even have it.

So I guess my question is this: Is the GD library included with apache 2.2/php 5.2.8 bundled with mac os 10.5.8, and if so, how do I activate it?

Many thanks in advance,
Mike

Try here: Step by Step Installation on a Mac OS X Server - MoodleDocs

Barring the Moodle stuff of course.

Here’s another, a simple one-line command to install PHP and GD (and other extensions).

http://php-osx.liip.ch/

Hi Anthony,

Thanks for your reply. After reading the Moodle Docs post, I thought, well, why don’t I just install php 5.3.0, but the entropy link didn’t work for me, so in the end I decided to just install MAMP and be done with it. Seems like a much easier way round.

All the best,
Mike

The latter link I provided is receiving some excellent feedback from the community, it maybe worth bookmarking even if you don’t use it right now. :slight_smile:

Glad you’re sorted though.

Yeah, the latter link looks good, but I’m using os 10.5.8, not 10.6… will it still work for me?

Plus, I got a bit a head of myself, and downloaded an entropy binary for php 5.3, and tried to install it. Now I can’t run phpinfo.php, although php commands seem to work. If I type ‘php -i’ from the command line, it tells me I’m using php 5.2.8… Dunno what I’ve done.

:frowning:

I see, according to the bash script, it states:

you need at least 10.6

So I guess not.