Topic on Project:Support desk

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted [Resolved]

9
Ron Barker (talkcontribs)
MediaWiki 1.15.4
PHP 5.3.0 (apache2handler)
MySQL 5.1.36-community-log

I am hoping that someone may be able to assist me. I have been using the ‘SiteGround’ method of backing-up my wiki, unfortunately, there is a problem with the memory size shown in apache faults:

Tue May 24 10:09:35 2011] [error] [client 127.0.0.1] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 128368641 bytes) in C:\\wamp\\apps\\phpmyadmin3.2.0.1\\export.php on line 190, referer: http://localhost/phpmyadmin/db_export.php?db=mediawiki&server....

I have checked line 190 of export.php as below, which does not make any sense to me at all!

189 // We export as file - output normally

190 echo $line;

191 }

Kind regards

Ron Barker (talkcontribs)

I have just made things worse. I did some research and came up with changing the memory limit in php.ini from 128M to 150M and now I am unable to export anything, even after changing back to 128M

I would be grateful if anyone can help.

Emufarmers (talkcontribs)

Unchecked memory use is probably a given for that method. Increase the memory limit or find a better method (which might involve finding a better host).

Ron Barker (talkcontribs)

Thank you for your response. I have tried increasing the memory to no avail. I am using media wiki on my pc so I cannot change to a better host. Regards

Emufarmers (talkcontribs)

If increasing the memory limit isn't working, you're probably doing it incorrectly.

Since you're on your own machine, though, you don't actually have to use phpMyAdmin for your export.

Ron Barker (talkcontribs)

I think that you are probably correct in that I must be doing something incorrectly.

Many thanks for directing me to the discussion page which led me to:

http://www.mediawiki.org/wiki/Manual:Errors_and_Symptoms#Fatal_error:_Allowed_memory_size_of_nnnnnnn_bytes_exhausted_.28tried_to_allocate_nnnnnnnn_bytes.29

However, the information did not take me any further. One problem I have had is determining which php.ini should be edited! There are two php.ini files one under the PHP directory and the other under Apache/bin. Of course, there is another php.ini file that can be accessed from the taskbar. RJ45 Technologies was of some assistance but following their instructions did not help:

http://www.rj45tech.com/increasing_php_memory_limit_and_file_upload_size_wamp

I am not alone. There are many more people with the same problem as a quick Google of '134217728 bytes exhausted' shows.

I have looked at the mediawiki backup page. The instructions are fine if you know what they mean. You need to have more than a basic understanding of mediawiki to be able to follow the instructions. I could get into more trouble than I am already in if I tried to follow the instructions. To be honest I would not know where to start.

http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki

Many thanks though for at least responding.

Ron Barker (talkcontribs)

I appear to have resolved the issue. I really do not know what I was doing wrong but by changing the memory limit (using -1) in C:\Wamp\bin\apache2.2.11\bin\php.ini to unlimited the backup worked.

memory_limit = -1

Many thanks for responding which pushed me to try to solve the problem

66.44.228.18 (talkcontribs)

Ron you're amazing, no matter how high I set my allocation in the ini it would always cap out at 2GB and cut me off, after an hour of searching this is the only solution that worked. Thank you for your help and to anyone else visiting this page, this tip works.

198.103.109.141 (talkcontribs)

Thanks Ron, your solution worked for me as well and saved me lots of research/testing! Cheers, Pat.

Reply to "PHP Fatal error: Allowed memory size of 134217728 bytes exhausted [Resolved]"