Gd installed, but "Call to undefined function imagecreatefromjpeg()"

gd, php

Solution

It appears that while GD is indeed supported that it was not compiled with libjpeg. The gd.jpeg_ignore_warning does not mean that you have jpeg support. If this is your own server make sure to run configure with `--with-jpeg-dir`. You may have to search for it. I used the command `find / -name libjpeg*` and got `/usr/lib` for CentOS5. If this a shared host have them install it for you.

My complete compilation of PHP is as follows:

wget http://us1.php.net/distributions/php-5.5.10.tar.gz -O php.tar.gz 
tar -xvf php.tar.gz
cd php-5.5.10
yum -y install libxml2-devel libmcrypt-devel libpng-devel
./configure --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d  --with-apxs2 --with-mysql --with-mysqli --with-zlib --with-curl --with-libdir=lib --with-openssl --with-pdo-mysql --with-mcrypt  --with-pcre-regex --enable-zip --with-gd --enable-mbstring --with-jpeg-dir=/usr/lib
make clean
make 
make install

Problem

Looks like my hosting has gd support, but i still get an error ( PHP Version 5.3.28 ) ``` Fatal error: Call to undefined function imagecreatefromjpeg() ``` Here is my phpinfo: ``` gd GD Support enabled GD Version bundled (2.1.0 compatible) GIF Read Support enabled GIF Create Support enabled PNG Support enabled libPNG Version 1.2.44 WBMP Support enabled XBM Support enabled Directive Local Value Master Value gd.jpeg_ignore_warning 0 0 ```

Original source