Click to See Complete Forum and Search --> : Uploading larger files using PHP


rskshiva
09-19-2005, 02:30 AM
Hi,

We are facing problems while uploading larger files using php. we need to upload a file with size more than 20 MB using php. Solution for this problem will be appreciated. Its urgent.

Thanks,
Siva

dusti
09-19-2005, 02:52 AM
max size of files allowed with php is set at server.
chech your config files
(post_max_size & memory limits to 40 MB
max_execution_time to 300000)
I heard of trouble with files larger than 6-8 mb anyhow...

Sheldon
09-19-2005, 02:52 AM
Yuo may need to change a line in your php.ini file, oh two lines from memory.

Max_upload_size and the exicution_time_out settings.

Or something like that.

pointfiftyae
09-19-2005, 03:21 AM
See this thread (http://www.webdeveloper.com/forum/showthread.php?t=79244). There are three params to change :
max_input_time
upload_max_filesize
post_max_size

javazoom
09-19-2005, 04:06 PM
Increasing "upload_max_filesize" PHP limit could be a problem. Just think about a upload_max_filesize to 50MB and 20 simultaneous users uploading files => Total memory used on server = 50x20 = 1GB !
A solution would be to have upload_max_filesize=5MB or 10MB and applet (or ActiveX) that splits file in small chunks before upload. Your server-side script needs to recompose the file from chunks.
You could check out jClientUpload applet allowing to split file in chunks :
http://www.javazoom.net/applets/jclientupload/jclientupload.html
And a PHP script sample that recompose file from chunks :
http://www.javazoom.net/applets/jclientupload/tools.html

Another solution would be to use Java/JSP instead of PHP. Java/JSP allows to handle large upload with low memory.

I hope it helps.