views:

174

answers:

3

Hello everyone,

I am interested in finding the most reliable method for uploading files in PHP. I need a progress bar with the upload.

I have tried SWFUpload but it randomly issues an I/O Error. Even if the same file is uploaded sometimes there is an error and sometimes there is not. I have configured all the necessary INI/Mysql/Apache directives to accept large file uploads.

So, I am looking for alternatives as a Flash based solution has not worked. Would Java be more reliable? I have also looked into PHP with APC.

I definitely cannot afford these random errors, so any help on reliable software / suggestions on how to minimize them would be appreciated.

Thank you.

A: 

I am assuming 2 things here:

1) Some kind of client will be doing the file upload

2) You get some kind of say on what the client installs on their computer to help make this happen.

If this is the case, my first suggestion would be:

Give them FTP or SFTP client software to upload files. The php page you make can have a link to Filezilla, along with instructions on how to use it. ftp and sftp are THE protocols to use for transferring files. HTTP is just not designed(well) for it, nor are browsers.

Zak
He stated he needs to upload files in PHP (and reading the whole question, he means using PHP server-side, and a browser client-side.) Therefore, FTP or SFTP isn't an option.
Ian P
A FTP solution would be reliable, but this is a web-based interface and I would really not like to burden users with FTP clients. It should be as simple as possible.
vanneto
if you were telling me that you were writing a book about fixing cars, but you didn't want to burden the audience with buying real wrenches when they could just use a crescent wrench I think you'd look at it differently. Using the right tool for the right job makes everyone's lives better.
Zak
I dont want them buying wrenches. I want a system that fixes the car for them.
vanneto
+2  A: 

There are other flash based solutions other than SWFupload. Have a look at uploadify.com

dalton
Yes, I'm using it to good effect.
Gutzofter
I have found the ideal solution. Uploadify and if that doesn't work a normal upload form with APC. Thank you.
vanneto
+1  A: 

I haven't come around to try this myself yet but http://www.plupload.com/ might be what you're looking for on. But otherwise PHP + APC works good as well.

Polygraf
I just started using plupload on my projects. It is pretty awesome, and it will do file chunking (which will at least do 25% prog bars on uploads). It also supports Flash, HTML5, Silverlight, Gears, Browser Plus, and of course, falls back cleanly to HTML4 Forms (eww). All in all, it was a very easy to implement file upload mechanism.
gnarf