note 29352 deleted from configuration.directives by sniper

From: Date: Tue, 04 Nov 2003 00:46:56 +0000
Subject: note 29352 deleted from configuration.directives by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-59838@lists.php.net to get a copy of this message
Note Submitter: greg@getnetez.com ---- FILE UPLOAD FROM FORM A little note recording to save some users some time with upload_max_filesize ignored, post_max_size ignored and memory_limit doesn't matter while troubleshooting a file upload issue with the webmail system imp (standard thing reported many times in a number of different forums upload_max_filesize ignored and the likewise post_max_size ignored and even memory_limit doesn't matter) I first looked to my php.ini and started adjusting these settings to no avail. My actual problem was a gem of a file httpd/conf.d/php.conf which contained -- <Files *.php> SetOutputFilter PHP SetInputFilter PHP LimitRequestBody 524288 </Files> the cause of my httpd/errorlog file noting... "Requested content-length of 2172475 is larger than the configured limit of 524288" --> that's what I get for using Red Hat RPMs instead of real files.... Anyway, after adjusting the LimitRequestBody configuration directive there to 8000000 I was still unable to complete the attachment and send of a 2.4 meg zip file through the webmail system. After a few hours of tweaking numbers and searching for more clues I found The settings of upload_max_filesize = 8000000 post_max_size = 8000000 memory_limit = 30000000 and max_execution_time = 240 worked to upload and then chunk_split(base64_encode($contents)) which is the function from imp which was timing out or memory_limiting out on my not-to-shabby PowerEdge 1400SC server. I was a little shocked at how large the numbers needed to be. Anyway, I thought someone else might benefit from these numbers and clues as they would have saved me some trial and error. Cheers

« previous php.notes (#59838) next »