Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hello everyone I am trying to enable GD in my installation of PHP in my CentOS 6.3 machine running lighttpd as the web server. I have done yum install gd gd-php and when I run php -i I get

    gd
    GD Support => enabled
    GD Version => bundled (2.0.34 compatible)
    FreeType Support => enabled
    FreeType Linkage => with freetype
    FreeType Version => 2.3.11
    GIF Read Support => enabled
    GIF Create Support => enabled
    JPEG Support => enabled
    libJPEG Version => 6b
    PNG Support => enabled
    libPNG Version => 1.2.49
    WBMP Support => enabled
    XPM Support => enabled
    XBM Support => enabled`

So it is definitely there, php -m also shows gd but then when I run phpinfo(); There is no section for GD and under Configure Command I have this: --without-gd.

What are my options here? I've tried removing and reinstalling rpms, restarting lighttpd, other repositories and all sorts of things but no luck... any ideas? I am trying to setup a CMS that uses GD and I can't proceed with the installation because I don't have GD.

share|improve this question
1  
Seems like a multiple php install. –  Marcel Apr 4 '13 at 15:28

1 Answer 1

The gd-php adds the php module for gd. It is not compiled into php, which is why you see the --without-gd in the info.

It sounds like you never restarted lighttpd or php-fpm (if that is how you set it up).

I have seen instances where a simple restart of lighttpd won't kill the php-fcgi threads, which cause it to use the old php configuration even after service lighttpd restart. So if a simple restart fails, do a full stop, ensure that no php processes are running, and start it back up.

share|improve this answer
    
Awesome thanks!! I killed all the php processes manually and then rebooted my server and GD magically showed up! Thank you! –  rii Apr 5 '13 at 4:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.