Status is reporting that GD Library for PHP is not installed. I checked out the suggested link, and now I'm here. Very new at all of this, and it doesn't appear that I was the target audience for the help page. Please, would someone try to simplify the install for me. I feel almost as dense as a black hole.

Thank you

Comments

VM’s picture

what version of PHP are your runnig on your host ?

if GD insn't installed on your server you must install it.

paste this into a new file

<?php phpinfo(); ?> name the file phpinfo.php upload it to your server and run it in your browser to be fed back version inormation as well as settings for PHP on your host.

Mark Nielsen’s picture

if GD insn't installed on your server you must install it

Is that really necessary, for a simple Drupal install? It's not always possible to install GD on shared hosting...

Mark
flet.org

VM’s picture

for a simple drupal install probably not. however, im not sure how not having the GD2 library installed will affect the garland theme that uses the colorpicker.module. I was merely responding to the idea that if it was wanted, it would need to be installed. As the user expressed he was brought here by a warning of NOT having GD2 installed.

GD was/is part of the PHP package for quite sometime, I'm assuming your host either turned it off, or just chose not to install it.

can you confirm whether you are on shared hosting? or whether you are setting up your own server?

If on shared hosting you will need them to compile the binaries for you.

sdad’s picture

I am setting up my own server. Sounds lethal doesn't it?

Barry Demers

sdad’s picture

The version of PHP that I am running is 5.1.6. The Status report is saying that I don't have GD installed. That's my issue. I really don't know how to do that, the help page isn't doing me much good.

Barry Demers

ShedPhotons’s picture

I had the same problem, using Feisty Fawn and PHP5. For some reason, the gd.so file installed to /usr/lib/php5/20060613+lfs/gd.so and Drupal /PHP do not know to look there. I had to copy the file to /usr/lib/php5/ext. I had the same
trouble with mysql.so, and spotted something in a comment that gave me the idea to try this. I wonder why appt-get is using the oddball path for .so files?
This was after following the other instructions above, of course.

Mark Nielsen’s picture

The GD Library in PHP is the bit that deals with manipulation of images on the server.

As far as I know, you won't run into any major problems without GD. It'll be a problem if you want to add Drupal modules later which can automatically resize images you upload. But if you don't need to do that, I wouldn't worry for now.

Does that help? Shout if you need anything else :)

Mark
flet.org

sdad’s picture

I believe that this website will be quite image intensive. This is a family site, and there are a number of shutter bugs within the clan. More importantly though, this whole venture is instructional for me. I want to learn as much as I can, even if not applicable immediately, I'd like to go through the exercise, just to do it.

Barry Demers

Mark Nielsen’s picture

OK - well, it sounds like you're going to need to get GD installed on your server - or else move to a server that supports it. What's your situation with hosting?

Mark
flet.org

sdad’s picture

I'll be handling the hosting. This is going to be a Community site for next of kin only. Pictures, addresses, events, calendars, blah, blah, blah. I'm shooting for about 33 1/3% up time ;>)

Barry Demers

VM’s picture

Those who can give more information on this will need more information from you, since you are your own host.

what OS ?

if unix, what flavor ? debian, unbutu ...... so on so forth

it is probably just a setting you missed during installation..

sdad’s picture

I am using Ubuntu 6.10 server. The install was supposed to be a LAMP, but I ended up having to install Apache, Mysql, and PHP separately after the fact. I followed the outline given in the documentation, making adjustments for version number along the way. Apparently the GD library was not part of the manual install procedure. So I want to put it in. I don't want to have modules fail because of dependencies. Like I've said though, I don't quite see how this is done since all I'm reading talks about compiling into PHP4, while I am using PHP5. Recompiling PHP5 to accommodate GD just doesn't seem right to me. If GD is significant enough to Drupal, I have to believe that some mention would have been made about this issue along the way. No, I must be missing something, someway to get this library recognized without having to recompile.

Barry Demers

VM’s picture

it can't be done without a recompile and restart from what i understand. You may get a faster definitive answer on the Unbutu forums with regards to that. I don't run my own server although I do have a local copy of XAMMP running.

sdad’s picture

Oh, now that makes me real sad.

Barry Demers

VM’s picture

consider it a stepping stone in the learning process, you now know more than you did yesterday : )

mjohnq3’s picture

Did you check to see if the GD Module is in the php/ext directory? Under Unix/Linux it's probably called gd2.so. If it is there check to see if it's been enabled in PHP configuration file under Extensions. The syntax should be extension=gd2.so, if I remember the Unix/Linux setting correctly.

pelikan2402’s picture

Exactly! What you need to do is enable extension=php_gd2.dll in PHP.INI
thanks

twohills’s picture

no that's the windows syntax

yelvington’s picture

You didn't say whether you installed PHP/MySQL from Ubuntu packages or from source. If the former, install the php5-gd package. If the latter, reconfigure --with-gd and recompile.

faqing’s picture

Install GD support php5-gd in Ubuntu
-----------------
Just type following command to install this module:

$ sudo apt-get install php5-gd

Restart Apache
# sudo /etc/init.d/apache2 restart

for detail, check here:
Install Ubuntu Server on Ubuntu GNOME Desktop to run Drupal
http://www.thanhsiang.org/faqing/node/51

sammons’s picture

I seem to be in the same situation, however I installed PHP using the latest LAMP install, so I have PHP 5.1.6.

when I do a sudo apt-get install php5-gd it tells me that I already have the latest version installed. but my drupal still tells me "GD library Not installed
The GD library for PHP is missing or outdated. Please check the PHP image documentation for information on how to correct this."

so i'm stuck and don't knwo what to do.

:o) Phil

------------------------------------------------------------------------------------------------
The two most abundant elements in the world are Hydrogen and stupidity.

faqing’s picture

I am not sure about your problem. Try to check php.ini file whether the "extension=php_gd2" is enabled. In php.ini ifle, there is one line related to gd extension.

jackhutton’s picture

I installed a local openpublic profile and kept getting this error. your fix / instructions helped me out.. thank you

''The secret though is just keep walking through life without analyzing it too much or clinging to it too much. Just walk on.'' - Marilyn Silverstone, Magnum Photographer & Buddhist Nun, b. March 9, 1929, October 1999.

Ross Bennett’s picture

That's exactly what I needed. No recompile needed, just needed the module installed and it was loaded dynamically at the next restart.

Thanks very much for the pointer. That was the last of my status issues.

Ross (a total drupal newbie)

DaveMere’s picture

Had the same problem - adding a new dll and changing the ini file was a load easier than reinstalling.

Real useful thread, thanks.

castudil’s picture

now my drupal is at 100% on my ubuntu dapper :)
Thank you!

bmcgee’s picture

Feisty (7.04) server. Drupal 5.1

Thanks!

bmcgee’s picture

Thanks again

davidpburdette’s picture

I'm running a Fedora Core system which didn't have apt on it. But "yum install php-gd" did the trick.

Sometimes all you need is a clue... :-)

-dpb-

joachim’s picture

That did the trick on Ubuntu 7.10.
Thanks!

stoczko’s picture

I followed these steps, restarted apache2, and voila! all working and up to date.

Struggled with this for quite awhile, before getting this nice & easy solution.

Thanks!!

Shashwat Purav’s picture

Worked for me. :)

Thank You,
Shashwat Purav

garg_art’s picture

I am an old man and a newb like just arrived on linux world. And installed linux and drupal and this just removed the last hurdle of GD alert. I am still wondering how to get cron up by themselves and what would they be for a standard drupal. Second item I still need to find is how to set up a simple email so that drupal can send and receive emails.

Like your style of spoonfeeding. Works for people like me.

iyan’s picture

Just in case you haven't found how to make Cron up for themselves, you can use this module http://drupal.org/project/poormanscron

Kipp Elliott Watson’s picture

I had this same problem. I use Windows XP and basically the latest versions of PHP, Apache, MySQL and Drupal. I went to the Windows XP control panel where you can add or change installed programs. I found the line(s) for PHP and selected change. A lovely window popped up and it was a piece of cake to find the GD2 module that was not installed by default. I selected this one module from the change application and everything was hunky dory after that (I even remembered to restart the Apache Server this time!). I hope this helps you.

Oh, I forgot to mention you may have to edit a line or two in php.ini. I have not actually confirmed this because I had edited this file before I came up with this fix.

Kipp Elliott Watson

for free downloads of award-winning information management software products, visit www.whistlingcow.com and www.kronolog.com

herfjonez’s picture

On my Debian 4.0 Etch system with the latest Drupal (5.x) and php4,
I needed to:

$ sudo apt-get install php4-gd

and I did a:
$ sudo /etc/init.d/apache2 reload

for good measure. I did not need to edit php.ini.

-hj

Lloyd Standish’s picture

I also have Debian Etch, Drupal 5.2, php4, but I did have to edit php.ini to enable gd.

Sakrecoer’s picture

i'm might sound stupid, but i'm not to fit with all this:
where is this php.ini file located?

thanks in advance!

/reSet

open your mind open the source
express yourself, share your tools

VM’s picture

depends on your system really. Sometimes there is more than one. Check your PHP documentation. or scan your folders for php.ini
may also do a phpinfo() from your webroot to find its location.

more information about how to use phpinfo() found in the first comment in this thread.

SeanA’s picture

All config files are usually found somewhere under /etc.

web_peon’s picture

Thanks for the help.

edelarey’s picture

[PHP_GD2]
extension=php_gd2.dll

To get the GD Library functioning in PHP the above must be added to the PHP.ini file.

It is not enough to have only the line: extension=php_gd2.dll

It Seems the tag [PHP_GD2] is vitally important.

This line is added by changing the PHP setup from change/Remove programs in windows setup.
I presume it is not doing any other configuration.

I encountered this problem because I added GD library support after PHP install and configuration.

mattrweaver’s picture

I found this post and it solved my problem. I was going nuts trying to figure out why I couldn't get PHP to read php_gd2.dll. Going in through the control panel and change/remove programs was the key.

Thanks!

mrweaver

Finished products are for decadent minds. -- Isaac Asimov

Finished products are for decadent minds. -- Isaac Asimov

Dharmendra.s’s picture

Can you define me exacltly what is the path where i can enable GD library in PHP.ini
i m usung window xp

daniel_h’s picture

In you (the reader who googled to this page with the same issue) are using a ...
WAMP Server
... for local testing, you merely need to uncomment the
;extension=php_gd2.dll
line in your php.ini file. The .dll is already there.
Have fun.

Tony Budak’s picture

Newbie here, using WAMP, I don't know how to uncomment the ;extension=php_gd2.dll

Please explain?

Cheers,
Tony
www.clnews.org

Karel’s picture

Remove ; (in php.ini, comments are sometimes semicolons ; not #)

jreed510’s picture

I tried uncommenting ;extension=php_gd2.dll but it did not help me. Based on the comments above I'm guessing this extension only applies to windows? I'm running Leopard. Does anyone have any fixes that work for OS 10.5?

Thanks

tienuzz’s picture

Using my own at home server, ubuntu 8.04 server.

PHP 5.2.4

I changed the php.ini (/etc/php5/apache2/php.ini)

I gave this pathname on this row that can be found in the php.ini:

;Directory in witch the loadable extensions (modules) reside.
extensions_dir = "usr/lib/php5/20060513+lfs/"

In this dir is the gd.so located used by drupal.

Grz Mrt

Djamu’s picture

Changing this is quite useless actually -you probably forgot to reload apache(2) after installing the stock GD libs. Any module inside /usr/lib/php5/ is considered a valid location.
You can check loading of the modules by typing > sudo dpkg -L php5-gd

teh_catt’s picture

for info I also had to add in a line in my php.ini file to load the extension before this solution worked:

extension=gd.so

then restarted apache2 and bingo all my lovely thumbs have returned.

Djamu’s picture

Following only applies to debian / ubuntu installations, and will install the complete bundled ( forked ) GD libraries.

Installing the stock php5-gd ( apt-get install php5-gd ) package only installs the Boutell's version of GD library -the non forked php version- ( so no imagerotate etc... goodness )

So there's 2 alternatives
1. Compiling bundled forked version > which is not for the occasional CLI user.
2. The easy way > install a pre-compiled version in 3 easy steps.
Open a command line interface & add following 2 lines to /etc/apt/sources.lst

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

then run > apt-get update
run > apt-get install php5-gd
( it will complain about non-authenticated sources .. just ignore, it will also update some additional php libs , keep local modified php.ini )

run > /etc/init.d/apache2 restart

done ... you'll enjoy this one

modified packages come from > http://www.dotdeb.org/ > they provide upgraded packages for LAMP stacks

Djamu

--------------------------------------------------------------------------------------------------------------------------------
Windows, the only virus you pay for
http://3d.uk.to

jordiestrada’s picture

The solution works great.

Francewhoa’s picture

Thanks Djamu your solution works for me.

Here is the steps for Ubuntu Server 8.04.1 and PHP5. Like Djamu said it will install a GD pre-compiled working version. It is a complete bundled (forked) GD libraries:

1. If not already done removing your current GD package and its configurations.
sudo apt-get --purge remove

2. Adding 2 lines to your file /etc/apt/sources.lst

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

3. Updating your current apt-get list
apt-get update

4. Installing working GD package.
apt-get install php5-gd

It will complain about non-authenticated sources, just ignore, it will also update some additional php libs.

When prompt select keep_current modified php.ini

5. Restarting Apache
/etc/init.d/apache2 restart

Enjoy

---

How to contribute to Drupal.

Loving back your Drupal community result in multiple benefits for you  
_av_’s picture

Thanks Djamu for php5-gd

and

onopoc for the link from php.net/manual/en/image.installation.php

vjamilloux’s picture

Hi,

Thank Djamu, the indications about the installation of the bundled GD package are ok.
To verify if the GD - PHP library is really included in the server, display the phpinfo(). You find several things :
* additional .ini files parsed presente where are the .ini files are in the file system
* In PHP core configuration, there are the expose_php directive = on and the extension_dir directive presente the path directory where the extention libraries are.
* there a "gd" table with its settings
Bye
Véronique

mattgilbert’s picture

I thought that this didn't work, until I realized that for me I needed to modify sources.list (with an "i"), not sources.lst. I'm pretty sure sources.lst didn't exist before I tried this.

Thanks!

SeanA’s picture

Yep, sources.lst was a typo... On debian-based distros the repositories for apt are listed in /etc/apt/sources.list. Remember to apt-get update after modifying this file to load in the new package lists!

lakbaytaodev’s picture

Thanks you so much for this wonderful information. Hope to run my Drupal application that needs this kind of stuff.

steve02476’s picture

I have a feeling that Onopoc's message from November 21, 2008 will fix my problem, but it makes me a little nervous also.

I have an Ubuntu 8.10 (Intrepid Ibex) system running Drupal 6.10 very nicely. But, in my Drupal Status window, I get the complaint:

GD Image Filtering Low Quality / Poor Performance
The installed version of PHP GD does not support image filtering(desaturate, blur, negate, etc). It was probably compiled using the official GD libraries from http://www.libgd.org instead of the GD library bundled with PHP.

I'm an Ubuntu/linux newbie as well as a Drupal newbie, but it sounds like steps 1,2, and 3 will completely change where apt-get gets new stuff and updates for my Ubuntu box. Is this likely to be ok as time goes on, or will my Ubuntu machine start being pretty different from other Ubuntu machines out there? (Since I'm an Ubuntu dummy it helps me to keep it as close to a stock system as possible, when I need to figure out a problem.)

Is there a way I can follow the steps in the November 21 post, and then put my apt-get system back to the way that it was after I've fixed the GD issue? Or is there an alternate way of dealing with the problem without monkeying with the way apt-get works?

Thanks a ton, and I realize this is really much more of an Ubuntu question than a Drupal question, so I apologize in advance for posting it here.

lorraineflack’s picture

I followed onopocs suggestion. Ignored warnings. It crashed my server. Hmmm...
So I'm offline again, while I rollback.
It would be nice to find a painless working solution for the Imagefiltering & Imagerotation warnings.
This obviously wasn't it for me (debian etch, apache2, drupal6, imagecache).
Editing php.ini by wasn't it either.
Any more ideas?
Or maybe: just leave it alone?

Anonymous’s picture

This worked for me also, on Hosteurope's Linux XXL 3.0 package with Ubuntu 8.04. No risk, no crash.

seanr’s picture

You totally saved my day! Thank you very much!

Francewhoa’s picture

IMPORTANT: New steps for Ubuntu Server 8.04.x LTS can be found at http://drupal.org/node/540838

I can't edit my above post (#comment-1120427). So I wrote a handbook. I edited a few typos and added clarifications.

Loving back your Drupal community result in multiple benefits for you  
techypaul’s picture

Thank you, exactly what I needed.
P.

Eli-T’s picture

I was quite worried by the time I made it that far down the page, but that worked great for my Ubuntu 8 install.

rocannon’s picture

thanks for the dotdeb.org referral. worked easily.

madra’s picture

thanks for this. been banging my head against a wall for ages here - trying to get PHP to recognise that damned gd_lib.

your suggestion worked first time for me on ubuntu jaunty

one thing tho'. on my server anyway, the sources list file is at /etc/apt/sources.list not /etc/apt/sources.lst

Macronomicus’s picture

Dont do this on Ubuntu!

After adding those dotdeb sources and running apt-get update/upgrade commands it will switch your php and mysql to the dotdeb versions ... which are most definitely not for ubuntu! This will mess a lot of things up because they have different directories for a ton of files ... and unless you want to go and change a bunch of stuff by hand its not worth the bother.

It was pain in the but to remove the cruft from dotdeb on my dev server! Mehh!

norio’s picture

Great resource! Thank you :)

ejwensley’s picture

I'm running IIS7/PHP5/Drupal6.4. I was having this same problem, even though the gd extension was uncommented in php.ini. I found a section earlier on in php.ini:
[gd]
; Tell the jpeg decode to libjpeg warnings and try to create
; a gd image. The warning will then be displayed as notices
; disabled by default
; gd.jpeg_ignore_warning = 0

What solved the problem for me was uncommenting the last line so it looked like this:
[gd]
; Tell the jpeg decode to libjpeg warnings and try to create
; a gd image. The warning will then be displayed as notices
; disabled by default
gd.jpeg_ignore_warning = 0

After that the error went away. I'm not sure what that line does, but drupal no longer complains about gd anymore.

jcrispin’s picture

All,
I have tried everything in this blog to get rid of this error and nothing has worked. I have Mac OS 10.5.6 PHP version 5.2.6 I enabled the extension=php_gd2.dll in the php.ini file and still nothing works. ANY help would be greatly appreciated. Thanks!

Djamu’s picture

Hi jcrispin, a little late perhaps

there's a couple of windoz users that don't explicitly state they're on mmm windoz....
anything that ends on .dll is for windows & will never work on OSX / Linux ( well at least not without wine ... but don't go that route > just ignore all posts windows related.

vivianspencer’s picture

jdwfly’s picture

I followed that how to and it worked for me on a Ubuntu 9.04 Server.

WebmistressM’s picture

I tried both this:
http://www.php.net/manual/en/image.installation.php#90295

and this:
http://cumu.li/2008/5/13/recompiling-php5-with-bundled-support-for-gd-on...

No luck. Im still getting this error. Im a Hardy Heron user (non-Ubuntu server, but I am of course using LAMP). In the second step, I get stuck after download. I ran:

cd php5-5.2.3

and got "no such file or directory"

Any ideas?

Fleshgrinder’s picture

Just do exactly what Onopoc wrote in his comment: http://drupal.org/node/134331#comment-1120427

steve02476’s picture

From July 5, 2009:

I've also had good luck with the procedure shown by http://drupal.org/node/134331#comment-1120427

I've been running for weeks now that way, and everything has worked smoothly.

One thing I did a little different, was after doing the upgrade, I then removed the two new lines in sources.list, so that I wasn't continuing to get updates from dot-deb

I don't know if that was a good idea or not, but so far so good.

From October 1, 2009

As of October 1, 2009, I would still say that everything's working smoothly on my Ubuntu 8.10 (Ibex) system. However, I just noticed that my PHP version is still at 5.2.9-0.dotdeb.2 and my security people want me to upgrade to PHP v5.2.11. Although Ubuntu has been busy self-updating itself in general, clearly that didn't happen with the PHP because of this procedure. So, I think I will again do the procedure in http://drupal.org/node/134331#comment-1120427 and again, I will remove those two lines afterwards. I'll post an update later to say how it worked.

From November 2, 2009

As of today, this procedure still seems to be working fine, but the snag with my variation of removing the two lines from my source.list after doing the manual upgrade seems to mean that neither Apache nor PHP gets automatically upgraded when the Ubuntu self-update happens. So, this time I'm just going to try and leave those two lines in.

Francewhoa’s picture

IMPORTANT: New steps for Ubuntu Server 8.04.x LTS can be found at http://drupal.org/node/540838

I can't edit my post (#comment-1120427). So I wrote a handbook. I edited a few typos and added clarifications.

Loving back your Drupal community result in multiple benefits for you  
Macronomicus’s picture

Dont do this on Ubuntu!

After adding those dotdeb sources and running apt-get update/upgrade commands it will switch your php to the dotdeb versions ... which is definitely not for ubuntu! This will mess a lot of things up because they have different directories for a some files ... and unless you want to go and change a bunch of stuff by hand its not worth the bother. For instance PECL was rendered useless among other things.

If you read around in dotdeb.org .. they say to not use their sources for ubuntu unless you feel like mucking about a bunch when weird errors arise.

Use this instead http://www.howtoforge.com/recompiling-php5-with-bundled-support-for-gd-o...

vivianspencer’s picture

That's why I suggested an alternative: http://drupal.org/node/134331#comment-1689734

encho’s picture

That worked for me on Lenny.

zinasahib’s picture

Hi,
I ran into the same issue, I found what worked for me in this link:
http://drupal.org/node/256876
since I am running windows.
Hope it works for you too...

panthe’s picture

Hi,
I've try this solution in two system.
For one all is ok (very thank because this system was most important).
For another machine that we use for the production I've obtained some errors and this solution don't work for me.

php5-gd: Depends: phpapi-20060613+lfs
E: Damaged pockage

Have you some suggest?
Thanks
Luca Panteghini

DarrellDuane’s picture

On Fedora 13:

#yum -y install php-gd

fixed it.

Darrell Duane
d@duane.com

acy76’s picture

Adding the following to php.ini fixed the error in Ubuntu 10.04 (with downgraded php to karmic due to Drupal 6 issues):

extension=gd.so

Previous posts suggested incorrect extension names.

mvillara’s picture

I tried that and it didn't work. Maybe some library missing...

Miguel Angel
mavillar@b-markets.com
www.betsmarkets.com

phanophite’s picture

I fixed this on Windows 2000. I installed drupal 6.19 and gd was disabled in the php ini file. I removed the ';' from the beginning to activate gd and the issue was resolved.
extension=php_gd2.dll

phanophite’s picture

I ran into a similar issue installing Drupal 7 on a Ubuntu 10.04 LTS. To install the GD library I ran the following command:

sudo apt-get install php5 php5-gd

See this for more information.

webel’s picture

I have just migrated my local Drupal development platform from an old machine with Mac OS X Mountain Lion to a brand new (and most lovely) MacBook Pro with Mac OS X Yosemite and discovered that the default version of PHP5 (and Apache2) for Mac OS X Yosemite 10.10.1 does not have the GD graphics manipulation libraries installed (the gd.so is missing).

Given that the default Apple versions are not easily extended, it is worth installing separate PHP5 and Apache2 under package control, for which I used MacPorts (one could also use Homebrew). I have a step-by-step guide here:

Mac OS X Yosemite: how to install (non-Apple) PHP5 and Apache2 HTTP Server for Drupal with MacPorts, including GD graphics support

Comments are not accepted on that site, relevant replies w.r.t. the guide are welcome here.

Webel IT Australia, "Elements of the Web", Scientific IT Consultancy,
For PHP-driven Drupal CMS web sites, Enterprise Java, graphical UML, UML Parsing Analysis, SysML, XML.