Re: [HTML_Form] cant change values in array after getAll()
| From: | Stig S. Bakken | Date: | Fri, 31 May 2002 17:25:41 +0000 |
| Subject: | Re: [HTML_Form] cant change values in array after getAll() | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1551@lists.php.net to get a copy of this message | ||
How short can you make your script and still provoke this error? 8MB
seems a bit far-fetched.
- Stig
On Thu, 2002-05-30 at 19:16, Zachery Hostens wrote:
> im using PHP 4.1.2 and the stock PEAR with MySQL
>
> i get the array using DB::getAll() fine
>
> but when i try to go
>
> 18 for( $i=0; $i<=count($res); $i++ ) {
> 19 $res[$i]['stamp'] = date( 'l, F dS @ h:i A',
> $res[$i]['stamp'] );
> 20 }
>
> i get this error ::
>
> Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 40 bytes) in
> /home/zacheryh/htdocs/news.php on line 19
>
> Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 40 bytes) in
> Unknown on line 0
>
>
> i have checked that the var is there in the array and it is a correct
> unix epoch. if i change the for() loop to this it works perfectly fine ::
>
> 18 for( $i=0; $i<=count($res); $i++ ) {
> 19 echo date( 'l, F dS @ h:i A', $res[$i]['stamp'] );
> 20 }
>
> it will then work perfectly fine...
>
> i was wondering what maybe causing this and how i can go about fixing ???
>
> thanks in advance.
> ~ Zachery
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php