Forums

PHP

This topic is locked

PHP UPLOAD and BIG FILES

Posted 13 Oct 2004 11:17:32
1
has voted
13 Oct 2004 11:17:32 bob bob posted:
hi,
i try to upload big pdf files with pure php upload server behavior. when the file is to big (more than 3 mo) it doesn't work.
the server behavior is not guilty because it works with smaller files. i have no acces to the php.ini of my server.
so what can i do to upload the big files ??? any idea will be the welcome

Replies

Replied 22 Nov 2004 08:31:18
22 Nov 2004 08:31:18 steve copelin replied:
what about ftp, can you set up an account to just upload?
Replied 24 Nov 2004 15:55:28
24 Nov 2004 15:55:28 Matt Machell replied:
Check that the global PHP settings haven't limited your maximum upload size (many web hosts do this to stop people swamping servers).

you can find this setting by running <? phpinfo(); ?> as a php file and scrolling down 'til you can find the upload limit (upload_max_filesize). Chances are it's set at something like 2meg, so anything larger is blocked.

Some hosts might allow you to temporarily override this setting (and it's nto definite), but it'd require a bit of PHP handcoding and the function ini_set();

-Matt

DMX Zone Premium Content Author
Replied 08 Dec 2004 17:08:22
08 Dec 2004 17:08:22 Matt Bailey replied:
I came across this exact same problem recently. FTP'ing large files to my server is fine, but when I tried using PHP to upload files I discovered there was limit of 2MB (stopped a 'dropbox' style website I was working on dead in its tracks). I tried a couple of workarounds (see: relativelyabsolute.com/archives/2004/03/fine-tune-your-php-settings/), but I couldn't get any of them to work. When I contacted my hosting provider they said 'sorry, you can't work around it and we won't change it for you either' (nice huh!). However, the workarounds may work for you - good luck. Other than that - change your hosting provider!

Reply to this topic