prmag Posted December 16, 2011 Share Posted December 16, 2011 Some modules are loading and I get this message: The following module(s) could not be loaded: All modules cannot be loaded due to memory limit restriction reason, please increase your memory_limit value on your server configurationWhat is the recomended memory limit for prestashop on a server? I have now 20Mb for php.Is there is a workaround for this? or do I have to contact my hosting provider to increase the php memory on my server?Thanks,Bernie Link to comment Share on other sites More sharing options...
Carl Favre Posted December 16, 2011 Share Posted December 16, 2011 Hi prmag, You should ask your host provider to increase the memory_limit to 128Mo. 1 Link to comment Share on other sites More sharing options...
prmag Posted December 16, 2011 Author Share Posted December 16, 2011 Thanks, I will do that and let you know the results. Link to comment Share on other sites More sharing options...
prmag Posted December 16, 2011 Author Share Posted December 16, 2011 Its working now! Link to comment Share on other sites More sharing options...
Carl Favre Posted December 16, 2011 Share Posted December 16, 2011 Good news . So if it is fixed, could you add [solved] to your title? Thanks. Link to comment Share on other sites More sharing options...
bellini13 Posted December 16, 2011 Share Posted December 16, 2011 should sticky this, also is this in the install/upgrade guides and wiki now? Link to comment Share on other sites More sharing options...
Aldeag Posted December 16, 2011 Share Posted December 16, 2011 It is always a good idea, when you explain your problem here, that when you find a solution, not just mark it as "solved" but explain the steps you made to solve it. Many people can have the same problem and need to know the solution. Link to comment Share on other sites More sharing options...
Carl Favre Posted December 16, 2011 Share Posted December 16, 2011 Hi Aldeag, The solution has been given. You have to increase the memory_limit of your php.ini file. As bellini13 said, it would be a good idea to create a sticky of this issue as it is reported quite often. Link to comment Share on other sites More sharing options...
bellini13 Posted December 16, 2011 Share Posted December 16, 2011 You can try to add the following line to the config/config.inc.php file. If this does not work, then you may need to get your host provider to do this for you ini_set('memory_limit','128M'); 6 Link to comment Share on other sites More sharing options...
calouroj Posted January 9, 2012 Share Posted January 9, 2012 I had a memory_limit problem while trying to configure the PrestaShop Security module. First, I installed the php.ini master file by going to PHP config under my cpanel provided by my host. I changed the line for the memory_limit to "memory_limit = 128 ; Maximum amount of memory a script may consume (128MB)", but this did not fix my problem. I then added "ini_set('memory_limit','128M);" to my config/config.inc.php file as suggested by bellini13 and this solved the problem. Thank you! 1 Link to comment Share on other sites More sharing options...
BadgerDog Posted January 15, 2012 Share Posted January 15, 2012 A related but slightly different question, if someone could help me please? I was looking at the PHP info report and noticed this specific item. Current PHP variables… memory_limit Local Value 134217728 Master Value 64M Since I've installed the PrestaShop on the same dedicated server as our vBulletin forums, I've been experiencing some anomalies and strange site outages. We've always run a caching program called vB Optimise for use with vBulletin (uses Memcache) without any problem and for some reason, since installing the shop, something is preventing the AJAX calls that vB Optimise performs for its self check, causing it to fail. So, I'm not a programmer, but I'm trying to track down what could possibly be the problem. The local master value for PHP memory used to be exactly the same as the local value, but now I notice that it's different, indicating that something new is causing the value to be increased to 128MB allocated for PHP Memory, over riding the master value of 64MB. Is it possible that some module in PrestaShop or it's add-ons is doing this and where can I check to validate if this increase value is coming from the programming of this new sshop environment. Thanks for any feedback .. Regards, Doug Link to comment Share on other sites More sharing options...
timmac Posted January 29, 2012 Share Posted January 29, 2012 Hello..im completely new to this..im trying to change my theme on my prestashop. I download a template & exported the contents to my prestashop root directory as instructed. When i log in to my admin, and go area where i can use the themeinstaller module...i get this message The following module(s) could not be loaded: All modules cannot be loaded due to memory limit restriction reason, please increase your memory_limit value on your server configuration I have read the comments, but not sure as to where to find the file to increase the limit..am i just better of telling my hosing company to do it?? many thanks in advance Link to comment Share on other sites More sharing options...
Carl Favre Posted January 30, 2012 Share Posted January 30, 2012 Hi new-to-prestashop, You can first ask your host, but otherwise as said previously you can modify your php.ini or config.inc.php. Link to comment Share on other sites More sharing options...
mothershop Posted March 5, 2012 Share Posted March 5, 2012 I emailed my host they said i had to do it myself. I'm not a programmer & don't really know how to do it alone. Can someone advise? Link to comment Share on other sites More sharing options...
eMizZ Posted March 9, 2012 Share Posted March 9, 2012 You can see the solution here : http://emilienmalbranche.fr/prestashop-ecommerce-tutoriels/tutoriels/probleme-sous-prestashop-augmenter-la-valeur-du-memory_limit/ Link to comment Share on other sites More sharing options...
Anirban Posted March 14, 2012 Share Posted March 14, 2012 Hello guys, I'm having the same issue with a brand new 1.4.7 installation. This is the message which I'm getting when I try to get a listing of all the modules so that I can start enabling disabling modules. Error Message is: The following module(s) could not be loaded: All modules cannot be loaded due to memory limit restriction reason, please increase your memory_limit value on your server configuration These are the fixes which I've tried and nothing has changed. 1. Changes in Tools.php public static function getMemoryLimit() { //$memory_limit = @ini_get('memory_limit'); $memory_limit = "2048M"; /*if (preg_match('/[0-9]+k/i', $memory_limit)) return 1024 * (int)$memory_limit; if (preg_match('/[0-9]+m/i', $memory_limit)) return 1024 * 1024 * (int)$memory_limit; if (preg_match('/[0-9]+g/i', $memory_limit)) return 1024 * 1024 * 1024 * (int)$memory_limit;*/ return $memory_limit; } 2. Changes in config.inc.php ini_set('memory_limit', '128M'); 3. Got the host to change the memory to the max which they can allow for a while to test this issue out. 4. Tried to over-ride php.ini and set my own values which were reflecting in phpinfo(). and still no cure for this. Please help me on this and let me know if there's any other possible solution to this. Regards, Anirban. 1 Link to comment Share on other sites More sharing options...
Pippo3000 Posted April 24, 2012 Share Posted April 24, 2012 Hi prmag, You should ask your host provider to increase the memory_limit to 128Mo. salut carl. quick questions. is 128 mandatory? I mean on your page with system requirements it says memory_limit à"64M" et file_max_upload_size à "16M" so which one is correct now? also, the 64M is stated as being 'optional'. I am asking because I want to upgrade my 1.3.x to 1.4.x and do not know whether it will work. my hosting provider offers currently 60M. phil Link to comment Share on other sites More sharing options...
bellini13 Posted April 24, 2012 Share Posted April 24, 2012 I have seen that most v1.4 installs required 128MB, but only if you need to review the modules page in the back office, or the translation pages. This is because there is just so much information that needs to be held within memory. if you do not use the translation pages, or you delete unused modules from the filesystem, then you can likely get by with 60MB Link to comment Share on other sites More sharing options...
Carl Favre Posted April 24, 2012 Share Posted April 24, 2012 Hi Pippo3000, As bellini13 said if you have many modules enabled and want the modules page to be displayed you have to get 128Mo. Link to comment Share on other sites More sharing options...
Pippo3000 Posted April 24, 2012 Share Posted April 24, 2012 if you have many modules enabled alright, how much is 'many' then? and is deactivating modules enough or do I really need to uninstall/delete them physically? I ask because I surely will need the modules page for changing some things every once in a while (if only google sitemap or homepage slides). right now I have maybe 44 modules installed and active (many of them just free blocks) + all the statistics modules. would that be too much for 1.4.x? I could ged rid of the majority of the statistics modules as the only one I use is the 'users online', any other statistics I get from google analytics anyway. any advice is appreciated phil Link to comment Share on other sites More sharing options...
Carl Favre Posted April 24, 2012 Share Posted April 24, 2012 With your current configuration you are most likely to have a blank page on the modules page. Uninstall the modules you do not use. The best is to duplicate your shop so you can upgrade, check the modules page and plan what to do for the real upgrade. Link to comment Share on other sites More sharing options...
Pippo3000 Posted April 24, 2012 Share Posted April 24, 2012 With your current configuration you are most likely to have a blank page on the modules page. Uninstall the modules you do not use. The best is to duplicate your shop so you can upgrade, check the modules page and plan what to do for the real upgrade. thx Link to comment Share on other sites More sharing options...
mrdibb Posted April 26, 2012 Share Posted April 26, 2012 Hi all I have just installed Prestashop (hoping to change from oscommerce). But the modules and payment tabs are not fully loading (see attachment). I have increased the memory limit to 128M in php.ini and config/config.inc.php - but it hasn't solved the problem. Any help would be appreciated! Thanks. Link to comment Share on other sites More sharing options...
mrdibb Posted May 1, 2012 Share Posted May 1, 2012 After some further investigation, it seems that if I remove all the modules then the page will load. But as soon as I install a module (even just 1!) then it fails to load. Can anyone help? Thanks. Link to comment Share on other sites More sharing options...
Carl Favre Posted May 2, 2012 Share Posted May 2, 2012 Hi mrdibb, Enable the debug mode to see what kind of error message you get on these pages. To do it, edit config.inc.php in \config folder and change /* Debug only */ @ini_set('display_errors', 'off'); define('_PS_DEBUG_SQL_', false); to /* Debug only */ @ini_set('display_errors', 'on'); define('_PS_DEBUG_SQL_', false); 1 Link to comment Share on other sites More sharing options...
mrdibb Posted May 3, 2012 Share Posted May 3, 2012 Thanks Carl I now have the error message: Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /[dir]/classes/Tools.php on line 2273 Fatal error: Call to undefined function libxml_use_internal_errors() in /[dir]/classes/Module.php on line 541 Link to comment Share on other sites More sharing options...
Carl Favre Posted May 3, 2012 Share Posted May 3, 2012 Hi mrdibb, Could you give me in PM your back office + FTP credentials so a developer can take a look? Thanks. Link to comment Share on other sites More sharing options...
LukaszOrz Posted May 28, 2012 Share Posted May 28, 2012 Hi mrdibb, Could you give me in PM your back office + FTP credentials so a developer can take a look? Thanks. I have same problem like MRDIBB but me message is Fatal error : Cannot redeclare class helperfn in /modules/shipwire/HelperFn.php on line 3 What i can do now ?? How to fix it ?? Link to comment Share on other sites More sharing options...
kapees Posted May 28, 2012 Share Posted May 28, 2012 So I will add my error as well Fatal error : Cannot redeclare class ShipwireInventoryUpdate in xxx/modules/shipwire/lib/ShipwireInventoryUpdate.php on line 32 Please help Link to comment Share on other sites More sharing options...
rseigel Posted August 25, 2012 Share Posted August 25, 2012 Same here. I'm soooooo glad they waited until it was actually working before they released it. /sarcasm Checking the Upgrade Now button should have been on the list no!?!? Link to comment Share on other sites More sharing options...
namye007 Posted August 26, 2012 Share Posted August 26, 2012 It works! great!. thank you genius. Thumbs up. Link to comment Share on other sites More sharing options...
namye007 Posted August 26, 2012 Share Posted August 26, 2012 You can try to add the following line to the config/config.inc.php file. If this does not work, then you may need to get your host provider to do this for you ini_set('memory_limit','128M'); It works! great!. thank you genius. Thumbs up. Link to comment Share on other sites More sharing options...
silviu_25 Posted November 12, 2013 Share Posted November 12, 2013 You can try to add the following line to the config/config.inc.php file. If this does not work, then you may need to get your host provider to do this for you ini_set('memory_limit','128M'); Thank you, this solved my problem Link to comment Share on other sites More sharing options...
benjamin utterback Posted November 12, 2013 Share Posted November 12, 2013 For memory and other related problems,like translations not loading, csv not importing fully, images not being regenerated, module pages not loading, etc.. please read the blog post about php.ini found in my signature. That should help you out.Cheers, Link to comment Share on other sites More sharing options...
epsilongr Posted July 2, 2014 Share Posted July 2, 2014 You can try to add the following line to the config/config.inc.php file. If this does not work, then you may need to get your host provider to do this for you ini_set('memory_limit','128M'); Thanks Bellini.I found your post.After i change server i had this problem.Even php.ini file was right.After i add this line it is working great. Thanks,Thanks,Thanks Link to comment Share on other sites More sharing options...
GuerillaBeek Posted September 9, 2015 Share Posted September 9, 2015 (edited) You can try to add the following line to the config/config.inc.php file. If this does not work, then you may need to get your host provider to do this for you ini_set('memory_limit','128M'); I added the "ini_set" line and my site disappeared. When I restored the original config/config.inc.php file the site is still unreachable. I get nothing but a blank screen. Can you or anyone else help me resolve this issue? This is the error I receive after adding: @ini_set('display_errors', 'on'); define('_PS_DEBUG_SQL_', true); to the config.inc.php file Fatal error: Uncaught exception 'Adapter_Exception' with message 'Service container is not set.' in /home/omnomnut/public_html/omnom/Adapter/Adapter_ServiceLocator.php:49 Stack trace: #0 /home/omnomnut/public_html/omnom/classes/ObjectModel.php(232): Adapter_ServiceLocator::get('Adapter_EntityM...') #1 /home/omnomnut/public_html/omnom/classes/shop/Shop.php(131): ObjectModelCore->__construct('1', NULL, NULL) #2 /home/omnomnut/public_html/omnom/classes/shop/Shop.php(397): ShopCore->__construct('1') #3 /home/omnomnut/public_html/omnom/config/config.inc.php(100): ShopCore::initialize() #4 /home/omnomnut/public_html/omnom/admin8080/index.php(36): require('/home/omnomnut/...') #5 {main} thrown in /home/omnomnut/public_html/omnom/Adapter/Adapter_ServiceLocator.php on line 49 Edited September 9, 2015 by GuerillaBeek (see edit history) Link to comment Share on other sites More sharing options...
somits1 Posted November 6, 2015 Share Posted November 6, 2015 Hi, I am using prestashop 1.5.6 english version, I have deleted 4 files from my httpdocs folded "product.php, productdownload.php, productsale.php, product supplier.php and configuration.php" After deleting these file my site was not working then i paste these file again on same location. But after that my site is working too slow. taking 10+ sec to load. please help me to solve the issue. please check my site http://slmobileprice.com Thanks, Somit Link to comment Share on other sites More sharing options...
c9141 Posted July 2, 2016 Share Posted July 2, 2016 (edited) You can try to add the following line to the config/config.inc.php file. If this does not work, then you may need to get your host provider to do this for you ini_set('memory_limit','128M'); 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):- Add a line "memory_limit = **M" to the ini.php file. Add a line "ini_set('memory_limit','**M');" to the config.inc.php file. 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. I initially 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. As mentioned, 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. Edited July 2, 2016 by c9141 (see edit history) Link to comment Share on other sites More sharing options...
plum shop online Posted January 5, 2017 Share Posted January 5, 2017 Hello Everyone! I added the following line ini_set('memory_limit','128M'); To the config/config.inc.php file. In fact, my hosting provider did it for me and I GET A 500 CODE ERROR I can change the translation of everything: front office, emails, etc. BUT NOT the translation of modules installed and I need to change the translation of the modules installed. PLEASE HELP I keep getting the waring message to change the PHP settings only when I want to change the translation of modules installed. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now