Re: memory_limit Setting?

From: Date: Fri, 26 Jan 2007 20:20:51 +0000
Subject: Re: memory_limit Setting?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-247848@lists.php.net to get a copy of this message
On Friday 26 January 2007 19:35, Jay Paulson wrote: > Hi everyone, > > I¹m trying to upload a 25MB file via PHP and I¹m setting the memory limit > way high so I don¹t get a fatal error from php (the error is below). What > I find really odd about this is that the error message says that PHP tried > to allocate almost 54MB. First question is why is PHP allocating so much > memory when I¹m only uploading a 25MB file? Second question is why is PHP > failing when obviously the memory limit is set to just over 100MB? (I¹m > using PHP 5.1.2 Apache 2.0.55 and using an .htaccess file to change the PHP > settings on the fly.) > > > Fatal error: Allowed memory size of 104857600 bytes exhausted (tried to > allocate 53764163 bytes) in /path/to/php/file on line 942 > > .htaccess settings below: > > php_value memory_limit 100M > php_value post_max_size 30M > php_value upload_max_filesize 30M > php_value max_execution_time 300 > php_value max_input_time 300 > php_value display_errors On In these days combining UTF-8 with serialize commands gives memory problems. Is your code coantains this combination. ?

« previous php.general (#247848) next »