Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fatal error: Allowed memory size of 8388608 bytes exhausted 1

Status
Not open for further replies.

superjett

MIS
Jun 18, 2004
62
US
Not even sure where to start on this one.

Running Apache 2.0.52, PHP 4.3.9, and Fedora core 3.

I have an export to Excel .php that pulls data from SQL 2000 based on a date range you enter. If you have over x amount of data, I get the error
Code:
Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 2255099 bytes) in /htdocs/excel.php on line 30

Any suggestions on which way to go, PHP or Apache or Linux, or how to allocate more memory for this function?
 
BTW, Linux box is 800mhz, 512mb, etc., more than capable of the small site I'm running.
 
Hi,
It's a configuration issue.
take a look in php.ini file
you should have a line like:
Code:
memory_limit = 8M

change that value 8M to a bigger value, let's say 12M

Restart apache, and see what you get.


Regards,

PM

___
____
 
Thanks for the point/nudge, I'm toying with it now, but may have to set it to -1 for unlimited and use memory_get_usage() to see what my needs are for this script as the db I'm pulling from will eventually get quite large.
 
Just as a conclusion, I came up with about 1.5K/row (83 columns of floating point data) so to get a year's worth of data I came up with around 52Mb. I'll run with that for now.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top