How do I enable GD?

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
powrtoch
Forum Newbie
Posts: 5
Joined: Thu Nov 05, 2009 9:55 am

How do I enable GD?

Post by powrtoch »

So I went through all the trouble of installing GD one dependency at a time, then finally built GD itself. I used the demo script and it successfully generated the demoout.gif, which tells me its installed and working. PHP can't seem to find it though. I tried linking (then copying) the .so file into the extensions directory listed in the php.ini file, restarting apache, and rebuilding GD for the sheer hell of it. No dice. No GD section shows up on my phpinfo() output at all.

I don't have the ability to rebuild PHP or Apache, but I see no reason I should have to. As a side note, I built GD without xpm support. From what I can tell it's not essential or usually even useful, and certainly wouldn't cause my detection scripts to fail, but please correct me if I'm mistaken.

Lastly, if you're wondering, I'm using a couple of php scripts (one centered around function_exists("gd_info")) to determine whether GD is working, they agree that it isn't. Please help, feeling pretty dumbfounded.
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Re: How do I enable GD?

Post by redmonkey »

It sounds like you have built a standalone version of the GD library rather than the PHP GD extension.

The PHP sources include a version of the GD library, I'm not sure if it's still the case but previously it was recommended that you build the PHP GD extension using the bundled GD library rather than linking against the standalone version from libgd.org

Once you have the extension built you will have to add (or uncomment) a line in your php.ini file to load the extension.
Post Reply