Page 1 of 2

Max upload limit [solved]

Posted: Wed Aug 17, 2005 4:18 am
by crazycaddy
Ok, I want to upload files that are up to a gig (intranet). But whenever I try using the upload script it justs fails but it works for all other files.

Now, firstly i executed phpinfo(); to find which php.ini was being used (im using xampp theres many) then used this site http://www.olate.co.uk/forums/Php.ini-F ... -t305.html to configure it but it still doesn't work, its beginning to get really frustrating anyone have any ideas?

Ive also executed this script to make sure php reconises the change and it does:

Code: Select all

$data = ini_get( 'upload_max_filesize' );
echo $data;

Posted: Wed Aug 17, 2005 4:51 am
by crazycaddy
heres my php.ini file:

http://pastebin.com/338896

Posted: Wed Aug 17, 2005 5:49 am
by shiznatix
make sure the hidden field on your form has a MAX_FILE_SIZE field set to 1 gig

Posted: Wed Aug 17, 2005 5:52 am
by crazycaddy
oh, ok ill try that.

Posted: Wed Aug 17, 2005 5:56 am
by crazycaddy
had no effect :( . I used

Code: Select all

<input type="hidden" name="MAX_FILE_SIZE" value="1000" />

Posted: Wed Aug 17, 2005 6:01 am
by bokehman
You need to set a timeout that is long enough for the upload. Even with a 1 meg connection that is going to be at least 6 hours.

Posted: Wed Aug 17, 2005 6:03 am
by crazycaddy
this is on basically 100mb as its an intranet. Plus ive also defined an extremly long timeout time to be sure.

Posted: Wed Aug 17, 2005 6:26 am
by shiznatix
The MAX_FILE_SIZE hidden field (measured in bytes)
so when you are using MAX_FILE_SIZE = 1000 your only saying allow 1000 bytes to be uploaded which is far below a gigabyte :lol: . i think it is 1000000000 bytes to the gigabyte roughly.

Posted: Wed Aug 17, 2005 6:30 am
by crazycaddy
Nope, ok heres the last resort and I hope someone will take the time to look through it.

php.ini - http://pastebin.com/338896
Uploader - http://pastebin.com/338944

Posted: Wed Aug 17, 2005 7:02 am
by shiznatix
The MAX_FILE_SIZE hidden field (measured in bytes) must precede the file input field
in your uploader file on your form you have the max_file_size field right before the </form> so it is the last part of your form but it should be put right below the starting <form> tag.

Posted: Wed Aug 17, 2005 7:09 am
by crazycaddy
Still no luck :x

Posted: Wed Aug 17, 2005 7:20 am
by shiznatix
what is not working about it. does it time out? does it just not upload? have you tried to print_r($_FILES); to see whats going on to possibly find the problem?

Posted: Wed Aug 17, 2005 7:37 am
by crazycaddy
well, it loads for about 5 seconds
then just stops.

Posted: Wed Aug 17, 2005 7:51 am
by feyd
check the error logs?

Posted: Wed Aug 17, 2005 7:56 am
by crazycaddy
i looked in apache/error and looked at the dates of all the errors, they start in January 8O , but I literally set the server up 4 weeks ago.

Oops my mistake, they are the error pages. But no theres no errors shown in the error log.