Tuesday, March 15, 2022

[SOLVED] Call to undefined function imagecreatefromjpeg() and GD enabled

Issue

im working on ubuntu 14.04 LTS with PHP 5.5.9 with GD enabled and i doubled check with but still showing me this msg everytime i try to use imagecreatefromjpeg()

Fatal error: Call to undefined function imagecreatefromjpeg() in /../library/image.php on line 34

i even tried to check on it from command line by using this

php -r "var_dump(function_exists('imageantialias'));"

and it gives me back bool(false)

is there anyway to fix this without re compiling it?


Solution

I think you've installed an incomplete version of gd.
When you compile the gd extension, use the flag --with-jpeg-dir=DIR and --with-freetype-dir=DIR

ps. dont forget make clean

picture below is the incomplete version of gd:

enter image description here

picture below is the complete version of gd: enter image description here



Answered By - hiwjd0
Answer Checked By - Marilyn (WPSolving Volunteer)