php-gd installed but not working!

Discussion in 'Programming/Scripts' started by cooljai, May 19, 2007.

  1. cooljai

    cooljai New Member


    After striking my head here n there for hours, Im finally posting the problem here in hope for solution. I saw recent thread stating compilation of php with gd, but why I started new thread is that here php-gd is seems installed but not working. I apologies if I'm not following rules.

    Im using CentOS 4.4, here is output of 'uname -a':

    Linux 2.6.9-42.0.10.ELsmp #1 SMP Tue Feb 27 09:40:21 EST 2007 x86_64 x86_64 x86_64 GNU/Linux

    I've installed php, php-gd successfully via yum install php php-gd.
    Here's output of 'rpm -qa | grep php':


    It seems that php-gd is installed, but running page which contains its functions throwing error like:

    Fatal error: Call to undefined function: imagecreatetruecolor() in /var/www/html/image_resize.php on line 13

    There's no php-gd information in phpinfo output.

    Please help to resolve issue...


    ek chota mota hindustani
  2. Ben

    Ben ISPConfig Developer ISPConfig Developer

    can you check wether you find the line

    in either /etc/php.ini or any file in /etc/php.d ?

    If you run
    php -v

    you should find the lines
    Also you should find sth like "--with-gd=shared" in the configure command output of php -v

    If so, did you restart your apache after installing the php modules?
  3. cooljai

    cooljai New Member

    Still not installed


    thanks for reply. I've found "" in /etc/php.d/gd.ini
    here is the output of php -v

    PHP 4.4.6 (cli) (built: May 11 2007 14:03:44)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    I've restarted Apache.

    After getting no success with Yum install php php-gd (although it installed, but not running) I tried to compile it on myself.

    Even in source compilation, there were so many errors ( like not found, even after decteting its directory). That's was a bug in php

    After taking precautions as described in bug page, I got cheers!! PHP is installed with GD.

    - - - -
    ek chota mota hindustani
    - - - -
    Last edited: May 21, 2007

Share This Page