Max upload limit [solved]

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

crazycaddy
Forum Commoner
Posts: 43
Joined: Fri Aug 05, 2005 6:59 am
Location: England, UK

Max upload limit [solved]

Post 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;
Last edited by crazycaddy on Fri Aug 19, 2005 7:58 am, edited 1 time in total.
crazycaddy
Forum Commoner
Posts: 43
Joined: Fri Aug 05, 2005 6:59 am
Location: England, UK

Post by crazycaddy »

heres my php.ini file:

http://pastebin.com/338896
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

make sure the hidden field on your form has a MAX_FILE_SIZE field set to 1 gig
crazycaddy
Forum Commoner
Posts: 43
Joined: Fri Aug 05, 2005 6:59 am
Location: England, UK

Post by crazycaddy »

oh, ok ill try that.
crazycaddy
Forum Commoner
Posts: 43
Joined: Fri Aug 05, 2005 6:59 am
Location: England, UK

Post by crazycaddy »

had no effect :( . I used

Code: Select all

<input type="hidden" name="MAX_FILE_SIZE" value="1000" />
User avatar
bokehman
Forum Regular
Posts: 509
Joined: Wed May 11, 2005 2:33 am
Location: Alicante (Spain)

Post 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.
crazycaddy
Forum Commoner
Posts: 43
Joined: Fri Aug 05, 2005 6:59 am
Location: England, UK

Post by crazycaddy »

this is on basically 100mb as its an intranet. Plus ive also defined an extremly long timeout time to be sure.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post 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.
crazycaddy
Forum Commoner
Posts: 43
Joined: Fri Aug 05, 2005 6:59 am
Location: England, UK

Post 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
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post 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.
crazycaddy
Forum Commoner
Posts: 43
Joined: Fri Aug 05, 2005 6:59 am
Location: England, UK

Post by crazycaddy »

Still no luck :x
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post 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?
crazycaddy
Forum Commoner
Posts: 43
Joined: Fri Aug 05, 2005 6:59 am
Location: England, UK

Post by crazycaddy »

well, it loads for about 5 seconds
then just stops.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

check the error logs?
crazycaddy
Forum Commoner
Posts: 43
Joined: Fri Aug 05, 2005 6:59 am
Location: England, UK

Post 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.
Post Reply