| 5:23 pm on Jan 6, 2008 (gmt 0)|
Without seeing the script it is nearly impossible to tell. At the very least, we need to know what these scripts do.
| 9:50 pm on Jan 6, 2008 (gmt 0)|
they're standard loops on the whole, but generally large ones buffering data into memory and then outputting to smarty.
I know these are fairly heavy on memory, my issue is that i wasn't getting these errors prior to my php5 upgrade whereas i am now even with substantially more memory allocated per script.
select Col1, Col2 from table
| 2:48 am on Jan 9, 2008 (gmt 0)|
I cannot see how a routine as simple as what you posted is going to change much between versions.
Either way, if you use mysql_fetch_assoc(), you could cut that memory usage down.
| 7:59 pm on Jan 9, 2008 (gmt 0)|
Check to see if you are doing includes() within loops. That is one practice that often sets the memory reeling.
| 10:31 pm on Jan 9, 2008 (gmt 0)|
Hi Coopster, nowt special i'm afraid, it's just a big export to csv, using mysql to pass to an array which passes to my CSV generator function.
around 1000 rows with around 20 fields per row.
it's the same script that didn't miss a beat on version 4 with 8mb per script, now it only manages when it's got 64mb of script memory.
I wonder if my server setup is the issue. I saw there were a number of memory leak issues in PHP 5.2 which were rectified, but this is 5.2.5 and aapprarently they've been fixed.
| 3:02 am on Jan 10, 2008 (gmt 0)|
Hey, I just installed PHP-5.2.5-r1 on my local Gentoo box and noticed this message. It reminded me of this thread.
|* With PHP 5.2, some extensions were removed from PHP because |
* they were unmaintained or moved to PECL. Our ebuilds reflect
* this: the Filepro and HwAPI (Hyperwave-API) extensions were
* removed altogether and have no available substitute.
* The Informix extension was also removed, as well as the optional
* memory-limit setting: memory-limit is now always enforced!
| 8:18 am on Jan 10, 2008 (gmt 0)|
interesting, so it might have been using the same amount of memory, just not kicking up a fuss about it.
Is there any way to see the exact script memory consumption in PHP4?
| 5:32 pm on Jan 10, 2008 (gmt 0)|
You can echo it to the browser at certain breakpoints in your script using memory_get_usage() [php.net] and flush() [php.net].