Hi!
SWFupload is great great great, thanks a lot for doing it.
Sadly I've got a problem.
It works well at my local space but when I set it up at our server it starts bugging. Sometimes (not too often) files uploads well but at most cases the history is like that:
SWF DEBUG: startFile(): File Reference found. File accepted by startUpload event. Starting upload to /?c=photos&m=do_upload&album_id=4&session_id=742dd7c18f863b4bb24a8798e5228bda for File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 32768. Total: 3258545
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 65536. Total: 3258545
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 98304. Total: 3258545
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 131072. Total: 3258545
SWF DEBUG: Event: uploadError : IO Error : File ID: SWFUpload_0_0. IO Error.
SWF DEBUG: Event: uploadComplete : Upload cycle complete.
Error Code: IO Error, File name: photo.jpg, Message: Error #2038
Where should i search the problem? Thanks!
November 19, 2007 - 2:21pm
This can be caused by using Apache with mod_security. You can probably Google an answer.
November 20, 2007 - 7:48am
gyphie, thanks for reply but no, there is no mod_security and it turned out that in some cases in ie upload works perfectly. But for me (Win Vista, Firefox 2.0.0.9) in most cases that error appears
November 20, 2007 - 8:08pm
Hmm. I have encountered this error when the server abruptly ends the connection (before Flash expects it). Could something like this be happening in your server-side script?
November 23, 2007 - 8:42am
I don't think so because from another computer with XP and IE6 upload goes well with even bigger files. But on my notebook with Vista and Firefox only small (smaller than 100kb) files uploads:(
December 23, 2007 - 9:31am
I have here the same situation with my web server. I used the demo application to be sure that not my local integration causes the problem. Under my localhost (XAMPP) it's ok , but any larger file (approx 2-6Mb) failed from time to time with the mentioned IO error... any idea in which direction I can search ? (Mod_Security isn't activated..)
January 4, 2008 - 7:15am
Same for me on XAMPP (no mod_security also). Only files with up to 2 MB will be uploaded. The scripts uploads a few bytes and then hangs. Cancelling the upload crashes the browser (any browser) so that I have to restart. No error messages are displayed. The latest Flash Plugin is installed. Any hint for me?
January 4, 2008 - 8:03am
??? Funny ??? Just tested with a JanaServer and PHP4 and it works. But I don't know if it is the server or the php-version, because the latest XAMPP has a bug when switching to PHP4, so I cannot test this properly. Maybe someone else with XAMPP-problems wants to try it with the JanaServer (www.janaserver.de)?
January 4, 2008 - 11:53am
I have this same issue on IIS 5 and 6 when the filesize exceeds the maximum set. SWF doesnt throw the filesize error, but instead throws the -220 error code.
January 4, 2008 - 2:15pm
Thanks for the observation shellscape. I looked over the file size code and realized 2 things:
1) The documentation says file_size_limit is in bytes but it is actually KB
2) The file_size_limit KB to bytes (internal) conversion uses 1000 as a multiplier instead of 1024.
I've updated the documentation and will fix the file_size_limit conversion in the next release.
I will probably add a unit value to the size value like php.ini. So in the future you can put something like:
100MB or 250KB and SWFUpload will understand.
January 4, 2008 - 2:29pm
Flash IO Errors are not very helpful. The same couple of error numbers are returned for just about everything.
Here are some common issues that cause these error codes:
- Invalid URL
- Server max post size or max upload size exceeded
- Server unexpectedly terminates the connection
- Zero byte file uploaded
- Basic Authentication failed
To debug these issues I first verify that my upload is working using a standard HTML upload form pointing at my upload.php
Then I use a Packet Sniffer (Wireshark) to capture the communication between the Flash upload and the server. This is getting a little advanced but it's the only way to see what is going on behind the scenes.
January 4, 2008 - 5:32pm
I've committed an update to the SWFUpload code trunk with the new FileSizeLimit handling in it. http://swfupload.googlecode.com/svn/. You can try it out if you want. It will be official in the next release.
It correctly checks the file size and the file_size_limit setting accepts unit values. For example:
file_size_limit: "100 KB" // kilobytes
file_size_limit: "10000 b" // bytes
file_size_limit: "25mb" // megabytes
file_size_limit: "2 gb" // gigabytes
file_size_limit: "342222" // kilobytes
are all acceptable. If the unit is omitted then KB are assumed (which is how SWFUpload currently works).
January 4, 2008 - 5:57pm
I think this is a very useful addition. Any word on when you'll be releasing an official version with this fix?
January 7, 2008 - 9:23pm
The file size issues are fixed in v2.0.2.
You can still get IO Errors if you allow a file larger than your server side limit to be uploaded.
January 13, 2008 - 12:23am
Happens when uploading a group of photos (around 40 2meg photos). Its a consistent problem every time I try to do it, but its not always like the 4th photo or a specific photo. mod_security isn't on. I'm using the _f9 version (with Math.rand so that shouldn't be cached).
Here's my setup:
var swfu;
window.onload = function() {
swfu = new SWFUpload({
upload_url : "upload.php",
post_params : {"item_id": "'.$item_id.'"},
file_size_limit : "20 gb",
file_types : "*.jpg",
file_types_description : "JPG images",
file_upload_limit : "0",
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
flash_url : "/includes/swfupload_f9.swf?"+Math.random(),
custom_settings : {
upload_target : "divFileProgressContainer"
},
debug : false
});
};
Thanks!
January 13, 2008 - 7:25pm
Hello. I use nginx proxy and i see same error. I fixed in my site and now working fine.
Fix: Open nginx.conf add to http section
client_max_body_size 500m;
And remove keepalive_timeout
Full code:
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 128;
sendfile on;
client_max_body_size 500m;
tcp_nodelay on;
gzip on;
server {
listen 80;
server_name domain.hu www.domain.hu;
access_log off;
location / {
proxy_pass http://xxxxxxxxxx:80/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/nginx-default;
}
}
}
January 26, 2008 - 9:58am
i still got that problem:=( and only in vista. No matter what browser - ie7 just hungs up during uploading, trying to cancel upload kills it at all. In opera and firefox it's almost the same only they don't die, upload just stops and then it gives i/o error =(
January 28, 2008 - 5:42am
I have the same here... On Win XP everything works fine. On Mac i just get the #2038 error all the time...
I'll give it a shot with wireshark.
February 22, 2008 - 3:03pm
damn
this problem keeps bugging me:( and now not only me but also some our users who are using Vista too.
i've updated to 2.1 beta, nothing changed:(
February 25, 2008 - 5:27pm
i would definetely make a donation for good amount of good beer (or what you prefer) if this problem with vista found it's solution
March 1, 2008 - 1:37pm
I've got the same problem and just tested the online "formsdemo" (even on the server here).
If i upload a file at ~7MB i always get IOErrors, the demo here online should work, but it doesn't.
This only happens for large files.
Edit: I am using Windows XP
March 2, 2008 - 1:50pm
The demo online is limited to 7MB.
I guess I should change this or document it on the demo pages. The PHP server that has been donated for the SWFUpload site is limited to 7MB.
This demonstrates what happens when you allow SWFUpload to send a file larger than what the server allows.
Since I don't have access to change the server's file size limit I would need to reduce the SWFUpload limit to 7MB.
Allayouall who are having consistent upload issues where it works with "small" files but not with "large" files you need to triple check all your web servers and script interpreter settings. Ensure that you really are allowed to upload files that big.
The easiest way to see if SWFUpload is the problem or your webserver is to create a normal HTML upload. Name the file input "Filedata" and set your form's action attribute to point to your upload script. Upload different test files and _verify_ that they uploaded correctly.
March 5, 2008 - 6:14am
the problem is not with the size of file and settings. See, I can upload a file in Win XP but i can't upload the same file in Vista. But i've just tested your online demo and the same file uploads well from Vista.. I haven't any guess what is wrong on our server:(
March 13, 2008 - 9:07am
Hi, i've got the same problem.
I've updated my flash player to the latest release, i've tested with IE 7 and Firefox.
My server is a suse enterprise with no mod_security. I'v updated the PHP.ini to have a good "max_filesize" and a good time to parse the scripts.
I see that people are experiencing this problem with XAMPP, so it doesn't seems to be a server configuration problem...
Does anybody has any idea about this problem ?
March 19, 2008 - 7:54am
sebastien,
do you have nginx installed as frontend?
March 20, 2008 - 10:30am
Hi willwin,
Thank you for your reply.
No, i don't use nginx. I'm using a standard LAMP plateform :
Apache 2 and PHP 5.
March 20, 2008 - 10:34am
Just to precise,
i tryed both with the Flash 8 and Flash 9 versions. The problem still the same.
I tryed this solution :
http://board.flashkit.com/board/showthread.php?t=742315
but the problem still the same
March 20, 2008 - 1:37pm
This is a difficult issue to solve because IO error 2038 is a generic error that Flash sends when something went wrong.
It's even evident in the flashkit link. One person solved the issue by changing their PHP.ini settings and another by disabling the mod_security stuff in Apache.
March 21, 2008 - 4:42am
i'm having this problem only on the server where nginx is receiving all requests and proxies them to apache. i've tried to send it directly to apache - it works. so the problem is somewhere between flash and nginx..
March 25, 2008 - 12:42am
Everything seems to be working fine as an ASP .Net 2.0 solution. When I open a project through Visual Studio 2008 and convert it to .Net 3.5 is when I start getting the #2038 error.
Note that I haven't changed anything else. I made sure all the relevant web.config entries remained at the same values.
Does anyone know of a tutorial on proper configuration for a .Net 3.5 environment for integration with swfupload? I'm guessing it's something to do with an unconfigured security setting.
Thanks in advance,
Rueben
August 4, 2008 - 11:17pm
I don't know if this helps anyone else out there, but I recently discovered my IO error was because of spaces in the directory name. Long story how I got to that point, but it was clearly evident on a Mac with both Safari and FireFox. For those of you keeping score I also tried it on Vista with IE and FireFox and it uploaded just fine. I didn't dig that deep on XP, but I know it works with IE on XP. Cheers