-3

I use Opencart Script for Kitchen18.com an Ecommerce portal, this was running well till last week, but suddenly I stopped receiving orders, & when I checked myself placing a test order, In the checkout page, When I click ORDER it doesnt moves to the further page, i.e., the payment gateway page. & on the bottom of the page shows this following code hyperlinked to FB page

 Fatal error: Call to a member function get() on a non-object in /home/content/95/9302195/html/index.php on line 103

Another thing I noticed, this ERROR shows only when user LOGINED on to the site, & on every page this error is shown.

Error Log showing as <br /> <b>Fatal error</b>: Allowed memory size of 67108864 bytes exhausted (tried to allocate 28354561 bytes) in <b>/home/content/95/9302195/html/gemini/view/template/tool/error_log.tpl</b> on line <b>17</b><br />

I am using Opencart 1.5.2.1 , Planning to upgrade to the 1.5.6 version with a new template but am worried to loose any data in the site. Any help highly appreciable. Regards Abhishek

Dariusz
  • 21,561
  • 9
  • 74
  • 114
  • You have allowed memory of 64Mb (67 108 864 bytes = 65 536 kb = 64 Mb). Your script wanted to allocate additional ca 27 Mb (28 354 561 bytes = 27 690 kb = 27 Mb). The solution then could be to set the `memory_limit = 128M` - **BUT** the right solution would be to check **WHY DO YOUR INSTALLATION** require so much of memory... I guess this may have something in common with that FB extension? – shadyyx Oct 14 '13 at 11:35
  • How to check why my installation needs this much memory ? I am not a coder, but can install and modify/add/delete codes as guided but cannot make a new change myself. Kindly help – abhishekdaaga Oct 16 '13 at 12:15

1 Answers1

0

This problem occurs when you try to allocate more memory than a script is allowed to do.

Solution

  1. If you have access to your PHP.ini file, change the line in PHP.ini If your line shows 32M try 64M: memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)

  2. If you don't have access to PHP.ini try adding this to an .htaccess file:

    php_value memory_limit 128M

    A.htaccess file is located in the public_html folder, you can modify it if it exists or create one if it does not.

Let us know if you could resolve the issue.

Sunny R Gupta
  • 5,026
  • 1
  • 31
  • 40
  • I have access to php.ini which is again showing in the root file, it reads as – abhishekdaaga Oct 14 '13 at 11:23
  • I have access to php.ini which is again showing in the root file, it reads as(all showing in 1line, but when pasted below, it is in different lines, this as u mentioned is 64m only. magic_quotes_gpc = Off; register_globals = Off; default_charset = UTF-8; memory_limit = 64M; max_execution_time = 18000; upload_max_filesize = 999M; safe_mode = Off; mysql.connect_timeout = 20; session.use_cookies = On; session.use_trans_sid = Off; session.gc_maxlifetime = 12000000; allow_url_fopen = on; ;display_errors = 1; ;error_reporting = E_ALL; – abhishekdaaga Oct 14 '13 at 11:29
  • Try changing it to 128M – Sunny R Gupta Oct 14 '13 at 11:46
  • After this is done, it should work. Later try to find out what is the problem with your current installation. (A PHP script should not require so much memory for a simple shopping cart.) – Sunny R Gupta Oct 14 '13 at 11:47
  • Uploaded with 128M, still same issue. What might be the problem with the script ? Why is it hyperlinked to a youtube link ? – abhishekdaaga Oct 15 '13 at 15:27