memory_limit Setting?
| From: | Jay Paulson | Date: | Fri, 26 Jan 2007 17:35:12 +0000 |
| Subject: | memory_limit Setting? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-247842@lists.php.net to get a copy of this message | ||
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