[PHP] uploading files and MAX_FILE_SIZE and php.ini
Hi, all -- Yes, I'm back again with another upload question. I promise I've been paying attention in class, but I just can't get this to work! The default upload_max_filesize in my php.ini was 2M, but I changed it to 200M and restarted the server, and now phpinfo() reports 200M. I created a dinky little upload form, which is attached, to either accept an upload or tell me that it got one, and I can successfully upload files of 7M (much bigger than the original 2M). After initial failures, I added a hidden form field MAX_FILE_SIZE as has been suggested (but sometimes contested) in other posts. I still cannot, however, upload anything larger; a 9M file as well as some 30M and 40M tests just doesn't appear. I have only 5-10M of my 256M available, but I have 90M of swap free and over 1G free on /, the monolithic root partition. Now I'm at a loss for where to turn to fix this. It would seem that everything is in place! Is there an apache directive that I need as well, perhaps? TIA 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! ?php /* boring stuff: vi: wm=0:tw=0 $Id: $ */ print html head title Send me some files! /title /head body ; #print(exec(id)); ### #phpinfo() ; ### if ( $_FILES[uploads] ) { print I HAVE _FILES!br\n ; ### print pre\n;### print_r($_FILES); print /pre\n; ### } else { print OK, buddy. Time to send me some files. form action='/upload.php' method='post' enctype='multipart/form-data' input name='MAX_FILE_SIZE' type='hidden' value='2' input name='uploads[]' type='file'br input type='submit' value='submit' /form ; } print /body /html ; ? msg96845/pgp0.pgp Description: PGP signature
Re: [PHP] uploading files and MAX_FILE_SIZE and php.ini
On Friday 14 February 2003 02:44, David T-G wrote: Yes, I'm back again with another upload question. I promise I've been paying attention in class, but I just can't get this to work! [snip] Now I'm at a loss for where to turn to fix this. It would seem that everything is in place! Is there an apache directive that I need as well, perhaps? manual Handling file uploads Common Pitfalls -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* So this is what it feels like to be potato salad */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] uploading files and MAX_FILE_SIZE and php.ini
You might also check out your timeout value in php.ini -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 12:57 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] uploading files and MAX_FILE_SIZE and php.ini On Friday 14 February 2003 02:44, David T-G wrote: Yes, I'm back again with another upload question. I promise I've been paying attention in class, but I just can't get this to work! [snip] Now I'm at a loss for where to turn to fix this. It would seem that everything is in place! Is there an apache directive that I need as well, perhaps? manual Handling file uploads Common Pitfalls -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* So this is what it feels like to be potato salad */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading files and MAX_FILE_SIZE and php.ini
Jason, et al -- ...and then Jason Wong said... % % On Friday 14 February 2003 02:44, David T-G wrote: % % Yes, I'm back again with another upload question. I promise I've been % paying attention in class, but I just can't get this to work! % % [snip] % % Now I'm at a loss for where to turn to fix this. It would seem that % everything is in place! Is there an apache directive that I need as % well, perhaps? % % manual Handling file uploads Common Pitfalls Ahhh... After reading it *twice* I realized that I'm using method='post' and so I need to set post_max_size as well. I've now confirmed that I can upload multiple MAX_FILE_SIZE files up to post_max_size :-) Yeah, I feel stupid, but I'm happy :-) % % -- % Jason Wong - Gremlins Associates - www.gremlins.biz Thanks again! 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! msg96854/pgp0.pgp Description: PGP signature
Re: [PHP] uploading files and MAX_FILE_SIZE and php.ini
Mike, et al -- ...and then Mike Kercher said... % % You might also check out your timeout value in php.ini I'll definitely need to tweak that for the real world, but this was locally on a laptop. It was fun to watch the two drive lights flash back and forth as I watched my free space go down by 200M or so :-) 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! msg96855/pgp0.pgp Description: PGP signature
Re: [PHP] uploading files and MAX_FILE_SIZE and php.ini
Hi again -- ...and then David T-G said... % ... % Ahhh... After reading it *twice* I realized that I'm using method='post' % and so I need to set post_max_size as well. I've now confirmed that I % can upload multiple MAX_FILE_SIZE files up to post_max_size :-) Oh, yeah -- and now I need to see if I can override php.ini settings in my script because the production server is set to 2M :-) Thanks again 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! msg96856/pgp0.pgp Description: PGP signature
Re: [PHP] uploading files and MAX_FILE_SIZE and php.ini
On Friday 14 February 2003 03:17, David T-G wrote: Mike, et al -- ...and then Mike Kercher said... % % You might also check out your timeout value in php.ini This should not have an effect because PHP only starts executing *after* the file has been fully uploaded. I'll definitely need to tweak that for the real world, but this was locally on a laptop. It was fun to watch the two drive lights flash back and forth as I watched my free space go down by 200M or so :-) -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Q: Why did the astrophysicist order three hamburgers? A: Because he was hungry. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php