Forum Moderators: coopster

Message Too Old, No Replies

upload problems with Firefox.

works great with IE.

         

webdudek

10:19 pm on Jun 8, 2006 (gmt 0)

10+ Year Member



I have a page on my site that allows users to upload pictures.
It works great with IE.
When using Firefox, I get a message saying that the script is running slow and asks if I want to stop the script or continue.
Does anyone have an idea about the difference between IE and FF regarding files upload?
What can cause the script to run slower on FF?

coopster

10:22 pm on Jun 8, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I've seen that message before, except it was the other way around. It was MS IE and it was not PHP, either -- sounds more like some JavaScript not performing correctly. Can you offer any other details?

webdudek

6:22 am on Jun 11, 2006 (gmt 0)

10+ Year Member



Here is the code I'm using

<html>
<body>
<form method="post" action="test1.php" enctype="multipart/form-data">
<input name="file1" size=50 type="file">
<input type="submit">
</form>
</body>
</html>

I have noticed that the problem happens only with big files. a 100K picture didn't cause any trouble but a 3M pic caused the problem.
Maybe there is a default size limit for uploading files with Firefox?

coopster

6:01 pm on Jun 11, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



The code offered here is a simple HTML form. If you are getting the error message when this page is displayed, then you have something else running in your browser (sidebar, another tab, etc.) that may be causing your issue.

Now, if the error message appears after you actually choose a file and begin the upload process, which it sounds to be your issue, then it may be some specific code within your script that checks for different user agents and processes differently or if you have something in your server configuration that was browser-specific and changes accordingly. In either case, the browser really should have nothing to do with any server-side script processing in order to simply upload a file.

I would begin by checking for any browser-specific code in your upload script. Next, I would check for browser-specific directives in your server configuration (including any per-directory override files, i.e. .htaccess files).

webdudek

6:26 pm on Jun 11, 2006 (gmt 0)

10+ Year Member



it may be some specific code within your script

The code I posted above is the code I used to regenerate this problem. The original code was more complicated, and I removed everything to make sure that there is nothing hiding.
No hidden code and no javascript involved.
Also I renamed test1.php mentioned in the 'action' so that I will get a 404 onsubmit.
the error happens before 404.

coopster

6:36 pm on Jun 11, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



So does the error occur when you display this page?
Or does the error occur after the page has been displayed and you browse for a file?
Or does the error occur after you click Submit?

rainborick

7:09 pm on Jun 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Isn't this probably just Firefox's server response timeout message? I've noticed this always seemed shorter on Firefox, and I've usually been glad because if a server is dead, the extra time that Internet Explorer waits seems too long. But the only possible fix I've seen is adjusting a configuration setting that might not help at all.

Enter "about:config" in the address bar. Scroll down the list of options to 'network.http.keep-alive'. That setting should be 'true'. If its 'false', double-click on it and it will toggle to 'true'. The next setting 'network.http.keep-alive.timeout' is the number of seconds that Firefox waits for its response. If you double-click on it, you'll get a dialog box that will let you change the setting. Again, this might not help with uploads, but might be worth a try.

webdudek

7:54 pm on Jun 11, 2006 (gmt 0)

10+ Year Member



found the problem!
just reomved
enctype="multipart/form-data"
and now everything works.
This looks soooooooooooo stupid :)
Thanks all for your help.

coopster,
The error occur after you click Submit...