tags:

views:

56

answers:

1

Running Unix and php5.

I have an upload form that allows people to upload any file format at any size. As of now when you try to upload it fails most of the time when I try to upload a couple mb file. However if I upload a small text file it is fine. Also I have read about issues of timing out with large files. Is there something I can do server side or preferably in my php code to enable someone to upload really large files without it timing out? Is the browser limit 500MB?

+1  A: 

There is a server limit in php.ini here

change the size to allow larger files, default limit is 2 MB.

There isn't a browser limit afaik, but in general uploading large files from the browser just ends up being trouble. Perhaps a an anonymous FTP (with hidden list) would work?

Viper_Sb
Viper I was thinking of anonymous FTP (with hidden list) but not sure how to do it...is it something in a config file somwhere or is it something I can type into terminal?
keith
What's the _hidden list_ part of anonymous FTP?
w3d
@w3d - Person can't see the files but they can upload.
keith
I believe it's in the FTP config, not sure on the option name, perhaps a quick google search will give it.
Viper_Sb
@keith That sounds like HTTP to me? 'Hidden list' - do you mean hidden `IFRAME` - where file uploads in the background? Any upload via the browser is going to be HTTP, unless you've installed some kind of 3rd party browser plugin?
w3d
FTP is not HTTP, we're talking about using FTP to upload INSTEAD of HTTP. No plugin's nothing like that, just raw FTP, user must user FTP client to upload. Hidden lists refer to hiding the LIST command (think of it as the DIR or LS command) so a user connects they do NOT see any other files at all, but they CAN upload, just nothing else.
Viper_Sb
Right...my original question was about http. When Viper_SB mentioned anyonymous FTP I thought it was a good idea in addition to http upload. I still can't find anything of value on how to setup ftp on a linux box. I see in the php.ini file a place where it asks for an anonymous ftp login password but other than that I don't know where ftp lives or what config files to look at.
keith
@Viper_Sb Ok, thanks for the clarification - yes, that makes sense! (I was thinking there was some requirement to do this via the browser.)
w3d
@keith you have to setup an FTP server, it's a separate server i.e FTP server is like an apache is to HTTP. Depending on your *nix system, there are different ones, google will give a list of them. I'm not setup many just 1 for personal use, quite easy to setup.
Viper_Sb