Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

PHP GD JPEG support problem

Discussion in 'General Discussion' started by wkdwich, Jul 21, 2005.

  1. wkdwich

    wkdwich Well-Known Member

    Apr 11, 2005
    Likes Received:
    Trophy Points:
    I installed via Fantastico OpenRealty and am having probles uploading images.

    An image size thread @ is not the issue here.. it is the lack of JPEG support in PHP

    I can upload HIF files but not JPEG

    the error is:
    Call to undefined function: imagecreatefromjpeg()

    gd is installed.. I made the change to the php.ini as described both here and in the openrealty forums.. adding a line there that says

    another thread I found googling says uncomment:
    but that isnt there at all and I am told this applies to a Windows box not a LINUX box

    ok so now (didnt see this earlier..) I went into phpmyadmin and searched for gd..

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

    so jpg is not enabled.. GIF is not JPG..

    The libaray is there..
    /usr/lib/ says:
    0. Make sure you have libjpeg and libpng installed
    1. Grab GD-2.0.1.
    2. tar zxvf gd-2.0.1.tar.gz
    3. cd gd-2.0.1
    4. Edit the Makefile and change the LIBS line to be:
    LIBS=libgd.a -lpng -lz -ljpeg -lfreetype -lm
    5. make libgd.a (don't need to do a make install)
    6. Now build PHP using these flags:
    --enable-gd-native-ttf (for PHP 4.0.6 leave off trailing 'f')

    Now I can't say how it was built, the hosting company did it.. but they knew that was the reason we recompiled.. I called them today and discussed this at length and he said something to the effect that the CPanel build is the problem..

    I don't want to recompile again.. I'm hoping that there is a line I can insert in the php,ini file to get this to work.. I;m going to post this to the cpanel forums as well..
    #1 wkdwich, Jul 21, 2005
    Last edited: Jul 21, 2005
  2. Sinewy

    Sinewy Well-Known Member

    May 15, 2004
    Likes Received:
    Trophy Points:
    Sydney, Australia
    cPanel Access Level:
    DataCenter Provider
    You will definitely need to recompile it.

    Uncommenting the php_gd2.dll line in php.ini will not do anything as that is for windows only.

    I am quite happy to recompile your php for you if you would like it done. It shouldn't have anything to do with the cPanel build.

  3. wkdwich

    wkdwich Well-Known Member

    Apr 11, 2005
    Likes Received:
    Trophy Points:
    Thanks for the offer, but the hosting guys said they would do it if I needed it.. They are quite confused as to why there is no option in the cpanel install to include this library tho and the one tech I spoke to was a little hesitant about doing it.. I;m a little leery of having others in my server though.. so I'll have to pass on your offer right now

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice