Loaded Commerce Community

Banner


Board index » CRE Loaded Support » CRE Loaded 6.4

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Getting a fatal error for memory size when using the admin
PostPosted: Mon Jan 23, 2012 2:22 am 
Offline
CRE Talented
User avatar

Joined: Thu Jan 31, 2008 12:58 am
Posts: 413
Location: Denver, CO
I have had an issue going on with my CRE Loaded 6.4 Installation the last month or so. When I try to view categories, delete an item from the catalog, search for an item, etc. all on my admin page I get the following error:

Fatal error: Allowed memory size of 125829120 bytes exhausted (tried to allocate 262129 bytes) in /home/avcmw/public_html/avcdistributor/admin/categories.php on line 1328

I am not sure if it has to do with the amount of items in our store. We are running on a very fast VPN server and also we have around 4500 items in our store. I have added many items in the last month or two and that's when this problem began but if I'm correct CRE Loaded should be able to hold around 20,000 items. I am trying to delete items but unfortunately I get this error when doing it which makes it harder to delete. I keep refreshing and eventually I'm often able to eventually get to something but most of the times I get a very similar error like above.

What could be causing this error msg? It is the amount of items? Is it something to with a setting on my side of the server side that can be possibly changed?


Top
 Profile  
 
 Post subject: Re: Getting a fatal error for memory size when using the admin
PostPosted: Mon Jan 23, 2012 6:03 am 
Offline
CRE Legend
User avatar

Joined: Thu Jun 12, 2008 6:39 am
Posts: 2405
Location: New Zealand
In 6.4.2 carts they added in to Admin >> Configuration >> Images a conditional to bypass preloading all of the images - this is probably why it's timing out and exhausting memory. You could increase server ram but it probably won't make much difference with a large number of products / multiple images.

I think only the pro/b2b 642 carts got the loop ... it's pretty simple anyway, you basically want to bypass this block in admin/categories.php:

Code:
$image_file = $manage_image->getFiles('');
          $file_list = '<option value=""> -- None -- </option>';
          foreach ($image_file[1] as $relative => $fullpath) {
            $file_list .= '<option value="' . rawurlencode($relative) . '">' . $relative . '</option>';
          }
          unset($image_file);

Simon

_________________
www.codemehappy.com
For Cre Loaded tips, how-to articles and more


Top
 Profile  
 
 Post subject: Re: Getting a fatal error for memory size when using the admin
PostPosted: Mon Jan 23, 2012 3:12 pm 
Offline
CRE Talented
User avatar

Joined: Thu Jan 31, 2008 12:58 am
Posts: 413
Location: Denver, CO
Hello Simon,

Thank you for your reply. It sounds like it's likely some type of memory issue and I just couldn't figure out what was causing it. Glad they fixed it with 6.42. I'm still stuck at 6.4 and unfortunately with the modifications we've made, mostly modules installed from 3rd party companies, an upgrade is hard to do. We are hoping to at some point go to 6.5.

Anyway, are we able to make the changes to our 6.4 installation? I see the code you pasted in the post. Is that code we simply add to the file, admin/categories.php? If so, where do we add the code? Does it replace something in that file or do we simply add it to the end of the file?

Also, you mentioned about it loading images. Many of our newer items added have multiple images, in some cases the maximum amount that can go in an item description. We are removing all the items from our cart that we no longer will be restocking to help CRE run faster and hopefully help solve this problem. By doing this though does that remove the images from the images folder or only the item from our catalog? When you mentioned it loads all the images is it loading all images from the images folder or just images that are matched to an item?


Thank you again,

Mark


Top
 Profile  
 
 Post subject: Re: Getting a fatal error for memory size when using the admin
PostPosted: Tue Jan 24, 2012 12:51 am 
Offline
CRE Legend
User avatar

Joined: Thu Jun 12, 2008 6:39 am
Posts: 2405
Location: New Zealand
Not some type of memory error - it is all the images and the default behaviour of 'preloading' all of them.

Just comment out the code block I listed above - ie put a /* at the start and a */ at the end of the block. Run your admin, notice the difference.

Simon

_________________
www.codemehappy.com
For Cre Loaded tips, how-to articles and more


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

Board index » CRE Loaded Support » CRE Loaded 6.4

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
It is currently Thu May 24, 2012 4:30 pm
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Login

Forums Latest Activity

Top Listing

1. Cart2Cart - Shopping...
    Category: Shopping Cart Database Conversion Scripts
    
2. Points & Rewards PLUS!...
    Category: Add-Ons
    
3. Configuration Server...
    Category: Fixes
    
4. Credit Card with CCV
    Category: Payment Modules
    
5. CC7333_ATS
    Category: Templates
    
Show more...

© CRE Loaded is a product of Chain Reaction Ecommerce, Inc. Usage & Privacy Policy