We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Problem, Addons, Gallery

Gallery Image Upload

I have just started getting an error when trying to upload images into a gallery album. When I upload any image, it will look like it is working then give a yellow triangle with "HTTP Error". The image will upload into the resource folder but will not show. It also creates an entry in the perch3_gallery_images table. I have no idea how to troubleshoot this and can't say when it began. I have images that have been uploaded in the past.

The diagnostic is below but there is no template as it isn't even showing in the admin section:

Perch: 3.1.1, PHP: 5.6.34, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, 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), perch_gallery (2.8.9), perch_members (1.6.4)
App runtimes: <?php $apps_list = [ 'perch_members', 'perch_gallery', 'perch_forms' ];
PERCH_LOGINPATH: /admin
PERCH_PATH: /home/sweetsqu/public_html/ampd/admin
PERCH_CORE: /home/sweetsqu/public_html/ampd/admin/core
PERCH_RESFILEPATH: /home/sweetsqu/public_html/ampd/admin/resources
Image manipulation: GD
PHP limits: Max upload 16M, Max POST 16M, Memory: 128M, Total max file upload: 16M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
DOCUMENT_ROOT: /home/sweetsqu/public_html/ampd
HTTP_HOST: www.ampd.center
REQUEST_URI: /admin/core/settings/diagnostics/
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
Kevin Sweet

Kevin Sweet 0 points

  • 1 year ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

If it has just started then the problem isn't Perch, something has changed on your server.

Do you have free disk space? Is there anything in the PHP error log?

There is plenty of space. There are no errors.

I have not tried to upload anything since the last Perch and Gallery update so I can't rule out Perch just yet.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you checked your browser console for messages or errors?

After the upload completes and gives the HTTP error, I see an error message in the console for a few seconds and the it disappears. I was able to grab a screen capture but don't see a way to post an image. This is the error:

POST http://www.ampd.center/admin/addons/apps/perch_gallery/upload.php 500 (internal Server Error)

Then there is a list of letter/words followed by an @VM654:1 and similar. I can provide that list if necessary.

Drew McLellan

Drew McLellan 2638 points
Perch Support

If it's a 500 status then there should be something logged in your server's error log. Are you sure there's nothing?

There are no errors that I can see. I only have access to error logs via cPanel Errors. I don't have the knowledge to access any others.

I don't know if any of this helps:

  1. I changed "display_errors = Off" to On in php.ini and the error icon after uploading went away. There were still no images listed in the album in the admin page.

  2. When I upload an image a "_gd_temp_r9BU9u" (or version of) gets written to the perch resource folder. I have albums as separate buckets so this is outside of the image folder.

  3. No image processing occurs. Previously multiple sizes of the image would be processed based on the template. This does not happen but the original image is placed in the folder.

Drew McLellan

Drew McLellan 2638 points
Perch Support

What is the file size, dimensions and colour depth of the image you're trying to process?

Thanks Drew. I feel dumb on that one. It turns out the images were too big. I assumed they were automatically downsized on upload but was incorrect.

Drew McLellan

Drew McLellan 2638 points
Perch Support

They are downsized, but PHP has to load the full image into memory in order to downsize it. If it's too big for the available resources, it will fail.