On Fri, January 26, 2007 11:35 am, 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 The real question is how did you manage to use up 75 Meg in the first 941 lines of your code?... :-) Actually, look at phpinfo() output to be SURE your .htaccess values are kicking in. If they don't show up under the "Local" column, your .htaccess isn't working. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php