Centos and libgd

Hi guys
I have just moved a customer off my old 32bit box and onto my shiney new Virtualmin pro box (64bit) and all seemed to be going well. He used some image tool called gd and on the new box php doesnt seem to know about it. Is there any way i can get it working for him?

gd is installed but it is in the lib64 folder rather than the lib folder. Any ideas?



Hey Richy,

Sure, this one is easy (probably). Just run:

yum install php-gd

I believe I’ve even added this to the default install in the next version of the install.sh script.

If that doesn’t do the trick, come on back with the error you’re seeing and I’ll see what I can figure out.

I have installed that but the customer is still having problems.
When i view the old servers phpinfo.php about 3 quarters down the page it has a section specifically for GD, here is a copy and paste

GD Support enabled
GD Version bundled (2.0.28 compatible)
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

When i view my phpinfo.php on the current server it hasnt got that subsection. Sorry if i am not being very specific but im not sure what these sections are called.
Do i have to recompile php with gd installed?

Thanks for your help


Hey Richy,

Did you compile your own PHP? If so, then yes, and you need to install the gd-devel package (before rebuilding PHP). If you installed from RPM it should just work.

no i didnt, i just installed the script that came with the control panel, i might try and remove php and re-install it.


Hey Richy,

Are you sure php-gd actually installed?

rpm -q php-gd

Will tell you. I’m not really all that savvy about php…so I might be missing something that needs to be done to make it recognize the module, but you definitely shouldn’t have to reinstall php.

You probably do have to restart Apache, though, unless using php as a CGI script.

ok, fixed it.
I removed my php that was on there and re-installed a new one from the centos resources.

restarted the apache servers and it all works super smashing great.

Thanks for your help with it guys.

Much appreciated