Forum

Thread tagged as: Question, Problem, Error

Perch fatal error

I have a shared region on my dev site which had content within it prior to updating from Perch Runway 3.0.3. Now if I go into the shared region and edit an item, I get the following error upon saving:

Fatal error: Uncaught Error: Call to undefined function imagecreatefromjpeg() in /var/www/html/perch/core/lib/PerchImage.class.php:623 Stack trace: #0 /var/www/html/perch/core/lib/PerchImage.class.php(288): PerchImage->resize_with_gd('/var/www/html/p...', '/var/www/html/p...', 720, 405, 0, 0, 0, 0) #1 /var/www/html/perch/core/lib/PerchFieldTypes.class.php(1324): PerchImage->resize_image('/var/www/html/p...', '720', '720', false) #2 /var/www/html/perch/core/apps/content/PerchContent_Util.class.php(279): PerchFieldType_image->get_raw(Array, Object(PerchContent_Item)) #3 /var/www/html/perch/core/apps/content/modes/edit.form.pre.php(156): PerchContent_Util::read_items_from_post(Object(PerchContent_Item), Array, '', Array, Array, Object(PerchForm), ' x\nbcvb\nvcb\ncvb...', Array, Object(PerchResources), false, Object(PerchTemplate)) #4 /var/www/html/perch/core/apps/content/modes/edit.pre.php(62): include('/var/www/html/p...') #5 /var/www/html/perch/core/apps/content/edit/index.php(22): include('/var/www/html/p...') #6 {main} in /var/www/html/perch/core/lib/PerchImage.class.php on line 623

I tried deleting them all out and entering some new test data, thinking perhaps there were some issues with the existing entries, though the error persists.

My shared region uses this as a template:

<perch:content id="client_text" type="textarea" markdown="true" editor="markitup" label="Client testimonial" size="m autowidth" />
<perch:content id="client_img" type="image" label="Client image" width="720" height="720" crop="true" />
<perch:content id="client_name" type="text" label="Client name" />

Diagnostics

    Perch Runway: 3.0.4, PHP: 7.1.3, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $, with PDO
    Server OS: Linux, apache2handler
    Installed apps: content (3.0.4), assets (3.0.4), categories (3.0.4), perch_blog (5.5.1), perch_forms (1.9), chirp_seo (1.1), perch_mailchimp (3.1)
    App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', 'perch_mailchimp', 'perch_blog', );
    PERCH_LOGINPATH: /perch
    PERCH_PATH: /var/www/html/perch
    PERCH_CORE: /var/www/html/perch/core
    PERCH_RESFILEPATH: /var/www/html/perch/resources
    Image manipulation: GD
    PHP limits: Max upload 8M, Max POST 8M, Memory: 128M, Total max file upload: 8M
    F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
    Resource folder writeable: Yes
    HTTP_HOST: localhost
    DOCUMENT_ROOT: /var/www/html
    REQUEST_URI: /perch/core/settings/diagnostics/
    SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Mathew Doidge

Mathew Doidge 2 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

imagecreatefromjpeg() is a PHP function - part of the GD library.

Duncan Revell

Duncan Revell 78 points
Registered Developer

Are you using Docker? I think the "Using Docker" thread had a discussion about a similar error.

Found it:

https://forum.grabaperch.com/forum/01-19-2017-using-docker-with-runway-discussion-thread