Jump to content

[SOLVED] Call to undefined function imagecreatefromjpeg()


jordanwb

Recommended Posts

I'm trying to use the class given http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php to resize a picture. But when I call the load function I get the error:

 

Fatal error: Call to undefined function imagecreatefromjpeg() in /var/www/photos/system/photo_resize.php on line 31

 

Now I think I have to include some module, but I don't know what to do regarding that.

sudo apt-get install php5-gd

sudo /etc/init.d/apache2 restart

php5 -m | grep 'gd'

 

But now, there's a catch.  Ubuntu doesn't use the bundled GD library, they actually use the system's GD library, which lacks the imagerotate and imagefilter (and some other) functions.  If you need them, you need to change the package and reconfigure it which can take a good hour or hour and a half because it's a HUGE package.  If you need those functions, send me a PM.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.