The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP and GD

Discussion in 'General Discussion' started by Mat-d-rat, Apr 21, 2005.

  1. Mat-d-rat

    Mat-d-rat Well-Known Member

    Joined:
    Jul 30, 2003
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    I've recently had mailscanner installed, and in the reports, everytime I run them it says "JpGraph Error: Your PHP installation does not seem to have the required GD library. Please see the PHP documentation on how to install and enable the GD library.". Did some searching on here and the solution seems simple, rebuild apahce and tick the GD box int he php modules... Well I've done that and the same?! ANy ideas?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Mat,

    You could have asked on our helpdesk ;)

    You can do one of two things:

    1. Upgrade cPanel to the latest RELEASE tree which has GD compiled into the php binary that WHM uses

    2. you can compile it in manually:

    You can recompile the WHM PHP with GD support by editing:

    /scripts/makecpphp

    and after this line:

    "$PGSQL " .

    add this one:

    "--with-gd " .

    Note the space before the last close quotes. Then run the script.
     
  3. Mat-d-rat

    Mat-d-rat Well-Known Member

    Joined:
    Jul 30, 2003
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Wasn't sure if that would come under that or not :( feel free to login and sort it though :). BTW my brother almost kissed me today after he saw how little spam was now getting to his acocunt!
     
  4. styer

    styer Member

    Joined:
    Aug 26, 2005
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I need to upgrade my cpanel with PHP 4.4.0 at least, because several my client's programm needs php 4.4.0 ecspecially at GD module (their previous webhost has it).

    Please let me know step by step how to do it.

    Thanks and i appreciate it..

    St.

    This is my : makecpphp

    Code:
    
    #!/usr/bin/perl
    
    use POSIX;
    
    my($sysname, $nodename, $release, $version, $machine) = POSIX::uname();
    
    
    my $PHPV='4.3.10';
    
    if (-e "/usr/lib64/libpq.so" || -e "/usr/lib/libpq.so" ||
            -e "/usr/local/lib/libpq.so") {
            $PGSQL = ' --with-pgsql ';
    }
    
    $MYSQL='--with-mysql';
    if (-e "/usr/local/bin/mysql") {
            $MYSQL='--with-mysql=/usr/local';
    }
    if (-e "/usr/bin/mysql") {
            $MYSQL='--with-mysql=/usr';
    }
    
    $hasssl = `grep ssl_onceonlyinit /usr/lib/libc-client.a 2>/dev/null`;
    chomp($hasssl);
    if ($hasssl eq "") {
            if (-e "/etc/krb5.conf") {
                    $IMAPFLAGS = " --with-kerberos ";
            }
    } else {
            if (-e "/etc/krb5.conf") {
                    $IMAPFLAGS = " --with-imap-ssl --with-kerberos ";
            }
    }
    
    
    if ($sysname =~ /freebsd/i) {
            system("rm -f /usr/local/cpanel/lib/lib*");
    }
    
    system("/scripts/checkccompiler");
    system("rm -rf /home/cpphpbuild");
    system("mkdir /home/cpphpbuild");
    chdir("/home/cpphpbuild");
    if (-e "/usr/bin/fetch" || -e "/usr/local/bin/fetch") {
            system("fetch","-o","php-${PHPV}.tar.gz","http://layer1.cpanel.net/buildapache/1/php-${PHPV}.tar.gz");
    } else {
            system("wget","-O","php-${PHPV}.tar.gz","http://layer1.cpanel.net/buildapache/1/php-${PHPV}.tar.gz");
    }
    system("tar xfzv php-${PHPV}.tar.gz");
    chdir("php-${PHPV}") || die "Could not download php";
    
    $conf = "./configure --enable-static " .
    "--with-iconv --enable-mbstring --with-mbstring=all" .
    "--enable-mbstr-enc-trans --with-gd --with-dom " .
    "--enable-mbregex --with-zlib " .
    "--with-imap $IMAPFLAGS --enable-ftp --with-gettext --with-xml " .
    "--enable-track-vars --enable-sockets $MYSQL " .
    "$PGSQL " .
    "--with-config-file-path=/usr/local/cpanel/3rdparty/etc " .
    "--prefix=/usr/local/cpanel/3rdparty";
    
    system($conf);
    open(SS,">>","main/php_config.h");
    print SS "#define HAVE_SENDMAIL 1\n";
    close(SS);
    system("make");
    system("make","install");
    
    system("/scripts/findphpversion");
    
    
    
    
     
    #4 styer, Aug 31, 2005
    Last edited: Aug 31, 2005
  5. ecwebtechie

    ecwebtechie Well-Known Member

    Joined:
    Mar 22, 2005
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    take a backup of httpd.conf file

    Login in to WHM

    and under

    and then

    Main >> Software >> Apache Update

    choose php 4.4.0 and GD module

    and start the build
     
Loading...

Share This Page