lk******@geocities.com (lawrence) wrote in message news:<da**************************@posting.google. com>...
nc@iname.com (Nikolai Chuvakhin) wrote in message news:<32**************************@posting.google. com>... lk******@geocities.com (lawrence) wrote in message
news:<da**************************@posting.google. com>...
I'm playing around with the code that runs my site. Suddenly I started
getting this error:
<b>Fatal error</b>: Allowed memory size of 8388608 bytes exhausted
(tried to allocate 311020 bytes) in
<b>/home/www/krubner/atp/mcIncludes/mcDatabase.php</b> on line
<b>72</b><br />
This has nothing to do with MySQL per se. Note that 8388608 bytes
is exactly eight megabytes. The default value for memory_limit
directive is in fact "8M". So your script simply ran out of memory.
Increase memory_limit or find a way to tame your script's apparent
memory hunger...
How does one test memory size in PHP? Am I looking for an array, or
series of arrays, that has more than 8 megs? That, I think, would make
sense: after the page has rendered, and printed to screen, the
software attempts to update the log info for that page, but that log
info might be huge, might easily be more than 10 megs. So my
hypothesis would be to go and look at that. But how does one test
memory size in PHP?
Let's assume I'm stumbling on log info. How does one log info in PHP?
Suppose I want to record the IP address of everyone visits my website.
Suppose it is a popular site. After awhile, the log file, with
everyone's IP address, is larger than 8 megs. How then, do I handle
the file? How does anyone deal with files larger than 8 megs in PHP?