Post by dreamdigital » Sun Jan 26, 2014 10:07 pm

Hi, just installed the import/export tool by JNeuhoff and am getting the following error:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 10721 bytes) in /home/mercurym/public_html/admin/model/tool/export.php on line 494

Error log:

2014-01-26 13:50:00 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1570
2014-01-26 13:50:00 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1583
2014-01-26 13:50:00 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1609
2014-01-26 13:50:00 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1622
2014-01-26 13:50:00 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1635
2014-01-26 13:50:00 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1648
2014-01-26 13:50:00 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1661
2014-01-26 13:50:01 - PHP Fatal Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 10721 bytes) in /home/mercurym/public_html/admin/model/tool/export.php on line 494
2014-01-26 13:50:01 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/mercurym/public_html/admin/model/tool/export.php:494) in /home/mercurym/public_html/admin/model/tool/export.php on line 49
2014-01-26 13:50:01 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/mercurym/public_html/admin/model/tool/export.php:494) in /home/mercurym/public_html/admin/model/tool/export.php on line 50
2014-01-26 13:54:03 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1570
2014-01-26 13:54:03 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1583
2014-01-26 13:54:03 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1609
2014-01-26 13:54:03 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1622
2014-01-26 13:54:03 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1635
2014-01-26 13:54:03 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1648
2014-01-26 13:54:03 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1661
2014-01-26 13:54:04 - PHP Fatal Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /home/mercurym/public_html/admin/model/tool/export.php on line 533
2014-01-26 13:54:04 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/mercurym/public_html/admin/model/tool/export.php:533) in /home/mercurym/public_html/admin/model/tool/export.php on line 49
2014-01-26 13:54:04 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/mercurym/public_html/admin/model/tool/export.php:533) in /home/mercurym/public_html/admin/model/tool/export.php on line 50
2014-01-26 13:56:17 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1570
2014-01-26 13:56:17 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1583
2014-01-26 13:56:17 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1609
2014-01-26 13:56:17 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1622
2014-01-26 13:56:17 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1635
2014-01-26 13:56:17 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1648
2014-01-26 13:56:17 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1661
2014-01-26 13:56:18 - PHP Fatal Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 13757 bytes) in /home/mercurym/public_html/admin/model/tool/export.php on line 494
2014-01-26 13:56:18 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/mercurym/public_html/admin/model/tool/export.php:494) in /home/mercurym/public_html/admin/model/tool/export.php on line 49
2014-01-26 13:56:18 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/mercurym/public_html/admin/model/tool/export.php:494) in /home/mercurym/public_html/admin/model/tool/export.php on line 50
2014-01-26 14:01:49 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1570
2014-01-26 14:01:49 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1583
2014-01-26 14:01:49 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1609
2014-01-26 14:01:49 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1622
2014-01-26 14:01:49 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1635
2014-01-26 14:01:49 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1648
2014-01-26 14:01:49 - PHP Unknown: Only variables should be assigned by reference in /home/mercurym/public_html/admin/model/tool/export.php on line 1661
2014-01-26 14:01:49 - PHP Fatal Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 10721 bytes) in /home/mercurym/public_html/admin/model/tool/export.php on line 494
2014-01-26 14:01:49 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/mercurym/public_html/admin/model/tool/export.php:494) in /home/mercurym/public_html/admin/model/tool/export.php on line 49
2014-01-26 14:01:49 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/mercurym/public_html/admin/model/tool/export.php:494) in /home/mercurym/public_html/admin/model/tool/export.php on line 50

My memory limit was set to 1G by my host. Php config is here - http://196.28.97.199/phpinfo.php

Dont understand it, i have it working on XXAMP and did exactly what i did on my vps, even sent the xxamp php.ini file to the host to make the settings the same. Dont know if they are not doing it right or if there is another problem. Any help appreciated!

Newbie

Posts

Joined
Thu Dec 05, 2013 7:57 pm

Post by nvedia » Sun Jan 26, 2014 10:25 pm

Assuming that the phpinfo you posted is same for all the pages and there is no .htaccess file in admin interfering or changing the values

You can do this to find out whats going on

Open
admin\controller\tool\export.php , search for

Code: Select all

		$this->data['post_max_size'] = $this->return_bytes( ini_get('post_max_size') );
		$this->data['upload_max_filesize'] = $this->return_bytes( ini_get('upload_max_filesize') );

Add after above lines

Code: Select all

file_put_contents(DIR_LOGS . 'import_export_debug.txt', date('Y/m/d H:i:s') . ":". __FILE__ . ":". __LINE__ .": Data object: " . print_r($this->data,1)."\r\n", FILE_APPEND);

and now run your export import again and check the logs in system/logs
What values do you see in logs for upload_max_filesize and post_max_size ?

Donate here to show support if you think I have helped you today!

Opencart Documentation


User avatar
Active Member

Posts

Joined
Sun May 22, 2011 12:54 pm

Post by dreamdigital » Sun Jan 26, 2014 10:58 pm

Thanks for the quick response!!

I get:
2014/01/26 14:50:43:/home/mercurym/public_html/admin/controller/tool/export.php:75: Data object: Array
(
[heading_title] => Export / Import
[entry_restore] => Import from spreadsheet file:
[entry_description] => Use this function to export or import all your categories and products to or from a XLSX spreadsheet file.
[button_import] => Import
[button_export] => Export
[tab_general] => General
[error_select_file] => Export/Import: Please select a file before clicking 'Import'
[error_post_max_size] => Export/Import: File size is greater than 8M (see PHP setting 'post_max_size')
[error_upload_max_filesize] => Export/Import: File size is greater than 999M (see PHP setting 'upload_max_filesize')
[error_warning] =>
[success] =>
[breadcrumbs] => Array
(
[0] => Array
(
[text] => Home
[href] => http://196.28.97.199/admin/index.php?ro ... 0d0e4c4dd8
[separator] =>
)

[1] => Array
(
[text] => Export / Import
[href] => http://196.28.97.199/admin/index.php?ro ... 0d0e4c4dd8
[separator] => ::
)

)

[action] => http://196.28.97.199/admin/index.php?ro ... 0d0e4c4dd8
[export] => http://196.28.97.199/admin/index.php?ro ... 0d0e4c4dd8
[post_max_size] => 8388608
[upload_max_filesize] => 1047527424
)

2014/01/26 14:52:06:/home/mercurym/public_html/admin/controller/tool/export.php:75: Data object: Array
(
[heading_title] => Export / Import
[entry_restore] => Import from spreadsheet file:
[entry_description] => Use this function to export or import all your categories and products to or from a XLSX spreadsheet file.
[button_import] => Import
[button_export] => Export
[tab_general] => General
[error_select_file] => Export/Import: Please select a file before clicking 'Import'
[error_post_max_size] => Export/Import: File size is greater than 8M (see PHP setting 'post_max_size')
[error_upload_max_filesize] => Export/Import: File size is greater than 999M (see PHP setting 'upload_max_filesize')
[error_warning] => Allowed memory size of 67108864 bytes exhausted (tried to allocate 10721 bytes)<br />See also 'System > Error Logs' for more details.
[success] =>
[breadcrumbs] => Array
(
[0] => Array
(
[text] => Home
[href] => http://196.28.97.199/admin/index.php?ro ... 0d0e4c4dd8
[separator] =>
)

[1] => Array
(
[text] => Export / Import
[href] => http://196.28.97.199/admin/index.php?ro ... 0d0e4c4dd8
[separator] => ::
)

)

[action] => http://196.28.97.199/admin/index.php?ro ... 0d0e4c4dd8
[export] => http://196.28.97.199/admin/index.php?ro ... 0d0e4c4dd8
[post_max_size] => 8388608
[upload_max_filesize] => 1047527424
)

Newbie

Posts

Joined
Thu Dec 05, 2013 7:57 pm

Post by nvedia » Mon Jan 27, 2014 12:03 am

Please try increasing the value of post_max_size to 256M

Donate here to show support if you think I have helped you today!

Opencart Documentation


User avatar
Active Member

Posts

Joined
Sun May 22, 2011 12:54 pm

Post by dreamdigital » Mon Jan 27, 2014 12:56 am

Still not, deleted old log and new one seems the same - 2014/01/26 16:46:29:/home/mercurym/public_html/admin/controller/tool/export.php:75: Data object: Array
(
[heading_title] => Export / Import
[entry_restore] => Import from spreadsheet file:
[entry_description] => Use this function to export or import all your categories and products to or from a XLSX spreadsheet file.
[button_import] => Import
[button_export] => Export
[tab_general] => General
[error_select_file] => Export/Import: Please select a file before clicking 'Import'
[error_post_max_size] => Export/Import: File size is greater than 8M (see PHP setting 'post_max_size')
[error_upload_max_filesize] => Export/Import: File size is greater than 999M (see PHP setting 'upload_max_filesize')
[error_warning] => Allowed memory size of 67108864 bytes exhausted (tried to allocate 16384 bytes)<br />See also 'System > Error Logs' for more details.
[success] =>
[breadcrumbs] => Array
(
[0] => Array
(
[text] => Home
[href] => http://196.28.97.199/admin/index.php?ro ... 0d0e4c4dd8
[separator] =>
)

[1] => Array
(
[text] => Export / Import
[href] => http://196.28.97.199/admin/index.php?ro ... 0d0e4c4dd8
[separator] => ::
)

)

[action] => http://196.28.97.199/admin/index.php?ro ... 0d0e4c4dd8
[export] => http://196.28.97.199/admin/index.php?ro ... 0d0e4c4dd8
[post_max_size] => 8388608
[upload_max_filesize] => 1047527424
)


post max shows 256M - http://196.28.97.199/~mercurym/phpinfo.php

The post_max_size is 8M in xxamps settings. Any other ideas?

Newbie

Posts

Joined
Thu Dec 05, 2013 7:57 pm

Post by dreamdigital » Mon Jan 27, 2014 1:13 am

Ok got it. The host found a php.ini file hiding somewhere that was overwriting values. Thanks.

Newbie

Posts

Joined
Thu Dec 05, 2013 7:57 pm

User avatar
Active Member

Posts

Joined
Sun May 22, 2011 12:54 pm

Post by scr33ky » Sun Feb 02, 2014 12:28 am

hello guys .. just wanted to tell you a cool little trick i did in order to get this great mod to work on my OC 1.5.6.1 version

so my main problems that stumbled me ... been searching the net but to no use ... still hit a dead end because of the memory usage

so first problem PHP output error .... it's fixed by changing the file format in /admin/model/tool/export.php
i swhitched the XLSX file format to XLS and workbook from excel2007 to excel5 use search inside the file there are only 2 things that need modifying
next.... i hit the biggest wall ....memorry issues .. i spoke with host bumbed up the memory to 2 GB !!!!! still nothing BIG PROBLEM WITH THE MEMORY USAGE tryed using settings in php.ini and htaccess .. NOTHING !!!

BUUUTTT ..... i tryed something absoluteley wierd right !!!!... i got the import/export mod that works on OC 1.5.4 and PRESTO !!! works fine .. no memory issues ... works with import /export.... i made a back-up of my DB just to be sure .... REMEMBER ! i have OC 1.5.6.1 i think something is screwd in the coding i'm not php genius to figure that out ... but how come this version of the module for the 1.5.4 works on 1.5.6 ?????? and not the one intented for this version ???

now let's get down to business for real .... anywone can help me with this next isssue ??...

my store is set up so that nothing can be bought thrue it ...:))) it's not a online shoping store ... it's set up as a presentation site ... so i disabled the cart / customer login compare add to cart etc ....

now what i want to ask you guys ... how can i delete some output data from the EXCEL engine ... i tryed deleting the sku ean jan etc ... the output is fine ... but when i try to import the XLS file it throws errors because of the missing collums ...
i know how to delete the exported colums but what controls the input data ???? so i can disable some paramaters that it's searching for in the imported file ??

take care guys hope this helps soomeone outthere :D

New member

Posts

Joined
Mon Nov 29, 2010 4:25 am

Post by aaron4osu » Fri Feb 07, 2014 1:08 am

I'm having the same problem using the Import/Export tool with OC Version 1.5.6.1. Actually the import part works, just not the export.

I'm Getting the following error

"Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 25165824 bytes) in /home3/haas12/public_html/breslovcenter.org/system/PHPExcel/Classes/PHPExcel/Style/Supervisor.php on line 126"

I only have about 700 items, but I had my host bump up upload_max_filesize to 500M and post_max_size to 500M and it is still not working.

I created a php info file and it is at:
http://breslovcenter.org/phpinfo.php

Any other ideas?
Last edited by aaron4osu on Fri Feb 07, 2014 5:42 am, edited 2 times in total.

Newbie

Posts

Joined
Fri Nov 22, 2013 3:21 am

Post by aaron4osu » Fri Feb 07, 2014 2:46 am

I also added the code as mentioned above to print out a error message. Here is the message:

Code: Select all

2014/02/06 17:13:10:/home3/haas12/public_html/breslovcenter.org/admin/controller/tool/export.php:73: Data object: Array
(
    [heading_title] => Export / Import
    [entry_restore] => Import from spreadsheet file:
    [entry_description] => Use this function to export or import all your categories and products to or from a XLSX spreadsheet file.
    [button_import] => Import
    [button_export] => Export
    [tab_general] => General
    [error_select_file] => Export/Import: Please select a file before clicking 'Import'
    [error_post_max_size] => Export/Import: File size is greater than 500M (see PHP setting 'post_max_size')
    [error_upload_max_filesize] => Export/Import: File size is greater than 500M (see PHP setting 'upload_max_filesize')
    [error_warning] => 
    [success] => 
    [breadcrumbs] => Array
        (
            [0] => Array
                (
                    [text] => Home
                    [href] => http://breslovcenter.org/admin/index.php?route=common/home&token=106c92916ed3494373257ee4c21cdd09
                    [separator] => 
                )

            [1] => Array
                (
                    [text] => Export / Import
                    [href] => http://breslovcenter.org/admin/index.php?route=tool/export&token=106c92916ed3494373257ee4c21cdd09
                    [separator] =>  :: 
                )

        )

)

Newbie

Posts

Joined
Fri Nov 22, 2013 3:21 am

Post by aaron4osu » Tue Feb 11, 2014 10:24 pm

Anyone have any ideas on how to fix this? Any help would be greatly appreciated. Also Has anyone else with this problem tried any of the paid versions of this tool? I'm guessing this problem has to be due to some bug that makes it leak memory. Looking at my xlsx file it is only 291k but it's saying 256MB in the error message. I'm kind of stuck and not sure what to do.

Newbie

Posts

Joined
Fri Nov 22, 2013 3:21 am

Post by scr33ky » Tue Mar 04, 2014 2:02 am

try something absoluteley wierd !!!!...get the import/export mod that works on OC 1.5.4 and PRESTO !!! should work fine .. no memory issues .. IT WORKED FOR ME !!

New member

Posts

Joined
Mon Nov 29, 2010 4:25 am

Post by scr33ky » Tue Mar 04, 2014 2:03 am

also use the XLS filename instead of XLSX !!!

New member

Posts

Joined
Mon Nov 29, 2010 4:25 am

Post by elements » Thu Mar 06, 2014 5:37 am

Okay its a simple fix.

I was able to get this working on version 1.5.6.1 with cpanel.

i grepped for memory_limit like this inside www folder "grep -R 'memort_limit' *" this will search for any hard limits in any php files. I noticed there was a php.ini overiding the global settings inside the admin/

Ensure you increase the memory_limit inside there. If the file does not exist add it.

Cheers

Nick Tailor
nicktailor.com

Newbie

Posts

Joined
Tue Jan 28, 2014 4:14 am

Post by acedra » Fri Mar 07, 2014 5:35 am

Ok, I'm in the same boat as you guys. I get:
PHP Fatal Error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 64 bytes) in /home5/dngdesig/public_html/customcartats/system/PHPExcel/Classes/PHPExcel/Style/Supervisor.php on line 123

but I cannot find any other php.ini files that might be interfering with the main one. I've looked and edited all of them to be the same. Any ideas besides using an old version?

New member

Posts

Joined
Fri Jan 13, 2012 2:06 am

Post by acedra » Fri Mar 07, 2014 11:34 am

Well, I've been fighting with this thing all day. Tore the database apart and started over adding only 75 or so items at a time. Works ok so far, but I'm only half way done (1058 items out of 2245) and it already takes roughly three and a half minutes to export. Glad it exports at all at this point, but should it really take that long?

Thanks for your time - Dan

New member

Posts

Joined
Fri Jan 13, 2012 2:06 am

Post by acedra » Sat Mar 08, 2014 5:51 am

Well, I've been working with support from my webhost. This is what they came up with:
--------------------8<------------------------
Thank you for contacting Technical Support. It is due to this:

[05-Mar-2014 17:57:58 America/Denver] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 54544 bytes) in /home5/dngdesig/public_html/customcartats/system/library/image.php on line 34
[05-Mar-2014 17:58:14 America/Denver] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 54544 bytes) in /home5/dngdesig/public_html/customcartats/system/library/image.php on line 34
[05-Mar-2014 17:58:44 America/Denver] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 54544 bytes) in /home5/dngdesig/public_html/customcartats/system/library/image.php on line 34
[05-Mar-2014 17:59:09 America/Denver] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 54544 bytes) in /home5/dngdesig/public_html/customcartats/system/library/image.php on line 34

I increased the values in php.ini but it has been still executing after 10 minutes. This means the exported file is likely too large to be handled via PHP or there is a problem the export feature of your CMS which you will need to look into. I would recommend phpMyAdmin to export. It can handle excel formats: http://www.youtube.com/watch?v=9-cU9djOSYM. To prove that the export process is using a lot of memory on the server, look at the virtual memory usage of the process after only a few minutes:

6434 dngdesig 20 0 --> 1140m (1140m) 853m 9.8m R 99.5 2.8 8:44.36 /ramdisk/php/54/bin/php54 /home5/dngdesig/public_html/customcartats/admin/index.php

The process is also causing your account to be throttled:
During the past 24 hours this account has been throttled for a total of 27302.036 seconds.
--------------------8<------------------------
Any ideas where to go from here?

New member

Posts

Joined
Fri Jan 13, 2012 2:06 am
Who is online

Users browsing this forum: No registered users and 4 guests