NYCPHP Meetup

NYPHP.org

[nycphp-talk] Uploading file size issues

Craig Thomas craig at juxtadigital.com
Thu Jul 27 12:31:11 EDT 2006


Corey Fogarty wrote:
> I use file uploaders often. Most recently I have been using it as a way 
> for clients to upload Flash files as part of a database application. The 
> .swf’s are usually 2-10mg and in some cases the browser sits and sits 
> and apparently never really uploads the file. I looked all over for file 
> size limitations on the type=file HTML form element but found nothing 
> specific.

They don't exist. Even controlling the look of the browse button is a 
pain. The type=file element has no ability to actually read info from 
the hard drive of the client [which is right, security wise].  The file 
is POSTED to the server and processed.

> Has anyone else experienced this? Is it a browser issue? Network speed 
> issue? PHP issue? And if it is a known issue, is it better to fall back 
> on FTP and a manual entry in the database?

PHP/Apache [web-server] issue.

Lots of settings can affect this, but these two [in the .php file]:

ini_set("memory_limit","20M");
ini_set("max_execution_time","60");

have solved the problem for me in the past [large jpgs].

In php.ini there is also a max_upload setting, and Apache can also limit 
the upload size.

HTH,




More information about the talk mailing list