ID: 22158 Updated by: [EMAIL PROTECTED] Reported By: greg at getnetez dot com -Status: Analyzed +Status: Closed Bug Type: Documentation problem Operating System: Red Hat 8.0 PHP Version: 4.2.2 New Comment:
This is now closed, K and M have now been documented. Here are the changes: http://marc.theaimsgroup.com/?l=phpdoc&m=109168160715454 Leaving type as integer. Previous Comments: ------------------------------------------------------------------------ [2003-05-27 08:15:25] phpmail at jawbone dot freeserve dot co dot uk http://www.php.net/manual/en/configuration.directives.php claims that the upload_max_filesize directive accepts an integer (with a handy link to the definition of integer). http://www.php.net/manual/en/language.types.integer.php defines an integer as "a number of the set Z = {..., -2, -1, 0, 1, 2, ...}", and that "integers can be specified in decimal (10-based), hexadecimal (16-based) or octal (8-based) notation, optionally preceded by a sign (- or +)". The "8M" notation is not a valid integer, and additionally it is not defined anywhere in the manual. Is "M" 1 million or 1024^2? "K" is mentioned nowhere, as far as I can tell. ------------------------------------------------------------------------ [2003-03-27 02:08:58] lampa at brutusmud dot net I have similar problem. I need in one directory enable upload larger files (tens of MB) - i can change vi .htaccess directive upload_max_filesize to 100M but can't change in any way (except php.ini) post_max_size directive. I tried these values: 102M, 100000000 in .htaccess, httpd.conf but no effect. In docs (http://www.php.net/manual/en/configuration.directives.php) you can found that this variable can be set in .htaccess or httpd.conf (and php.ini ...). Bug or feature ? ------------------------------------------------------------------------ [2003-03-06 20:01:29] pmoulding at tedis dot com dot au I ran a test using PHP 4.3.0 and the latest Apache 2 on a little NT workstation. The test added a 1 Mb string to an array 1000 times. The test ran to completion despite php.ini containing a limit of 8M. I ran the test because I need an example page showing the memory limit exceeded message. So far, the message has not popped up no matter what I do. I sometimes use .htaccess but not in the Web site where I ran the test. The Apache .conf has the bare minimum settings to get PHP running. I do not remember any settings overriding PHP.ini. PHP is installed using the 4.3.0 release binary so has no compile time overrides by me. I use the module version, not CGI. The test script ran quickly so I though PHP might have dropped the extra data. NT reported the process using the full gigabyte so PHP must have allocated the gigabyte. Please list additional places where I should look for memory limit overrides if I missed any in the above list. Peter ------------------------------------------------------------------------ [2003-02-21 15:30:04] greg at getnetez dot com The php.conf file I found is actually in the configuration directives for Apache 2.0 As php is running as an apache module, I'd have to say it makes sense to me that the php.ini values are subordinate to the webserver configuration. But... on the good side :-) Your upload limits are right on target with what I found as limits in my Apache 2.0 configuration. So, if you can change your Apache config files or get the adminstrator thereof to do so... you should be able to post the large pics as well. Cheers, Greg ------------------------------------------------------------------------ [2003-02-20 08:27:54] jpulk at unumprovident dot com Shouldn't the values in php.ini have precedence over this value in php.conf. If not then this make ini_set pretty useless when a developer wants to upload larger files and doesn't have access to change the php.conf file. I have experienced a similar situation which i will describe. --------------------------------------------------------- Ok. I have an upload script that was only allowing me to upload files in the several hundred byte range even though the upload_max_filesize in php.ini is set at 2M. So I moved all the files to a new server. Now I am limited to anything over 450KB. Again the value in php.ini is set at 2M. it is almost like a tmp copy of the image isn't getting copied to the server with the larger images because I get an error: Warning: getimagesize: Unable to open '' for reading. in /home/public_html/uploadimage.php on line 75 The same picture, same name, same dimensions brought into PhotoShop and saved with a lower quality rating will upload no problem. When I: print_r($_POST); print_r($_FILES); I Get: ( [MAX_FILE_SIZE] => 8000000 [Submit] => Submit Picture ) Array ( [myfile] => Array ( [name] => myfile3.jpg [type] => image/pjpeg [tmp_name] => /tmp/php8SdQOI [error] => 0 [size] => 436817 ) ) This is with a file that works. When I throw a file of size 835213 at it both arrays are empty. --------------------------------------------------------- My original assumption was that it was 450KB because that is what i had for a file. I worked over my image in photoshop some more. So that i had a 520,292byte file and a 529,034 byte file. The slightly smaller on will upload. It�s amazing. I have not had the php.conf file changed on the server yet because i do not have those permissions but it sounds like this is my problem. If so how will this bug (if a bug) be resolved. No one on any php forums that i could find, could explain this situation to me until i landed here. This situtation should be better annonce in my opinion. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/22158 -- Edit this bug report at http://bugs.php.net/?id=22158&edit=1
