Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable imagecreatefromgif/imagecreatefromjpeg/imagecreatefrompng in PHP?

Tags:

php

It now gives:

PHP Fatal error:  Call to undefined function imagecreatefromjpeg()

But the gd library is enabled.

like image 440
another Avatar asked Nov 02 '09 02:11

another


2 Answers

Install php5-gd:

on deb-based system:

sudo apt-get install php5-gd

If you are using php-fpm then restart it:

sudo /etc/init.d/php5-fpm restart

Found this solution here

like image 149
druss Avatar answered Oct 03 '22 18:10

druss


Read http://www.php.net/manual/en/function.imagecreatefromjpeg.php#70832

It might be that your JPEG library is not enabled.

like image 32
mauris Avatar answered Oct 03 '22 20:10

mauris