Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Installing GD for PHP


    Hi everyone,

    I'm trying to install GD on my thread safe PHP installation.

    If I use the gd.so already on my machine I get the error:

    "Unable to load dynamic library '/usr/lib64/php/modules/gd.so' -
    /usr/lib64/php/modules/gd.so: undefined symbol: core_globals in Unknown
    on line 0"

    If I try to compile PHP (version 5.2.8 ) I get the errors:

    ext/gd/.libs/gd.o: In function `_php_image_convert':
    /root/src/php/php-5.2.8/ext/gd/gd.c:4994: undefined reference to `php_gd_gdImageCreateFromJpeg'
    ext/gd/.libs/gd.o: In function `_php_image_create_from':
    /root/src/php/php-5.2.8/ext/gd/gd.c:2683: undefined reference to `php_gd_gdImageCreateFromJpeg'
    ext/gd/.libs/gd.o: In function `zif_imagecreatefromjpeg':
    /root/src/php/php-5.2.8/ext/gd/gd.c:2727: undefined reference to `php_gd_gdImageCreateFromJpegCtx'
    /root/src/php/php-5.2.8/ext/gd/gd.c:2727: undefined reference to `php_gd_gdImageCreateFromJpeg'
    ext/gd/.libs/gd.o: In function `zif_imagecreatefromstring':
    /root/src/php/php-5.2.8/ext/gd/gd.c:2522: undefined reference to `php_gd_gdImageCreateFromJpegCtx'
    ext/gd/.libs/gd.o: In function `zif_imagejpeg':
    /root/src/php/php-5.2.8/ext/gd/gd.c:3007: undefined reference to `php_gd_gdImageJpegCtx'
    collect2: ld returned 1 exit status
    make: *** [sapi/cli/php] Error 1

    My configure line is ./configure
    --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd
    --with-libdir=/lib64 --enable-maintainer-zts

    I have run "yum install php-gd zlib libjpeg libpng libpng-devel
    libjpeg-devel php-devel"

    What is my next step?

    Eric Klien
    Lifeboat Foundation
    +1 (775) 329-0180 Voice
    +1 (775) 329-0190 Fax
    Skype ID lifeboathq
    Lifeboat Foundation: Safeguarding Humanity

  2. #2

    Smile Success!

    Based on
    MediaWiki thumbnail error Incomplete GD library configuration: missing function image - Page 2 - LinuxQuestions.org
    I did the following:

    I recompiled gd with:

    ./configure --prefix=/usr/local/gd
    make
    make install

    I then copied all the files in the three directories created under
    /usr/local/gd into the directory /usr/local/gd_full

    I then recompiled php with:

    ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd=/usr/local/gd_full --with-libdir=/lib64 --enable-maintainer-zts

    Note that when I tried --with-gd=/usr/local/gd it kept complaining that it
    couldn't find files so I created the gd_full directory as a solution.

    This generated a bunch of errors when I then ran make so based on
    http://bmearns.net/wwk/view/Installing_PHP I then ran "make clean; make".

    And now everything works!



    Eric Klien
    Lifeboat Foundation
    +1 (775) 329-0180 Voice
    +1 (775) 329-0190 Fax
    Skype ID lifeboathq
    Lifeboat Foundation: Safeguarding Humanity

  3. #3
    -->
    Hi!!
    Thank you!!
    I had just the same problem and with your instructions I solved alright!!
    Bye!!

$spacer_open
$spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •