Re: [PHP] upload_max_filesize not honored?

2003-10-29 Thread Marek Kilimajer
upload_max_filesize is INI_SYSTEM, that means it is not honored in your 
code. Set it the same way you set post_max_size

David T-G wrote:
Hi, all --

I am implementing a picture upload page which will accept single pictures
or zips of pictures, and I can't send anything bigger than 2M.
Because post_max_size must be set in php.ini or httpd.conf I have

  php_admin_value post_max_size 128M

set for my site, and in my code I have

  ini_set('upload_max_filesize',128M) ;
  ini_set('memory_limit',128M) ;
  ini_set('max_execution_time',300) ;
(do I need memory_limit set, or does temp file storage not impact
memory?), and in my form I have
  input name='MAX_FILE_SIZE' type='hidden' value='2'

all to ensure that I can upload.  I can happily upload individual 800k
files to about 4.6M (I only have half a dozen on hand :-) but I cannot
upload even a single zip file larger than 2M (though smaller zip files
work fine).  phpinfo() reports 128M for my post_max and max_filesize and
everything seems good to me.
When I try a smaller zip file, $_FILES[uploads][type][$k] properly
contains application/x-zip, but when I try a larger one it is empty
(in fact, the only thing with value, IIRC, is the name); the temp file
gets to a few bytes over 2M and then disappears.  If I put such a zip
file between two smaller files I see full entries for 0 and 2 while 1
(the zip file) is empty save for the name -- and so the script continues
on to get other files but never gets the big one.
Any ideas?

TIA  HAND

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


Re: [PHP] upload_max_filesize not honored?

2003-10-29 Thread David T-G
Marek, et al --

...and then Marek Kilimajer said...
% 
% upload_max_filesize is INI_SYSTEM, that means it is not honored in your 

*slaps forehead*  Why, so it is.  That certainly does explain things.

It's interesting to me, though, is that phpinfo() reported it as 128M
even when set from the code, though it obviously wasn't honored.  Why
would it say that when it doesn't mean it?


% code. Set it the same way you set post_max_size

Done, and amazingly enough it works just right now :-)


Thanks  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature