Allowed memory size of 268435456 bytes exhausted

Pennywise83 picture Pennywise83 · Oct 11, 2010 · Viewed 74.9k times · Source

Possible Duplicate:
Allowed memory size of X bytes exhausted

I'm handling with a quite little big database (87mb) import and to do that I use a php script. All the operations are made in locale with an apache installation on Ubuntu Lucid.

When I run the script after few minutes I receive this error:

Allowed memory size of 268435456 bytes exhausted 

I've changed memory_limit to 2GB in php.ini file and restarted apache. After that I've checked phpinfo() and I see that memory_limit is set to '2048M' so all is ok.

But when i relaunch my script i receive the same error, 256mb memory limit exahusted.

Where am I wrong?

Answer

Jsventer picture Jsventer · Oct 9, 2011

If the script you are using is borrowed from someone else make sure there is no ini_set('memory_limit', '256M') which would produce the exactly effect you are seeing in spite of any change you made in php.ini.