Post by Zanato » Sun Jun 07, 2020 12:38 am

Hi,

So I had a few bogey image directory names and thought I'd clean them up.

Exported the database tables, oc_product and oc_product_image. Find and Replace on the required changes, save, and import back in.

Except it won't import!! OC tells me upload_max_filesize and post_max_size are both 32MB. The sql file is only 905KB but I'm getting "

Code: Select all

PHP Fatal error:  Allowed memory size of 402653184 bytes exhausted
". So I increase the limits, 128MB, still not big enough. So I increase to 628MB and now I'm getting max execution time of 60 seconds exhausted.

Surely this can't be right for a <1MB .sql file, no?
Last edited by straightlight on Mon Jun 08, 2020 5:38 pm, edited 1 time in total.
Reason: Added code tags.

New member

Posts

Joined
Fri Oct 04, 2013 4:58 am
Location - Dublin, Ireland

Post by EvolveWebHosting » Sun Jun 07, 2020 5:52 am

It does not sound right unless your hosting company is being very restrictive. Contact them to raise it or send them the file to import over command line.

Image
Black Friday Specials Active Now https://www.evolvewebhost.com/blog/blac ... riday_2020
Detailed guide on how to install Opencart


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by OSWorX » Sun Jun 07, 2020 6:02 pm

Zanato wrote:
Sun Jun 07, 2020 12:38 am
Exported the database tables, oc_product and oc_product_image. Find and Replace on the required changes, save, and import back in.

Except it won't import!! OC tells me upload_max_filesize and post_max_size are both 32MB. The sql file is only 905KB but I'm getting "PHP Fatal error: Allowed memory size of 402653184 bytes exhausted". So I increase the limits, 128MB, still not big enough. So I increase to 628MB and now I'm getting max execution time of 60 seconds exhausted.

Surely this can't be right for a <1MB .sql file, no?
And why do you not import that data with the database tool phpMyAdmin?
Sure, it should work also with the internal import tool, but as long as that makes troubles, you can import that always by yourself without asking someone else.

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member
Online

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by straightlight » Sun Jun 07, 2020 9:47 pm

Or ... you could always create a new service request in the Commercial Support section of the forum, or use the Resources link at the top of the forum to contact a reliable Opencart partner or contact me directly to get this done as a custom job.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Zanato » Mon Jun 08, 2020 5:09 pm

OSWorX wrote:
Sun Jun 07, 2020 6:02 pm
And why do you not import that data with the database tool phpMyAdmin?
Thanks for the suggestion. It's how I had to do it in the end. I would often just use phpMyAdmin for little changes here and there but for this I thought it would be easier to use Backup & Replace (which I often use on some of my other sites). I had a staff member upload a load of new products and they had some spaces in image folder names, image file names, and in SEO keywords so a quick backup of the table, Find and Replace the spaces, and restore. It's a 60 second job, or at least, should be.

But it wouldn't restore. First I was getting the memory errors and then when I vastly increased my PHP limits it would hang for a min on import and then suddenly EXPORT the database! I thought to myself there is something wrong somewhere but couldn't find any mention on the forums so decided to make a post to see if anyone knew what it could be.

In the end I installed a new copy of 2.3.0.2 on localhost to test it and low and behold after exporting a single table and then trying to restore it back in, it instead exports the whole database. So then I thought this must be a problem with Chrome so I tried it with IE but got the same result. Tried switching from PHP5.6 to PHP7.1, same result. Tried switching from mysqli to mysql and again, same result. So then I tried on a 2.2.0.0 site I have and restore doesn't work there either. So it must be a bug. I'm just amazed I haven't come across it before and I can't find much on it in the forum. It does work on the old 1.5.6 sites I still run and it does seem to work on 3.0.

New member

Posts

Joined
Fri Oct 04, 2013 4:58 am
Location - Dublin, Ireland

Post by OSWorX » Mon Jun 08, 2020 5:56 pm

Supporting several hundreds of clients with version from 1.4. - 3.0.x but never ever had such problems.
Except the server limits were too less and the import too big - but that's another issue.

Regarding the wrong image folder and names, if I would be you, I would
1. talk with that guy to not use spaces anywhere
2. install additionally a small modification which fix all of that automatically (did that at some clients, because some do not think further there nose is long ..)

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member
Online

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by mikahawkins » Sat Oct 17, 2020 10:54 am

Hello,
A PHP memory limit of 128MB should be more than enough for most sites unless you have a plugin that needs more. If you want to see how much memory different plugins use, install the Server IP & Memory Usage Display plugin
Regards,
Mika Hawkins

Newbie

Posts

Joined
Fri Sep 18, 2020 2:54 pm

Post by khnaz35 » Sat Oct 17, 2020 4:57 pm

mikahawkins wrote:
Sat Oct 17, 2020 10:54 am
Hello,
A PHP memory limit of 128MB should be more than enough for most sites unless you have a plugin that needs more. If you want to see how much memory different plugins use, install the Server IP & Memory Usage Display plugin
Regards,
Mika Hawkins
Something like this
https://www.opencart.com/index.php?rout ... sort=price

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by IP_CAM » Sun Oct 18, 2020 5:29 am

It does work on the old 1.5.6 sites ...
happy to hear that ... :D

Please don't send me OC Forum Personal Messages, just contact: jti@jacob.ch
---
OC 1.5.6.5 LIGHT Test Site: http://www.bigmax.ch/shop/
OC 1.5.6.5 V-PRO Test Site: http://www.openshop.li/shop/
My Github OC Site: https://github.com/IP-CAM
2'600+ FREE OC Extensions on the World's largest Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 8 guests