Ive created an uplaod script in php that takes a file, resizes it, and creates a cropped square thumbnail. The script itself seems to work fine.
However, when i tried to upload an image through firefox, on clicking the submit button the browser shows the loading animation, but it never calls the script, it just stays on the current page. If dont upload an image, then the script can be found and is run.
I tried in safari, and i dont get the same problem, i can upload an image from the form, it will process it and take me the correct page.
Ive tired just calling a basic script from the form, it just prints out the $_POST and $_FILES, and i get the same result, if an image is present, it wont get to the script, if no image is present, it runs fine.
Im just wondering if anyone has any idea whats going on?
=Update=
Okay, so ive still got this problem, i seem to think ive found out whats causing it then, but then i find something that contradicts it completley.
At the moment, ive noticed that i can successfully upload after i clear my firefox cache, but i can only upload one image, then when i try to upload another, i cant, it just resets the connection after "Loading..." for a bit.
Also, ive noticed that i can Ctrl+F5 a few times and get another uplaod through.
Althought there are ways around this, i dont want to have a form that requires users to clear cookies or refresh everytime they need to upload. And as ive mentioned before, this error does not occor in IE/Opera/Safari/Chrome.
It seems like firefox is storing something, im not sure what. Any help would be greatfully appretiated.
If it helps here is the code im using.
The HTML Form
<form enctype="multipart/form-data" action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST">
<label for="file">Choose a file to upload</label>
<input id="file" name="file" type="file" /><br />
<input type="submit" value="Upload File" name="submit" />
And the php..
if (isset($_POST['submit'])) {
echo "Processing...<br/>";
if (isset($_FILES['file']['name'])) {
$file_array = $_FILES['file'];
echo "Uploading...";
upload File($file_array);
echo "...Done";
}
}
The echos are for me to see whats going on. If none of them are actually being output. So for some reason the form is not being submitted. Which is why its not getting to the script. Ive no idea why tho. Ive got no css, or js errors.
== Update ==
Okay ive being trying some more things and still no luck, the html, css, js is all valid. Ive done an IIS Reset, ive recreated my firefox profile. And still now luck.
I was testing it again, and this time i stoped it in the middle of loading (before the connection was reset) and then tried to go to a different page of the website, and the freezing continued, it would still say "Loading..." and "Waiting for localhost...". Not really sure what to make of that, is it some settings that i have? But then why doesnt it affect other browsers?
== Update ==
As i mentioned below, it seems that AVG Linkscanner/Active surf shield seems to causing this issue, and there are many reports of others having similar problems with it. I updated from AVG Free v9.0.733 to v9.0.790 and i STILL have the same problem. Im going to browse the AVG support forums and maybe post something over there since it seems to be an AVG issue.
If anyone does have anymore insight, please post below. Its much appretiated :)