Jump to content

Can't upload images after upgrade also lots of error messages


Recommended Posts

Since the upgrade I can no longer upload images.  It appears to work but then the image is not there.  When I click on images in the left panel, I get a 404 error that the page won't load.  Also my error log is now full of the errors in the attachment.

 

 

error message.PNG

Link to comment
Share on other sites

I understand that the error log is not related to the image upload problem.  I should have numbered my problems.  it is a separate issue.  I upgraded using the upgrade feature on the admin page when it indicated my store needed to be updated.  Prior to that I never had any issues with images.

I understand the file size and am using optimized images.  I have been using cubecart for 7 years now and have never had any sort of issue. 

I do have a lot of products and a lot of images.

Edited by moonette
Link to comment
Share on other sites

There have been quite a few reports of issues getting the latest upgrade processes to work. CC has made an effort to fix this in the coming upgrades, but that won't help you much right now.

Make backups of your database and store files before trying the upgrade manually.

Link to comment
Share on other sites

An upgrade (depending from what version to what version) probably have changed the name of the admin PHP script and the name of the administrative folder.

If the link for "Images" in the left side navigation panel is:

/admin.php?_g=filemanager

and the admin PHP script has been renamed to something like admin_AbcDEfG.php, then the web browser is not going to find admin.php. However, the .htaccess file should have a declaration that for any 404 response, send CubeCart's index.php page. (Please let us know if the 404 you see is wrapped in a CubeCart page, or is a simple bare-bones 404 message.)

We will need to find out what the names are for the administrative folder and the admin script, and compare them to values found in /includes/global.inc.php.

Link to comment
Share on other sites

Attached is the 404 I get when I try to load the file manager in the left nav within the admin page.

404 on image page.PNG

And this is the contents of  /includes/global.inc.php

<?php
$glob['adminFile'] = 'admin_eBDhvw.php';
$glob['adminFolder'] = 'admin_RuWtkJ';
$glob['dbdatabase'] = 'ah2009_products';
$glob['dbhost'] = 'localhost';
$glob['dbpassword'] = '****';  (starred out for security)
$glob['dbprefix'] = '';
$glob['dbusername'] = '****';  (starred out for security)
$glob['installed'] = '1';
$glob['cache'] = 'file';
?>

Link to comment
Share on other sites

Please note where it says "HTTP ERROR 500".

There is something else not right. It could be that some code in CubeCart is crashing PHP. When that happens, the web server sends this 500 error (among a few other reasons).

So, we would ask that you create the PHP error log. The PHP error log may already be viewable in your hosting account's control panel. This is not the same as the web server error log.

We may be able to find out what is crashing PHP.

You might also look at your admin, System Log, System Error log. There mat be something logged there if CubeCart was able to catch it in time.

Also, please examine the contents of the folder /images/source/. Is there anything other than image files in it?

Link to comment
Share on other sites

Working backwards, ignoring the timezonedb.so errors:

array_keys() expects parameter 1 to be array, boolean given
This is a known issue. We can ignore it.

Fatal error:  Allowed memory size of 33,554,432 bytes exhausted
This is crashing PHP. There is still an image (or a non-image file) that, when trying to expand it in memory, is running out of memory. So, an image that may be 150-250MBytes in size (PNG, JPG compresses the image while on the storage device), may expand to a very large amount in memory. That would depend on the image's dimensions. But allocated 32MBytes? You will need to have a conversation with your hosting provider and discuss how much memory your account is allowed to use.

Another memory exhaustion error says allowed memory of 59,768,832 exhausted, and 61,865,984 exhausted.

So I'm confused on this part -- what is making the decision on what memory to allow for expanding an image.

This one: Allowed memory size of 33,554,432 bytes exhausted (tried to allocate 3094352 bytes) in /classes/cache/file.class.php on line 213
This is an attempt to work with 3MB of data returned from a database query. That's a crazy amount of data. It would be interesting to know what that query was looking for.

The timezonedb.so is something that you may need to get help from your hosting provider.

Link to comment
Share on other sites

Yes. Line 213 is wanting to serialize($data). The $data is being passed into this function from somewhere. A lot of other functions send data to this function to be serialized and written to a file in the /cache/ folder. It's mainly the database functions that want to cache the query and the response returned, so that when the same query is made anytime later, the response can be taken from the cache and this leaves the database alone.

So, again, my wonderment is what is the query that is getting so much data back as the response. Finding out exactly what that is, is not trivial. But, in admin, Store Settings, Advanced tab, one can turn off caching. This will prevent this function from doing what it is intended to do. There will be no harm in doing this, but will make your installation of CubeCart run a bit slower.

Then, also on the Advanced tab, you can enable debugging and enter your IP address in the adjacent field (www.whatismyip.com). Then, on the page where you were getting this specific error, we can look at the database queries and try to guess which one is bringing in so much data.

Link to comment
Share on other sites

We are a specialist CubeCart hosting company and host quite a few regulars on these forums.  We offer free CubeCart support as part of our E-Commerce hosting packages and as well as tuning our servers for CubeCart (including offering the use of the new REDIS caching or Memcached which nobody else offers) and will also move your site over to us free of charge.  If you would like any answers to any specific questions, drop me a PM or contact via our website

Link to comment
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...