Hi Matt,
I found a server-side solution to the Safari upload probem!!
I was able to duplicate our upload problem, using an iBook G3 clamshell as my server, and my PowerMac G5 as my client. I made sure that I was running the same version of PHP as on our FreeBSD server (PHP 5.1.2), so as to closely approximate the real server.
Here's where I got the PHP upload script that I used to test with:
http://php.snippetdb.com/view.php?ID=69
Here's where I got PHP 5.1.2 for Mac OS X 10.4 for my iBook G3:
http://www.entropy.ch/software/macosx/php/
I tried to upload, and the I got the same problem as with our real server. The first upload would work. After 1 or 2 more uploads, the uploads would stop working. They would just hang.
Once I was able to duplicate the problem, then I could look for solutions. After a lot of searching (many people have the problem, no one has answers that worked for me), I found a reference on this page
http://trac.lighttpd.net/trac/ticket/360 that said that they had fixed the problem on Safari 2.0.2 by changing their server to not keep the connection alive. (Search the page for "server.max-keep-alive"). They were using a completely different server, but it gave me a hint at what was wrong.
I found a nice description of http keep alive here
http://www.io.com/~maus/HttpKeepAlive.html I wondered what would happen if I turned off keep alive in Apache. I only wanted my changes to affect problematic versions of Safari, so I ran this PHP command to find my version string:
echo $_SERVER['HTTP_USER_AGENT'];
On my test server (my iBook), I made a backup copy of my /etc/httpd/httpd.conf, edited the live conf file, searched for "BrowserMatch" and then added this line near the other BrowserMatch lines:
BrowserMatch "Safari/417.9.2" nokeepalive
The string "Safari/417.9.2" is part of the HTTP_USER_AGENT Apache environment variable that tells the server that I'm using Safari, version 417.9.2, which is the version of Safari 2.0.3 that I'm running on Mac OS X 10.4.6.
I then restarted Apache (Easy on a Mac: In the Sharing System Preferences turn off then back on Personal Web Sharing).
I then did 8 uploads without a failure. I never could get past 2 or 3 uploads before.
So, it appears that Safari drops the connection, or times out, while the server has been instructed by default to keep the connection alive. This is consistent with the behavior we have been seeing.
I now need to find out which other versions of Safari have this problem.
David