From: davidb at pins dot net
Operating system: Solaris 8
PHP version: 5.1.6
PHP Bug Type: Apache related
Bug description: MultiPart Form Uploads fail with FastCGI
Description:
------------
Greetings.
I'm currently observing a reproducible version of bug #26647 in the PHP
5.1 train. For a subset of users running mostly Mac but some PC browsers,
the PHP process unceremoniously exists witout comment when the form is
POST'ed. A truss of the PHP FastCGI process shows PHP reading in the text
(incidently, it's also pointed out a performance issue where php's doing a
read() of 8 bytes at a time from the FastCGI stream instead of 8kB at at a
time, but I digress). The problem appears to go away when I switch to a
non-FastCGI version.
The broken users are broken consistently - it would be possible (and easy)
to gdb trace it and see why it's exiting. Here's the start/end of the
truss:
accept(0, 0xFFBEDA50, 0xFFBED99C, 1) = 4
fcntl(0, F_SETLK, 0xFFBEDA28) = 0
poll(0xFFBED8F0, 1, 1000) = 0
shutdown(4, 1, 1) = 0
recv(4, "0101\001\0\b\0\0", 8, 0) = 8
recv(4, "\001\0\0\0\0\0\0", 8, 0) = 8
recv(4, "0104\001\015\0\0", 8, 0) = 8
recv(4, "0E05 C O N T E N", 8, 0) = 8
recv(4, " T _ L E N G T H", 8, 0) = 8
recv(4, " 8 3 5 1 90104\0", 8, 0) = 8
recv(4, "01\0 d\0\0\f V C", 8, 0) = 8
recv(4, " O N T E N T _ T", 8, 0) = 8
recv(4, " Y P E m u l t i", 8, 0) = 8
recv(4, " p a r t / f o r", 8, 0) = 8
recv(4, " m - d a t a ; ", 8, 0) = 8
recv(4, " b o u n d a r y", 8, 0) = 8
recv(4, " m L b O u N d A", 8, 0) = 8
(many many lines)
recv(4, " r Y - -\r\n0105", 8, 0) = 8
recv(4, "\001\0\0\0\0", 8, 0) = 6
recv(4, 0xFFBEDA28, 8, 0) = 0
close(4) = 0
fcntl(0, F_SETLKW, 0xFFBEDA28) = 0
accept(0, 0xFFBEDA50, 0xFFBED99C, 1) (sleeping...)
Bam. Goodbye. No error, no nothing.
Reproduce code:
---------------
<html>
<head>
</head>
<body>
<form method="post" action="response.php" enctype="multipart/form-data">
<input name="test" type="file">
<input name="submit" value="submit" type="submit" />
</form>
</body>
</html>
Expected result:
----------------
The response.php should work - note, however, that php never even attempts
to open the response.php file, which is just a trivial "file uploaded"
message, no attempt to save.
Actual result:
--------------
See above truss - php just exits.
--
Edit bug report at http://bugs.php.net/?id=38757&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=38757&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=38757&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=38757&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38757&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=38757&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38757&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38757&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38757&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38757&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38757&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=38757&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=38757&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38757&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38757&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38757&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38757&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38757&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38757&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38757&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38757&r=mysqlcfg