Jump to content

Fatal error: allowed memory size


charmed

Recommended Posts

Not all of my products are showing up in my catalog in the back office. If I click on a category it will say that there are 28 products in this category, but it really only shows 3 (and one is missing an image). I can see all the items in this category just fine on my store front.
I have changed config.inc.php and temporarily changed ‘display_errors’ from ‘off’ to ‘on’. to show an error

It says Fatal error: allowed memory size of 33554432 bytes exhausted (tried to allocate 3872 bytes)

What do I need to do to sort it ??


Thanks 

  • Like 1
Link to comment
Share on other sites

Thanks for that, it does not seem to have worked though. It appears that the database (phpMyAdmin) is not linking properly to Prestashop, although I have been in to Preferences/Database and made sure they are pointing to the right place. The website shows ALL the items are there but in Prestashop it shows nothing is there. This was moved on to a new server and an update done of Prestashop is there maybe something I have not done? Thanks for your help.

Link to comment
Share on other sites

  • 4 months later...
Put it in the root directory and the admin directory, so it applies to both the Front Office and Back Office. I'm not sure, but I think it should be already to use.


just to say it sorted out my problem with no modules showing in my back office, i have an error Fatal error: Allowed memory size of xxx etc etc and the php .ini fixed it
just thought i would post it incase anyone else has no modules showing in their back office
best regards
  • Like 1
Link to comment
Share on other sites

Put it in the root directory and the admin directory, so it applies to both the Front Office and Back Office. I'm not sure, but I think it should be already to use.


just to say it sorted out my problem with no modules showing in my back office, i have an error Fatal error: Allowed memory size of xxx etc etc and the php .ini fixed it
just thought i would post it incase anyone else has no modules showing in their back office
best regards


Jep that does the trick also for me with modules not showing in prestashop!

thanks!
Link to comment
Share on other sites

  • 3 weeks later...
Put it in the root directory and the admin directory, so it applies to both the Front Office and Back Office. I'm not sure, but I think it should be already to use.


I did put it in both directory, but it just dose not work, and it still occurs to me " Allowed memory size of 33554432 bytes exhausted" ..................

what should i do?
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 4 months later...

Hi,

 

I had the same problem with the Payment tab not loading, and giving the same error as posted above about memory limit. I inserted the php.ini file in root and admin folders and I also added

 

<?php

ini_set("memory_limit","128M");

?>

 

to the config.inc.php, module.php and paypal.php files, the Payment tab NOW loads, however it still shows an error which says something like:

 

Not all modules could load due to memory limit restrictions, please increase memory values in your server configuration.

 

I also get this error in the website when trying to pay with paypal:

 

Check your configuration:

  • PayPal response:
  • TIMESTAMP -> 2011-12-30T00:45:00Z
  • L_ERRORCODE0 -> 10002
  • L_SHORTMESSAGE0 -> Security error
  • L_LONGMESSAGE0 -> Security header is not valid
  • L_SEVERITYCODE0 -> Error
  • PayPal gave an error

 

do you know if this is related and if the payment tab error can still be fixed?

 

Thanks

apprentice

  • Like 3
Link to comment
Share on other sites

  • 2 months later...
  • 6 months later...

You need to increase your PHP memory limit. At the moment, it is set to 32M, which doesn't appear to be enough for you. Edit your php.ini file (or create one) and set the memory_limit to 64M.

GRACIAS AMIGO.. SOLUCIONE TAN BIEN YO EL PROBLEMA
  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 17152 bytes) in /home/viliuks1/public_html/images.inc.php on line 238

I got this error when I'm uploading photos of my item, how I could correct it? I downloaded rocky php.ini file and putted it in to a public_html folder, but error doesn't dissapeared.

 

EDIT. I forgot to upload php.ini to admin folder. Now it's fixed. Thanks.

Edited by viliauskas (see edit history)
Link to comment
Share on other sites

  • 7 months later...

Hi,

 

I had the same problem with the Payment tab not loading, and giving the same error as posted above about memory limit. I inserted the php.ini file in root and admin folders and I also added

 

<?php

ini_set("memory_limit","128M");

?>

 

to the config.inc.php, module.php and paypal.php files, the Payment tab NOW loads, however it still shows an error which says something like:

 

Not all modules could load due to memory limit restrictions, please increase memory values in your server configuration.

 

 

I also get this error in the website when trying to pay with paypal:

 

Check your configuration:

  • PayPal response:
  • TIMESTAMP -> 2011-12-30T00:45:00Z
  • L_ERRORCODE0 -> 10002
  • L_SHORTMESSAGE0 -> Security error
  • L_LONGMESSAGE0 -> Security header is not valid
  • L_SEVERITYCODE0 -> Error
  • PayPal gave an error

do you know if this is related and if the payment tab error can still be fixed?

 

Thanks

apprentice

 

 

Adding the codes to config.inc.php works for me. Thank you!

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Hi rocky,

 

I'm sorry but your php.ini file didn't work with latest Prestashop.

 

I install Prestashop in sub directory (folder) and as soon as I upload php.ini file into 'sub-directory' & under 'admin123' all site give ERROR and if put in 'admin123' than whole 'Modules' give ERROR Any update for Prestashop 1.6 version?

Link to comment
Share on other sites

  • 5 months later...
  • 3 weeks later...
  • 4 months later...
  • 1 month later...
  • 1 month later...

Hi,

 

I get this error when I try to open my modules and services: 

 

[PrestaShop] Fatal error in module file :"file path":
Allowed memory size of 33554432 bytes exhausted (tried to allocate 4480 bytes)

 

 

The size of bytes change with each reload as well as the file path. I have increased the memory limit right from 32 to 64 to 128 to 320 to 500M however I keep getting the error.

 

I also increased the max execution time from 30 to 60 to 120 to 1800 still I keep getting the error.

 

I have searched various forums and they all provide the solution of increasing memory limit which I have done but I keep getting the error.

 

I however noticed that in the back office, the server configuration shows the default of 32M as memory limit and max execution time as 30. How can these be changed.

 

 

Any help? 

Edited by ghkente (see edit history)
Link to comment
Share on other sites

  • 5 months later...

The memory allocation error can be SOLVED by doing what's suggested by bellini13.

Just wanted to add further clarification based on my understanding (I'm new! Spare me) after having solved the problem as well.

 

I believe this applies for all errors similar to the following (and is what I'll only cover here):-

"Fatal error: allowed memory size of 33554432 bytes exhausted (tried to allocate 3872 bytes)" 

Taking from example error above "33554432 bytes" may well be the default memory_limit set by your host provider (as it is with mine) i.e. 32MB (which = 33554432 bytes. The limit may be different for others I'm not sure.)

 

Three workarounds suggested (briefly):-

  1. Add a line "memory_limit = **M" to the ini.php file.
  2. Add a line "ini_set('memory_limit','**M');" to the config.inc.php file.
  3. Update your server php memory limit to **M
  • ​** 64(MB), 128(MB) or higher depending on how much memory exhausted stated in the error.
    e.g. 64MB works for me since 32MB were exhausted and I needed something higher than 32MB but total required memory less than 64MB.

Initially, I tried the first option, changing the memory limit to 64MB but the error still comes up, saying allowed memory size is 32MB (remains unchanged even with the edit).

 

The second option works for me. The file "config.inc.php" can be found at *your_prestashop_directory*/config/

 

Here's where I created a new line for the memory limit edit "ini_set('memory_limit','64M');" inside the config.inc.php

/* Improve PHP configuration to prevent issues */
ini_set('default_charset', 'utf-8');
ini_set('magic_quotes_runtime', 0);
ini_set('magic_quotes_sybase', 0);
ini_set('memory_limit','64M');

I don't know if it'll make any difference if it's placed anywhere else (enlighten me, happy to know), but it works.

After confirmation, I deleted the added memory_limit line in the "ini.php" and everything still works fine.

 

I almost went for the third option, which seems reasonable after knowing that the server's php memory limit are set as default and I think it'll work the same. (I didn't go for it cause I didn't want to affect other websites under the server, or rather, I don't know if it will).

 

Hope this helps.

 
  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...
  • 1 month later...

open "config.inc.php" in folder "config",
put this code at the very end line

/* Improve PHP configuration to prevent issues */
ini_set('default_charset', 'utf-8');
ini_set('magic_quotes_runtime', 0);
ini_set('magic_quotes_sybase', 0);
ini_set('memory_limit','64M');

it works for me,
thank you

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

I had the same problem with the Payment tab not loading, and giving the same error as posted above about memory limit. I inserted the php.ini file in root and admin folders and I also added

 

<?php

ini_set("memory_limit","128M");

?>

 

to the config.inc.php, module.php and paypal.php files, the Payment tab NOW loads, however it still shows an error which says something like:

 

Not all modules could load due to memory limit restrictions, please increase memory values in your server configuration.

 

I also get this error in the website when trying to pay with paypal:

 

Check your configuration:

  • PayPal response:
  • TIMESTAMP -> 2011-12-30T00:45:00Z
  • L_ERRORCODE0 -> 10002
  • L_SHORTMESSAGE0 -> Security error
  • L_LONGMESSAGE0 -> Security header is not valid
  • L_SEVERITYCODE0 -> Error
  • PayPal gave an error

do you know if this is related and if the payment tab error can still be fixed?

 

Thanks

apprentice

 

You're a bloody star! I tried the config file and it worked! Than you!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...