Jump to content
Darren Rogers

Server error 500 after loading image

Recommended Posts

Hi all, I hope somebody can help me troubleshhot this error as I have no idea where to start.

When I go to the image menu and create a folder, this works fine. Immediately upon loading an image to this new folder, it fails with a cross through the picture, follow by a pop- up suggesting a 500 server error, but nothing useful beyond this. I can click on other (already created) folders and then open and view the files, but any subsequent attempt to view the folder I am immediately greeted with server 500 error again. I can delete the folder, without issue.

I'm going around in circles on this. Is anybody able to push me in the write direction or tell me what additional info you any require. It is probably worth mentioning that when I view server by FTP Client that it shows the new folder along with the image I could view in the FTP account.

Thank you,

Darren.

Edited by Darren Rogers

Share this post


Link to post
Share on other sites

A mod_security rule trip almost always creates a 403 error and not a 500 error.  The most likely cause is a php timeout or image upload size problem - if you are attempting to upload a very large image, firstly try a different smaller image, then try reducing the size of the image (you can use a great site https://tinypng.com which confusingly also compresses jpg images as well) and also check in the php info listing what the maximum file upload value is set to

Ian

Share this post


Link to post
Share on other sites

havenswift-hosting: Thank you for your suggestions. I am happy it is not a filesize issue. Even repeat trying to load images I had prepared a month ago that loaded without issue will no longer load. I have adequate spare space on the server and I can FTP the images manually into the the intended location, but oddly doing that and refreshing the image cache induces the same 500 error. If the image is attempted to be loaded when setting up the product, any part of the Cubecart menu structure that has reference to that Product shows the 500 error. If I load the image from the Images menu, then it is only when clicking on the folder I put the image into that I get the 500 error, all other image folder remain unaffected.

bsmither: Thanks, I have done exactly as you stated (I hope). I have put the file ini-custom.inc.php into the main Cubecart folder as instructed. Now when I attempt to load an image I get the blank white screen you describe, but I do not find an error_log file. I have checked the file name I created and it is "ini-custom.inc.php". Are you able to offer any further assistance?

The website is www.mascotmedia.co.uk.

Thanks, Darren.

Share this post


Link to post
Share on other sites

If you are on speaking terms with your hosting provider, ask them to search their error logs to discover what may be causing the issue.

If ini-custom.inc.php is being executed, then no created error_log file means either there are no errors (not likely as CubeCart will have some Notices), or the fault is happening before ini-custom.inc.php is executed.

Share this post


Link to post
Share on other sites
15 hours ago, Darren Rogers said:

I am happy it is not a filesize issue. Even repeat trying to load images I had prepared a month ago that loaded without issue will no longer load. I have adequate spare space on the server and I can FTP the images manually into the the intended location, but oddly doing that and refreshing the image cache induces the same 500 error. If the image is attempted to be loaded when setting up the product, any part of the Cubecart menu structure that has reference to that Product shows the 500 error. If I load the image from the Images menu, then it is only when clicking on the folder I put the image into that I get the 500 error, all other image folder remain unaffected.

The fact that you used to be able to upload an image actually has little bearing on whether you can or can’t do it now as the php value restrictions could have been changed recently.  If you check in the PHP info page for maximum file upload size you will see what the current setting is.  However, based on what you say later, I don’t think it is the max file size causing your issue.

15 hours ago, Darren Rogers said:

I have adequate spare space on the server and I can FTP the images manually into the the intended location, but oddly doing that and refreshing the image cache induces the same 500 error. If the image is attempted to be loaded when setting up the product, any part of the Cubecart menu structure that has reference to that Product shows the 500 error. If I load the image from the Images menu, then it is only when clicking on the folder I put the image into that I get the 500 error, all other image folder remain unaffected.

Spare space on the Server is irrelevant in this case but the fact that you are getting the error after uploading the image files via FTP indicates that it isn’t the max file upload size that is the issue but the php process execution time that is being exceeded so you could look at that variable value.

Passing your images through tinypng.com first before uploading them (whichever way - CubeCart or FTP) could fix the issue.

Share this post


Link to post
Share on other sites

My host is 1and1. Sometimes they are good when I call them, other times not so good. I will certainly try them.

Under PHP Info, there is a heading "Core", within that, there is a sub-item "log-errors" which is "off". Is this relevant to troubleshooting this and if so, do you know how I turn it on.

Under PHP Info, there is an entry !Upload max size" is set to 64M. I had already shrunk the images and they are failing to load as small as 41Kb. The dropzone says "max 305Kb for each". What happens is the process appears to start, the progress bar moves across, a large X appears on image icon and when I hover on it the message "Server responded with 500 code is displayed".

My own attempts go Google search for likely errors has led me to Mod_Rewrite module. Could this be of any relevance. I do not know how to test it if so.

Any further suggestions? Thanks for assistance.

Share this post


Link to post
Share on other sites

Logging errors could not be enabled in the master PHP.INI config file. However, enabling the logging of errors and where that log is written can be specified by instructions in the executing program - which is what ini-custom.inc.php is doing.

Mod_Rewrite, if only just the statements that CubeCart needs are in the site's .htaccess file, wouldn't be an issue. If there are more rewrite condition statements that are to do other work beyond what CubeCart is doing, then we would probably see more white screens and other problems than only this uploading images issue.

Share this post


Link to post
Share on other sites
10 hours ago, Darren Rogers said:

Under PHP Info, there is an entry !Upload max size" is set to 64M. I had already shrunk the images and they are failing to load as small as 41Kb. The dropzone says "max 305Kb for each". What happens is the process appears to start, the progress bar moves across, a large X appears on image icon and when I hover on it the message "Server responded with 500 code is displayed".

There are three php variables that can control / limit file upload size and you also have "Local" values of these (which will be applied to your account) and the server "Master" values which you will probably not be able to exceed as these are the maximum values that any account using that version of PHP can use.

Check what the local and master values are for memory_limit, post_max_size and also upload_max_filesize

Share this post


Link to post
Share on other sites

Hi,
Am having a very similar if not the same problem, started about a week ago, just wondering if you've got anywhere with the above issue?

Thanks

Share this post


Link to post
Share on other sites
5 minutes ago, Essencia said:

Hi,
Am having a very similar if not the same problem, started about a week ago, just wondering if you've got anywhere with the above issue?

Thanks

Regrettably not. All 4 of my CubeCart websites stopped working with this issue at exactly the same time. My host is 1&1 Internet Services who have tried the best they can to help, but unfortunately as they do not offer any form of support for 3rd party applications like CubeCart there was noting they could do other than blind me with technical suggestions that I did not have the knowledge to execute. I am now looking to move all of my websites from 1&1 to Havenswift Hosting where the sites will be properly supported.

Share this post


Link to post
Share on other sites

With no solution forthcoming from 1&1 who stated that as CubeCart was a thrid party app, there was little they could do to help, I switched hosting to Havenswift Hosting at the recommendation of another customer and support of a whole new level was immediately forthcoming. Within hours they sorted the migration out totally painlessly and pleased to report all is working again. Well worth their hosting fee and I shall now begin moving my other CubeCart sites to to them as I still can't load images using 1&1.

Share this post


Link to post
Share on other sites
On 10/16/2018 at 10:57 PM, Essencia said:

Hi,
Am having a very similar if not the same problem, started about a week ago, just wondering if you've got anywhere with the above issue?

Thanks

What version of CubeCart are you running and who are you hosting with ?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...