SibSoft Ltd.
Development Services
software products
 RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
EZYWebhost - Cheap XUpload & XFileSharing 100% campatible hosting

AJAX upload progress bar

File sharing script
Issues with SSL and IE
Goto page 1, 2  Next
 
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XUpload
View previous topic :: View next topic  
Author Message
hanji



Joined: 10 Nov 2006
Posts: 36

PostPosted: Dec 11, 2006 5:58 pm    Post subject: Issues with SSL and IE Reply with quote

Hello

This problem just came up.. so I'm concerned it's a service pack or windows update issue. Just recently, my XUpload application is not behaving correctly when users access the application with IE and hit port 443.

My app uses inline progress bar. The file no matter what get's uploaded to the server, but the progress bar stops around 2-5% and "hangs". Then a message in the status window will say "Upload Failed". But actually the upload is still progressing in the background. It almost seems like the upload_status.cgi is unreachable after the first request.

This works perfectly with Firefox. I've tested with multiple servers, and it is reproducable on all.

My IE version:
6.0.2900.2180.xpsp_sp2_gdr.050301-1519
Updated Version:; SP2;

Here is the screen shot of the progress + error



Again, like to state that this works fine in Firefox (also tested with Opera on Windows). This use to work until recently. This is reproducable on multiple (three servers) when uploading with SSL. I can also confirm that this happens with multiple users (2 using IE6 and 1 using IE7). No code changes have been made.

My version of XUpload:
XUploadPro-2.3

Any help is greatly appreciated!

Thanks!
hanji


Last edited by hanji on Dec 11, 2006 8:10 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
hanji



Joined: 10 Nov 2006
Posts: 36

PostPosted: Dec 11, 2006 8:09 pm    Post subject: Reply with quote

This seems to happen on certain files (probably related to filesize). All my tests that failed were using the following file:

http://www.uno-code.com/images/59_LP.jpg

This is 1.11MB. Every one of my IE tests will hang and the progress stops. But when I tried to upload a 400k file it worked. I pushed that up to 600k and it failed as well.

Additional testing shows that this is intermittent.. progress bar might fail if you try uploading a previously successful file.

Here is an example of XUpload running on my local network connecting to my development server over SSL. This file is 182MB large (well within max), and you can see where it 'stalls' and picks backup. then eventually ends with "Upload failed!". The file will upload though. I've verified that file is in /temp and is moved to /uploads.



Sorry to keep reporting, but wanted to give as much information as possible since the problem needs to get fixed.

Thanks!
hanji
Back to top
View user's profile Send private message Visit poster's website
PilgrimX182



Joined: 22 Mar 2006
Posts: 1107
Location: Undisclosed location

PostPosted: Dec 12, 2006 6:59 am    Post subject: Reply with quote

Strange new problem. Looks browser-related.
Please PM me the URL to upload form and maybe FTP/SSH access to script. Will make some test/debug.
Back to top
View user's profile Send private message Visit poster's website AIM Address
hanji



Joined: 10 Nov 2006
Posts: 36

PostPosted: Dec 18, 2006 5:47 pm    Post subject: Reply with quote

Ok.. I have things more or less isolated now. I know you weren't able to reproduce this, but it's reproduceable by countless users using this app on my end.

Here is what I know is related to the problem.

- It appears that IE6 XP SP2 is affected.
- problem occured after updates (kb925454 kb923689 kb926255)
- most likely related to MS06-067 http://support.microsoft.com/?kbid=922760
- this is related to how IE transmits the stream to the upload.cgi in SSL and IE6

Removing XUpload out of the picture and using straight PHP, the file is streamed to /tmp at a normal rate. So, it doesn't appear it has anything to do with IE6 and Apache/SSL. As soon as I include XUpload, the stream has a tendency to hang or pause in /temp. Again, this only happens in HTTPS and IE. This cancels out the server configuration (ie: how /temp was set, etc), but I think it's related to something with perl and SSL possibly.

For now, we had to remove XUpload from our application since we were flooded with complaints. I also noticed that servers with IE6 seem to work. We tested on three Windows2003 servers with IE6 and they all worked fine.

We replicated this problem in a controlled environment using vmware images with XP SP2 installs, and slowly upgraded them. As we upgraded, we tested to see if the problem exists. As soon as we hit the (kb925454 kb923689 kb926255) upgrades, we saw the problem.

Any help is greatly appreciated.

Thanks!
hanji
Back to top
View user's profile Send private message Visit poster's website
hanji



Joined: 10 Nov 2006
Posts: 36

PostPosted: Dec 19, 2006 2:58 pm    Post subject: Reply with quote

Is there any debug statements or tests I can put in upload.cgi? It definitely appears to be related to how perl handles the filestream from IE6 in SSL.

My versions of apache and perl are the following:
apache-2.0.58-r2
perl-5.8.8-r2

Any help is greatly appreciated.

hanji
Back to top
View user's profile Send private message Visit poster's website
PilgrimX182



Joined: 22 Mar 2006
Posts: 1107
Location: Undisclosed location

PostPosted: Dec 20, 2006 7:18 am    Post subject: Reply with quote

Possible trick: update perl CGI module using shell command 'perl -MCPAN -e shell' then 'install CGI'

OR

Put CGI.pm from http://search.cpan.org/src/LDS/CGI.pm-3.25/ to the same folder where upload.cgi is.

In changelog there's recent fix about browser hangs, maybe will help.

Also try to update mod_ssl if possible.

Also set Full URL to upload.cgi in upload_form.html

Also try to comment directives inside .htaccess, maybe they affect somehow.

No more ideas at the moment.
Back to top
View user's profile Send private message Visit poster's website AIM Address
hanji



Joined: 10 Nov 2006
Posts: 36

PostPosted: Dec 20, 2006 7:31 am    Post subject: Reply with quote

Interesting, I'm running CGI-3.15 on all servers. I'll upgrade to 3.25 in the morning.

Thanks!
hanji
Back to top
View user's profile Send private message Visit poster's website
hanji



Joined: 10 Nov 2006
Posts: 36

PostPosted: Dec 20, 2006 5:48 pm    Post subject: Reply with quote

PilgrimX182

First off, I want to say thanks for the help. I know this is a tough problem. I'm leaning towards that it's either upload.cgi or upload_status.cgi that is having the problem.

I upgraded my CGI.pm to 3.25 (originally had 3.15). This did not correct the problem. I then wrote a simple perl script to process an upload file to see if the problem is how CGI handles the traffic between my browser and SSL.. and guess what, it worked with out a problem.

Code:
#!/usr/bin/perl

use CGI;
print "Content-type: text/html\n\n";
$upload_dir = "/tmp";
$query = new CGI;
$filename = $query->param("UploadFile");
$filename =~ s/.*[\/\\](.*)/$1/;
$upload_filehandle = $query->upload("UploadFile");
open UPLOADFILE, ">$upload_dir/$filename";
binmode UPLOADFILE;
while ( <$upload_filehandle> )
{
        print UPLOADFILE;
}
close UPLOADFILE;
print "DONE";


Also, looking at the XUpload behaviour, it seem to act choppy or hang, UNTIL the progress bar says "Upload Failed". After that the transfer works as expected.

So my findings.

- I don't think it's related to CGI.pm
- Simple perl script upload_test.cgi works with IE and SSL
- Transfer is steady after status reports failure

I hope this helps. Let me know if you need access to my test environment.

Thanks!
hanji
Back to top
View user's profile Send private message Visit poster's website
PilgrimX182



Joined: 22 Mar 2006
Posts: 1107
Location: Undisclosed location

PostPosted: Dec 21, 2006 7:33 am    Post subject: Reply with quote

A bit confused. What do you mean "it worked with out a problem", you said XUpload upload too, but with delay, don't this simple script have this delay?


Quote:
Also, looking at the XUpload behaviour, it seem to act choppy or hang, UNTIL the progress bar says "Upload Failed". After that the transfer works as expected.

So when you don't open progress bar window does it works fine or still problem? Need to be sured that progress bar involved in problem or not.
Back to top
View user's profile Send private message Visit poster's website AIM Address
PilgrimX182



Joined: 22 Mar 2006
Posts: 1107
Location: Undisclosed location

PostPosted: Dec 21, 2006 7:48 am    Post subject: Reply with quote

Also try to comment this line:
Code:
$CGI::POST_MAX = 1024 * $c->{max_upload_size};   # set max Total upload size
Back to top
View user's profile Send private message Visit poster's website AIM Address
hanji



Joined: 10 Nov 2006
Posts: 36

PostPosted: Dec 21, 2006 3:06 pm    Post subject: Reply with quote

The simple script works without a delay or pause. The upload stream is steady and fast via IE and SSL.

Is there a way to turn off the progress portion of XUpload for testing?

I'll try your suggestion in a bit and will report back.

Thanks!
hanji
Back to top
View user's profile Send private message Visit poster's website
hanji



Joined: 10 Nov 2006
Posts: 36

PostPosted: Dec 21, 2006 3:42 pm    Post subject: Reply with quote

PilgrimX182 wrote:
Also try to comment this line:
Code:
$CGI::POST_MAX = 1024 * $c->{max_upload_size};   # set max Total upload size


I commented this line and the problem is still there. Did you ever update your Windows machine and try my test application again? I even had friends totally not related to this project try my test app with their updated IE, and it happens to them.

hanji
Back to top
View user's profile Send private message Visit poster's website
hanji



Joined: 10 Nov 2006
Posts: 36

PostPosted: Dec 21, 2006 5:49 pm    Post subject: Reply with quote

PilgrimX182 wrote:

Also set Full URL to upload.cgi in upload_form.html

Also try to comment directives inside .htaccess, maybe they affect somehow.


I tried both of those (URL was already full path)... no change. I'm almost 100% positive it's related to upload_status.cgi. I think it stalls the browser. When it dies, the upload works fine in SSL.

If you know of a way to bypass that for testing, let me know.. at least we'd be able to isolate the problem.

hanji


Last edited by hanji on Dec 21, 2006 6:02 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
hanji



Joined: 10 Nov 2006
Posts: 36

PostPosted: Dec 21, 2006 5:57 pm    Post subject: Reply with quote

I changed inline to 0 and the upload works without pausing. It looks like it's totally related to the inline progress bar.

hanji
Back to top
View user's profile Send private message Visit poster's website
PilgrimX182



Joined: 22 Mar 2006
Posts: 1107
Location: Undisclosed location

PostPosted: Dec 22, 2006 12:03 pm    Post subject: Reply with quote

Quote:
I changed inline to 0 and the upload works without pausing. It looks like it's totally related to the inline progress bar.


Aha! That's better now. So it looks like IE can't handle 2 simultaneous SSL connections.

So try this...in xupload.js replace
Code:
self.transfer2.document.location = cgi_url+'?inline=1&upload_id='+UID+'&num_files='+NF+'&css_name='+f1.css_name.value+'&tmpl_name='+f1.tmpl_name.value+'&xmode='+f1.xmode.value;


with

Code:

url=cgi_url+'?inline=1&upload_id='+UID+'&num_files='+NF+'&css_name='+f1.css_name.value+'&tmpl_name='+f1.tmpl_name.value+'&xmode='+f1.xmode.value;
setTimeout("self.transfer2.document.location = '"+url+"'",2000);


this will delay opening progress bar, maybe will help, maybe will just let upload file for 2 seconds, then stuck.[/code]
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XUpload All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group