0

Seeing this message when tryig to upload an image.

Fatal error: Uncaught Error: Call to undefined function EllisLab\ExpressionEngine\Library\Mime\imagecreatefromstring() in /var/www/html/system/ee/EllisLab/ExpressionEngine/Library/Mime/MimeType.php:192 Stack trace: #0 /var/www/html/system/ee/legacy/libraries/Mime_type.php(121): EllisLab\ExpressionEngine\Library\Mime\MimeType->fileIsImage('/tmp/php3SUta2')

1 /var/www/html/system/ee/legacy/libraries/Upload.php(553): Mime_type->fileIsImage('/tmp/php3SUta2') #2

/var/www/html/system/ee/legacy/libraries/Upload.php(209): EE_Upload->is_allowed_filetype() #3 /var/www/html/system/ee/legacy/libraries/Filemanager.php(1890): EE_Upload->do_upload('file') #4 /var/www/html/system/ee/legacy/libraries/Filemanager.php(1024): Filemanager->_upload_file(Array, 'file') #5 /var/www/html/system/ee/EllisLab/ExpressionEngine/Service/File/Upload.php(299): Filemanager->upload_file('7', 'file') #6 /var/www/html/system/ee/EllisLab/ExpressionEngine/Controller/Files/Files.php(138): EllisLab\ExpressionEngine\Service\File\Upload->uploadTo('7') #7 [interna in /var/www/html/system/ee/EllisLab/ExpressionEngine/Library/Mime/MimeType.php on line 192

Uploads work fine on my development and staging areas, but not on production. So might be something to do with the server config?

Not sure, first time i've seen this error...

Other similar queires point to making sure fileinfo in exanbles, and it is.

enter image description here

1

SOLVED

Reason was PHP GD was not installed. Fixed by running the following on the server:

sudo apt-get install php-gd

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.