Forum Moderators: coopster

Message Too Old, No Replies

weird php upload problems

         

mshepherd

4:18 pm on Jan 26, 2006 (gmt 0)

10+ Year Member



Hey, I am pretty new to php and wrote a script to upload a jpg and resize to a certain size and create a thumbnail. The upload page always works in firefox, but when I use safari in os x 10.4.4 the upload script won't work at night (probably when the webserver is getting hit the hardest) but seems to work in the morning just fine. Anyone have any idea what is going on?

[edited by: coopster at 4:42 pm (utc) on Jan. 26, 2006]
[edit reason] removed url per TOS [webmasterworld.com] [/edit]

jatar_k

6:01 pm on Jan 26, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld mshepherd,

well, aside from gremlins, that is very strange

is it just running andd running but never finishing?
are the images huge?

could be that the load is high and the script times out
could be that you just happen to try files that are too large in the evening

is this only confined to safari? If you try a different browser with the same image at the same time does it work?

mshepherd

7:15 pm on Jan 26, 2006 (gmt 0)

10+ Year Member



Hey, I am always using the same image, it works in the morning but not in the evening in safari. But in the evening when I try with firefox and the same image it works fine.

mshepherd

7:16 pm on Jan 26, 2006 (gmt 0)

10+ Year Member



I forgot, the image I have been testing with it about .7 MB, in the morning though images of any size work, I have gotten images up to 5mb to go up fine.

mshepherd

8:09 pm on Jan 26, 2006 (gmt 0)

10+ Year Member



I forgot to answer one of your other questions, yes it is just running and not finishing when it doesn't work.

jatar_k

8:35 pm on Jan 26, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



at less than 1 MB it shouldn't be a huge issue

my only thought, try uploading a much smaller image in the evening and see if that helps identify the problem

very strange that FF always works and safari doesn't makes me think more browser related than anything, sorry, I am really not sure

mshepherd

2:49 am on Jan 27, 2006 (gmt 0)

10+ Year Member



I did some testing and it appears that when I am having trouble posting the post never makes it to my router. Which would explain it being browser dependent. Can someone check out my html form and make sure everything is clear. Thanks.

<html>
<form enctype='multipart/form-data' method='post' action='upload.php'>
<input type='file' name='file'>
<input type='submit' name='Submit' value='Go'>
</form>
</html>

grandpa

4:37 am on Jan 27, 2006 (gmt 0)

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



Your obfuscated form looks fine. One other thing that comes to mind is a custom firewall setting that's preventing the action via Firefox. I would definitely be looking outside the script for this problem. One good place to look would be log files.

mshepherd

4:49 am on Jan 27, 2006 (gmt 0)

10+ Year Member



It's definatly a safari issue because I changed the action url to some page that didn't exsist and I got the same behavior. Only about 1 out of every 4 posts would give me a 404 page. The rest would just stick at contacting webpage....