Forum

Thread tagged as: Problem, Error, Hosting

Internal Server Error When Uploading PDFs

Hi

I'm getting a similar error to https://forum.grabaperch.com/forum/12-17-2017-500-error-updating-a-page, however, this was working fine until we upgraded the site to Perch 3.

When I try to upload a PDF it comes back as an Internal Server Error.

Funny enough the PDF and page are getting uploaded / updated perfectly well, but if I view the assets the PDF thumbnail isn't displaying. As you can see, previous PDF uploads are so I don't know if this is connected?...

Perch assets screenshot

If I select a PDF where the thumbnail is displaying, it works perfectly, only when I select the thumbnail that isn't displaying I get the 500 error.

Template...

     <div class="col-xs-6 col-sm-4 col-md-3">
        <div class="text-center doc-thumb">
         <a href="<perch:content id="docFile" type="file" label="PDF Document" bucket="documents" />" target="_blank" class="equal-height">
          <img src="<perch:content id="docFile" replace=".pdf|-w150h150@2x.jpg" />" alt="<perch:content id="docTitle" type="text" size="xl" label="Document Title" />" class="client-logo">
         <br>
         <perch:content id="docTitle" />
          </a>
      </div>
    </div>

Diagnostics...

Perch: 3.1.1, PHP: 7.0.30, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (3.1.1), assets (3.1.1), categories (3.1.1), perch_forms (1.11)
App runtimes: <?php $apps_list = [ 'perch_forms', ];
PERCH_LOGINPATH: /cms
PERCH_PATH: /home/eoc/YWY3GABL/htdocs/perch/cms
PERCH_CORE: /home/eoc/YWY3GABL/htdocs/perch/cms/core
PERCH_RESFILEPATH: /home/eoc/YWY3GABL/htdocs/perch/cms/resources
Image manipulation: GD Imagick
PHP limits: Max upload 128M, Max POST 128M, Memory: 256M, Total max file upload: 128M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
HTTP_HOST: eocservices.co.uk
DOCUMENT_ROOT: /home/eoc/YWY3GABL/htdocs/perch/
REQUEST_URI: /cms/core/settings/diagnostics/
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php

Debug...

Debug Message - Perch 3.1.1
[1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='2f34eeda0c6c94374cd77ed96e3a6659' LIMIT 1
UPDATE perch2_users SET userHash='437237a7d91e1e1ab20623d8169c42af' WHERE userID='1'
[26] SELECT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID ASC
[7] SELECT itemValue FROM perch2_menu_items WHERE itemType='app'
[1] SELECT * FROM perch2_content_regions WHERE regionID=218 LIMIT 1
[1] SELECT * FROM perch2_pages WHERE pageID='32' LIMIT 1
Using template: /templates/content/documents.html
[1] SELECT * FROM perch2_content_items c WHERE c.regionID=218 AND c.itemRev=83 AND c.itemID=320 ORDER BY c.itemOrder ASC
Using template: /templates/content/documents.html
Form not posted or did not validate
[1] SELECT mi.*, p.privKey FROM perch2_menu_items mi LEFT JOIN perch2_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=0 ORDER BY itemOrder ASC LIMIT 0, 1
[2] SELECT mi.*, p.privKey FROM perch2_menu_items mi LEFT JOIN perch2_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=1 ORDER BY mi.itemOrder ASC
[1] SELECT itemTitle FROM perch2_menu_items WHERE itemType='app' AND itemValue='content' LIMIT 1
[1] SELECT mi.*, p.privKey FROM perch2_menu_items mi LEFT JOIN perch2_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=0 ORDER BY itemOrder ASC LIMIT 1, 10
[2] SELECT mi.*, p.privKey FROM perch2_menu_items mi LEFT JOIN perch2_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=2 ORDER BY mi.itemOrder ASC
File: /core/apps/content/modes/edit.form.post.php
[1] SELECT * FROM perch2_resources WHERE resourceID='600' LIMIT 1
Mode: edit.form
Queries: 14
Memory: 3.4822
Glen Piggott

Glen Piggott 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you checked the error log to see what the error you're getting is?

Am facing this problem too, whenever am trying to upload PDFs in my account an error window is being shown and then the tap automatically disables. Thanks in advance for your help.Thanks and Regards, https://pandahelper.me/ https://emu4ios.biz/ https://getgbwhatsapp.biz/