ID:               22158
 Comment by:       jpulk at unumprovident dot com
 Reported By:      greg at getnetez dot com
 Status:           Analyzed
 Bug Type:         Documentation problem
 Operating System: Red Hat 8.0
 PHP Version:      4.2.2
 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[2003-02-10 19:28:02] [EMAIL PROTECTED]

This needs a bit clarifying in the docs..

M (or K) can only be used in php.ini file. In .htaccess / httpd.conf
you have to use plain integer for the bytes.


------------------------------------------------------------------------

[2003-02-10 18:52:52] greg at getnetez dot com

First off, I think you guys are great and I would be at a loss without
you.... so many-many thanks....

But..... while troubleshooting a file upload issue with imp (standard
thing reported many times in a number of different varieties
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 Red Hat RPMs instead of real
files.... 

Anyway.... the possible "bug" is that the documentation specifically
states that all three of these configuration directives are of type
integer and the default is "8M"... it seems to me that should be
8000000 if the unit is bytes. And, even the units of the directive is a
bit unclear and should be clearly stated, I think.

Thanks for your patience and good work.... and if this isn't in line...
well I fixed my problem so I'm still thrilled with you folks.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=22158&edit=1


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to