Fatal error: Allowed memory size

  • Posts: 1080
  • Thank you received: 11
  • Hikashop Business
2 days 3 hours ago #365886

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 4.4.11

Hi!

I'm trying to update Hikashop but the uploading keeps crashing, this happens only when uploading Hikashop zip file.
The error message says

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in /home/php8/public_html/billiri.gr/administrator/components/com_hikashop/classes/category.php on line 915

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0

Warning: PHP Request Shutdown: Cannot call session save handler in a recursive manner in Unknown on line 0


I changed the memory limit i tried everything there but nothing helped.

Thank you

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 83343
  • Thank you received: 13480
  • MODERATOR
2 days 3 minutes ago #365888

Hi,

Extract the install package on your local computer. Upload the extracted content in the tmp folder of your joomla via FTP. Then, in the Joomla installer, use the "install from folder" tab, and specify the path of the tmp folder and run the installation process.
Since Joomla won't have to extract the zip, it will circumvent the limitation you have and go straight to the update process.

The following user(s) said Thank You: verzevoul

Please Log in or Create an account to join the conversation.

  • Posts: 1080
  • Thank you received: 11
  • Hikashop Business
1 day 2 hours ago #365909

Hi!

I tried that but i does the same thing, actually it crashes even faster with the tmp folder upload.
It also crashes if i rebuild Hikashop categories.

Thank you

Last edit: 1 day 1 hour ago by verzevoul.

Please Log in or Create an account to join the conversation.

  • Posts: 1080
  • Thank you received: 11
  • Hikashop Business
1 day 1 hour ago #365923

I also remarked that rebuild categories gives

Fatal error: Allowed memory size of 201326592 bytes exhausted (tried to allocate 262144 bytes) in /home/billiri/public_html/administrator/components/com_hikashop/classes/category.php on line 883

Fatal error: Allowed memory size of 201326592 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0

Please Log in or Create an account to join the conversation.

  • Posts: 83343
  • Thank you received: 13480
  • MODERATOR
1 day 27 minutes ago #365915

Hi,

I think that there is a problem with your categories in your database.
You must have a loop something where a child category is a parent of one of its parent categories.

You can try to add the code:

		if($depth > 50)
			return array($depth,$left);
after the line:
function rebuildTree($element,$depth,$left){
in the file administrator/components/com_hikashop/classes/category.php
That will avoid the infinite loop, and thus should not produce the error anymore if you click on the "rebuild" button of the categories listing.
Then, we can include the patch on our end too so that you can install the update without getting the error.
However, it still means that you have a problem with the data of your categories in the database. Ideally, you should review the child / parent structure of your categories to remove that infinite loop.

Last edit: 1 day 27 minutes ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 1080
  • Thank you received: 11
  • Hikashop Business
20 hours 34 minutes ago #365936

Thank you Nicolas,
it didn t wotk for my case.
I still get
Fatal error: Allowed memory size of 201326592 bytes exhausted (tried to allocate 262144 bytes) in /home/billiri/public_html/administrator/components/com_hikashop/classes/category.php on line 883

Fatal error: Allowed memory size of 201326592 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0


after rebuild.

How can I clean the child / parent structure?

Please Log in or Create an account to join the conversation.

  • Posts: 83343
  • Thank you received: 13480
  • MODERATOR
18 hours 13 minutes ago #365938

Hi,

Open the hikashop_category table via your PHPMyAdmin. There, check the category_parent_id to make sure that each category is correctly linked to its rightful parent, and make sure there is no loop with a category having one of its children category's id (direct or indirect) in its category_parent_id.
Once you find the issue and correct the category_parent_id, click on "rebuild" and you won't have the problem.
Then, the update will work properly too.

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum