dano1979 Posted February 17, 2014 Share Posted February 17, 2014 Hello, I'm having an issue getting Prestashop to recognize the php memory_limit. My environment: LAMP Stack (Virtual Machine) SMP Debian 3.2.51-1 Apache 2.2.22 PHP 5.4.4 Prestashop 1.5.6.2 In my php.ini I have specified a memory limit of 1024M however when I look at Prestashop Advanced parameters configuration information it only shows 256M. A separate script outside of Prestashop using phpinfo() shows 1024M. I've also added ini_set('memory_limit','1024M'); to config.inc.php. Thanks,Dan Link to comment Share on other sites More sharing options...
DevNet Posted February 17, 2014 Share Posted February 17, 2014 Hi, The highest allowed by your host is 256 Mg. Not more. It's certainly an initial limit by the cluster configuration of your hoster. Regards Link to comment Share on other sites More sharing options...
dano1979 Posted February 17, 2014 Author Share Posted February 17, 2014 It's hosted in my office on VMWare no limitations, no cluster or hoster. Link to comment Share on other sites More sharing options...
Dh42 Posted February 17, 2014 Share Posted February 17, 2014 Do you have it in a main php.ini file or a child file? Link to comment Share on other sites More sharing options...
dano1979 Posted February 17, 2014 Author Share Posted February 17, 2014 I am using the main php.ini for reference it's located here: /etc/php5/apache2/php.ini phpinfo() in a test php script with in the prestashop root directory show's the memory_limit as it is in php.ini yet Prestashop is reporting differently and I have a module that fails due to memory limit being exceeded, the error indicates the memory_limit as 256M. This is the error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 97 bytes) Link to comment Share on other sites More sharing options...
Dh42 Posted February 17, 2014 Share Posted February 17, 2014 How much memory do you have allocated to the vm? and how much is it using? Link to comment Share on other sites More sharing options...
dano1979 Posted February 17, 2014 Author Share Posted February 17, 2014 I have 2GB allocated but can allocate more if needed. Using about 500MB currently. Link to comment Share on other sites More sharing options...
Dh42 Posted February 17, 2014 Share Posted February 17, 2014 My best guess is that your vm is set up incorrectly or your php has another ini file. Link to comment Share on other sites More sharing options...
dano1979 Posted February 17, 2014 Author Share Posted February 17, 2014 I have 1 php.ini file in use. My concern is everything but prestashop shows that i'm using 1024M. Test scripts with phpinfo() indicated the correct path to the ini and also show the memory_limit as 1024M. I'm confident the VM is setup correctly and I only have 1 php.ini file. Link to comment Share on other sites More sharing options...
DevNet Posted February 17, 2014 Share Posted February 17, 2014 I am using the main php.ini for reference it's located here: /etc/php5/apache2/php.ini phpinfo() in a test php script with in the prestashop root directory show's the memory_limit as it is in php.ini yet Prestashop is reporting differently and I have a module that fails due to memory limit being exceeded, the error indicates the memory_limit as 256M. This is the error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 97 bytes) Typically error from an infinite loop. You've got an error code. Regards Link to comment Share on other sites More sharing options...
benjamin utterback Posted February 17, 2014 Share Posted February 17, 2014 At this point I would contact your hosting provider to give you the specifics regarding your php limits, the php.ini file and your vm setup. If the host is not communicating the memory limits with your PrestaShop files, there may be some configuration issue. Hello, I'm having an issue getting Prestashop to recognize the php memory_limit. My environment: LAMP Stack (Virtual Machine) SMP Debian 3.2.51-1 Apache 2.2.22 PHP 5.4.4 Prestashop 1.5.6.2 In my php.ini I have specified a memory limit of 1024M however when I look at Prestashop Advanced parameters configuration information it only shows 256M. A separate script outside of Prestashop using phpinfo() shows 1024M. I've also added ini_set('memory_limit','1024M'); to config.inc.php. Thanks,Dan Regarding the ini_set in the config.php, you should add/edit the memory limit in the php.ini file on your server. Your hosting provider can provide you details on how to edit it, or they can edit it themselves. It just doesn't look like the changes of php are reflected on your store. If it helps, there is a blog post on my signature regarding the php.ini file and how you can optimize it, but be aware that it may be different with your own vm and host. Link to comment Share on other sites More sharing options...
siomosp Posted August 13, 2015 Share Posted August 13, 2015 About different memory limit ,setted at php.ini and different value displayed at Prestashop configuration information problem. I had the same problem, 1024 M at php.ini , 256M displayed at configuration information The problem came from a custom module (prestaspeed in my case) witch have it is own ini_set settings .... Editing the file , and setting the Memory limit at 1024 , and now the configuration information display the correct memory If you have shell root access the command grep -r "ini_set('memory_limit*" /PATH_TO_YOUR_SITE , will show all the instances of memory limit The path in my case at centos 7 server is grep -r "ini_set('memory_limit*" /var/www/clients/client0/web2 Hope it helps Link to comment Share on other sites More sharing options...
rachit Posted September 30, 2015 Share Posted September 30, 2015 My site is http://www.backtomycharity.com/ in prestashop front end of site is working well but backened of site is very slow when we manualy decrease memory_limit=64m then error message show : All modules cannot be loaded due to memory limit restrictions, please increase your memory_limit value on your server configuration. My server information is below: Server information Linux #1 SMP Tue Dec 16 20:36:56 MSK 2014 x86_64 Server software version Apache/2.2.29 (Unix) mod_ssl/2.2.29 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 PHP version 5.4.33 Memory limit 2G Max execution time 0 please help as soon as possible. Link to comment Share on other sites More sharing options...
ps20 Posted September 30, 2015 Share Posted September 30, 2015 Thanks all 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