Re: Out of Memory error

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

 



Check the filesize before you attempt to load it. For uploads you can
set maximum allowed uploads... can't remember if that is sufficient to
catch the problem before it becomes a fatal error. 

Cheers,
Rob.



On Thu, 2007-08-23 at 17:35 +0200, Wouter van Vliet / Interpotential
wrote:
> I've got a followup question to this. Whenever you're doing something that
> takes too much memory, having a file uploaded that's bigger than max upload
> size (actually, not sure if that applies but I think it does) or when your
> script is taking too long to execute it just dies with a very unfriendly
> error.
> 
> Is there any way to catch these errors, stop the script in some other way
> just before it ends so we can provide some reasonable feedback to the user?
> 
> On 23/08/07, Robert Cummings <robert@xxxxxxxxxxxxx> wrote:
> >
> > On Fri, 2007-08-24 at 01:21 +1000, Naz Gassiep wrote:
> > > I'm getting out of memory errors in my image handling script, I *think*
> > > its because I'm handling images that are too large to fit in memory, but
> > > I thought I'd check before just upping the setting to 32mb.
> > >
> > > It is currently set to 16mb and I am working with a 2048x1536 image. Is
> > > it possible that the image is what is causing the scrip to OOM?
> >
> > Very likely.

-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

-- 
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