Topic: Upload failed

I recently installed Showkase on my web site and was working through the Getting Started instructions. When I went to Upload some images, the upload failed and my web site became blocked. I contacted the ISP and they said it was probably an attempt to FTP to the site with incorrect password or other credentials. I don't see anything in Showkase that lets you configure the FTP settings -- for example, the site uses the SFTP protocol. The ISP unblocked the site which is now working again, but I now need some way to upload photos to Showkase.

Re: Upload failed

FYI, the site is using PHP 8.1.17

Re: Upload failed

I tried the fix to thumbnails.php mentioned elsewhere on this forum and still get a yellow triangle and "HTTP error" when I try to upload a single file.

Re: Upload failed

Is "HTTP error" the only message that appears or is there a more descriptive message which might help to figure out what is causing the problem?
Does it look like a message generated by Showkase (somewhere within the Showkase interface) or perhaps by your web server?
Could you please post a screenshot of the error message here in this thread so that I can see what you are seeing? It might help to determine the cause of the problem. Thank you.

Showkase does not upload images via FTP/SFTP so there are no FTP settings to configure.

Here are a few things to try.

(1) If possible, please try using PHP 8.0 (or a variant of PHP 8.0.x... the latest being 8.0.29 released on 8 June 2023) on your site instead of PHP 8.1 to see if this makes a difference.

(2) Try uploading via the 'Basic upload' method as well as the 'HTML5 upload' method? You can change the upload method via the link in the lower right corner of the upload module.

(3) Try installing and running the Showkase Server Compatibility Test: https://www.showkase.net/support/sktest/
Even if you ran the test prior to installing Showkase, please run it again just now in case your web host has made any changes to your hosting account recently.
If any of the tests fail, then there are troubleshooting tips on the test's support page (link above).
HP version or settings) which might be contributing to your problem.

(4) Also, you could try running Showkase in Debug Mode to see if any more detailed warning or error messages are displayed in the Showkase status bar (which might not be displayed when debug mode is switched off) to help pinpoint the problem.
Open your 'showkase/admin/settings/constants.php' file in a plain text editor and change line 12 from:

define('DEBUG', false);

... to:

define('DEBUG', true);

The line number above refers to the current version of Showkase (v1.7.6).

(5) Finally (for the time being), are you using custom thumbnail or image dimensions? If so, try using the default values to see if this helps.

I realize that these suggestions might not tackle your problem head on and resolve it immediately but they should at least point us in the right direction.
Please let me know how you get on.

5 (edited by jsachs 2023-07-27 10:55:17)

Re: Upload failed

1) Have not tried this yet as my ISP would need to do this.

2) I switched to Basic Upload and uploaded a small file successfully and got a green triangle. I then clicked the Images tab to delete the test image, but no images were listed.

3) I ran the compatibility test successfully just before I installed Showkase

4) I switched to debug mode but the Status still just says HTTP error. when I hover over the yellow triangle.

5) I tried setting resizing to default but this did not make any difference.

Will ask if my ISP can revert to PHP 8.0.

6 (edited by jsachs 2023-07-27 11:15:14)

Re: Upload failed

I reverted to PHP 8.0 but nothing changed.

Re: Upload failed

Thank you for trying my suggestions.

I reverted to PHP 8.0 but nothing changed.

This rules out a PHP version problem. (There are no known issues with Showkase v1.7.6 under PHP 8.0.)

2) I switched to Basic Upload and uploaded a small file successfully and got a green triangle. I then clicked the Images tab to delete the test image, but no images were listed.

That's odd but thanks for trying. I can't think of why this might be at the moment but at least we have this information that we can come back to if necessary.

3) I ran the compatibility test successfully just before I installed Showkase

Presumably all tests pass OK?

4) I switched to debug mode but the Status still just says HTTP error. when I hover over the yellow triangle.

I've never encountered this myself. Unfortunately, the 'HTTP error' is most likely being generated by Plupload (the third-party upload module that Showkase uses) and it's rather generic and doesn't really help us to determine the cause of the problem.

5) I tried setting resizing to default but this did not make any difference.

This rules out the PHP 8.1 / 'thumbnail.php' problem (but changing to PHP 8.0 also rules this out).

Here are some more things to check and try:

(1) Make sure that your image filenames do not have any reserved or special characters in them. Try using only alpha-numeric characters (a-z, A-Z, 0-9) in your image filenames.

(2) Are your images rather large (in filesize)? Check your PHP directives post_max_size, upload_max_filesize and memory_limit to make sure that they are not set too low. Please check in with your web host if you are unsure where your PHP directives are set. (They might be set in a 'php.ini' file or you might be able to set them from within your hosting account's online control panel.)
Check out the description of post_max_size in the PHP documentation: https://www.php.net/manual/en/ini.core. … t-max-size
Here's a quote from the docs which might help you set these values:

post_max_size int

Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. Generally speaking, memory_limit should be larger than post_max_size.

The current PHP default values for post_max-size, upload_max_filesize and memory_limit are 8M, 2M and 128M respectively. Your web host might set other values as their own defaults.
Whatever your own current values are, try doubling them all (or even quadrupling them if they seem very low).

(3) Check your hosting account's control panel to see if there are any security modules installed which might be restricting the upload of images. Also, check any '.htaccess' files that you may be using to see if there are any entries there which might be causing problems.

Showkase works out-of-the-box on most web servers without any tweaking. Unfortunately, it appears that your web server might be a little too restrictive (at least at the moment) to allow Showkase to function correctly and fully.
I'll keep my fingers crossed that one of these new suggestions will point you in the right direction and that you will be able to resolve your problem.
As before, please let me know how you get on.
Thank you.