Re: Memory Allocation Error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you! That works.

On Nov 6, 2007 12:23 AM, Per Jessen <per@xxxxxxxxxxxx> wrote:
>
> heavyccasey@xxxxxxxxx wrote:
>
> > Hi!
> >
> > I have a script that reads a 120 MB remote file. This raises a Memory
> > Allocation Error unless I use:
> >      ini_set('memory_limit', '130M');
> >
> > I doubt this is good for my server... I tried both fopen and
> > file_get_contents. This used to work fine in PHP 4 until I upgraded to
> > PHP 5.
> >
> > Any ideas?
>
> If you need to keep a 120Mb file in core at any point in time, you'll
> need the memory.  Either adjust the memory-limit, or change your code
> to process the file in chunks/lines/bytes.
>
>
> /Per Jessen, Zürich
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux