Bug #17707 Updated: ini_set and upload_max_filesize

From: Date: Tue, 11 Jun 2002 17:35:29 +0000
Subject: Bug #17707 Updated: ini_set and upload_max_filesize
References: 1  Groups: php.bugs php.doc 
Request: Send a blank email to php-bugs+get-10139@lists.php.net to get a copy of this message
ID: 17707 Updated by: sander@php.net Reported By: tr909@bigfoot.com -Status: Open +Status: Bogus Bug Type: Documentation problem Operating System: linux 7.1 PHP Version: 4.1.2 New Comment: The settings will be changed if you're using ini_set() but as the uploaded file will be accepted BEFORE your script runs, this stuff has no effect. Same applies for post_max_size and a couple of other settings. Previous Comments: ------------------------------------------------------------------------ [2002-06-11 12:31:57] tr909@bigfoot.com Hello great PHP, i stumble over and over on 'upload_max_filesize' > ini_set('upload_max_filesize','8M'); > var_dump( ini_get('upload_max_filesize') ); this returns a nice string(2) "8M", but if you do a var_dump($HTTP_POST_FILES) after uploading a 3MB movie it returns: > array(1) { ["ufile"]=> > array(4) { ["name"]=> string(19) "PN.mpg" > ["type"]=> string(10) "video/mpeg" > ["tmp_name"]=> string(4) "none" > ["size"]=> int(0) > } > } ONLY if you change upload_max_filesize in php.ini then will it listen to the correct size.... ini_set() function documention says... 'Returns the old value on success, FALSE on failure.' this means that ini_set() should return FALSE if you cannot set upload_max_filesize in your script OR that the max-upload-size should be set to the new value and accepted. at the moment this is very confusing because it returns the old value. Even init_get() returns the newly set value. In the end upload_m-fsize is as set in the ini file. Tr909 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17707&edit=1

« previous php.bugs (#10139) next »