Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Allowed Memory size exhausted
 
alli
Jr. Member
 
Total Posts:  3
Joined:  2007-08-31
 

ok, I’ve just installed magento on my mac running the latest MAMP release and for every page except the index page I’m getting these errors:

[31-Aug-2007 20:10:57] PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 140 bytes) in /Applications/MAMP/htdocs/magento/app/code/core/Mage/Page/Block/Html/Pager.php on line 200
[31-Aug-2007 20:13:49] PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 19456 bytes) in /Applications/MAMP/htdocs/magento/lib/Varien/Filter/Template.php on line 172
[31-Aug-2007 20:16:45] PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 140 bytes) in /Applications/MAMP/htdocs/magento/app/code/core/Mage/Review/Model/Review/Summary.php on line 34
[31-Aug-2007 20:16:54] PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 140 bytes) in /Applications/MAMP/htdocs/magento/app/code/core/Mage/Review/Model/Review/Summary.php on line 34
[01-Sep-2007 00:38:27] PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 8192 bytes) in /Applications/MAMP/htdocs/magento/app/design/frontend/default/default/template/page/html/top.links.phtml on line 1

Anyone got any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
jsperri
Sr. Member
 
Total Posts:  126
Joined:  2007-08-31
Fistufle
 

You should increase the memory_limit value in your php.ini file for your webserver.
Check the line memory_limit =
First try to double the value (16M)

 
Magento Community Magento Community
Magento Community
Magento Community
 
alli
Jr. Member
 
Total Posts:  3
Joined:  2007-08-31
 

Ok i’ve tried that with no luck, I’d have thought its a limit set in each script somewhere but can’t say I’ve got the time to take this on yet :/

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Don’t forget to restart httpd service after changing php.ini values

 
Magento Community Magento Community
Magento Community
Magento Community
 
beazleybub
Jr. Member
 
Avatar
Total Posts:  28
Joined:  2007-08-31
 

If 16M dosent work go higher untill it does. Worked for me. Like Magento team said remember to restart your server.

Thanks Magento team.

 
Magento Community Magento Community
Magento Community
Magento Community
 
simonyoung
Member
 
Total Posts:  34
Joined:  2007-08-31
 

Changing memory_limit to read 32M in php.ini on a current release of MAMP fixed the problem for me immediately.

 
Magento Community Magento Community
Magento Community
Magento Community
 
alli
Jr. Member
 
Total Posts:  3
Joined:  2007-08-31
 

ah right, cool it works: set it to “32M”. =]

 
Magento Community Magento Community
Magento Community
Magento Community
 
Redman
Jr. Member
 
Total Posts:  6
Joined:  2007-10-06
 

Why does it need so much memory? The default for the majority of web hosts is 8 meg....

 
Magento Community Magento Community
Magento Community
Magento Community
 
ralf m. peters
Jr. Member
 
Avatar
Total Posts:  1
Joined:  2007-11-03
 

Just to mention a topic when using MAMP and MAMP PRO:

Be aware that the two apps use DIFFERENT php.ini files!

For example the MAMP uses this

(1) /Applications/MAMP/conf/php5/php.ini
whereas MAMP PRO uses this:
(2) /Applications/MAMP PRO 1.7/MAMP PRO.app/Contents/Resources/php5.ini

Even though both apps are installed when using MAMP PRO, they use different php.ini.
(BTW: Same thing with httpd.conf, my.cnf and php4.ini.)

The problem is, that the phpinfo() says something different, too:

Configuration File (php.ini) Path:     /Applications/MAMP/conf/php5
and afterwards in the next line it says:
(3) Loaded Configuration File:     /Library/Application Support/living-e/MAMP PRO/conf/php.ini

And to that directory the php.ini from (2) is copied when MAMP PRO ist started.

One can easily see the effekt when changing tbe (3)-File and restart MAMP PRO. The values are reset to the values in (2).

Hope this will helpfull for someone.

Greets

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nexus Rex
Sr. Member
 
Avatar
Total Posts:  139
Joined:  2008-07-10
Utah, USA
 

What if I get a similar error while trying to upgrade via PEAR from Terminal?

$ ./pear upgrade magento-core/Mage_All_Latest
PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 13 bytes) in /Applications/MAMP/htdocs/mysite/downloader/pearlib/php/PEAR/Registry.php on line 1061

 
Magento Community Magento Community
Magento Community
Magento Community
 
stiepan
Jr. Member
 
Total Posts:  9
Joined:  2009-12-08
 

then you need to edit /etc/php5/cli/php.ini (or the corresponding file on your system) and set a high enough value for memory_limit

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagePsycho
Mentor
 
Avatar
Total Posts:  1702
Joined:  2009-06-23
 

Alternatively in .htaccess:

php_value memory_limit 512M
php_value max_execution_time 18000
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top