|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2637 forms with file-upload hand on submit
Submitted: 1999-10-29 08:04 UTC Modified: 1999-11-11 11:32 UTC
From: hholzgra at media-engineering dot de Assigned: hholzgra (profile)
Status: Closed Package: Other
PHP Version: 4.0 Latest CVS (29/10/1999) OS: redhat 6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: hholzgra at media-engineering dot de
New email:
PHP Version: OS:


 [1999-10-29 08:04 UTC] hholzgra at media-engineering dot de
The following test code worked fine on a apache1.3.9 with php3
but hangs on apache1.3.9 with php4b2

It works most of the time when i remove the additional text input form
the upload form
but with it stracing the Web-Server shows that it hangs in a read() from
a socket .


    <title>UPLOAD TEST 1</title>

    <? if( ! strcmp($REQUEST_METHOD,"GET") ):    ?>

      <FORM ENCTYPE="multipart/form-data" METHOD=POST>
      <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="100000">
      Send this file: <INPUT NAME="userfile" TYPE="file">

      <input type=text name=hallo>    # PROBLEM AREA

      <INPUT TYPE="submit" VALUE="Send File">

    <? else: ?>

      <? print "--- $fred <br>" ?>
      <? print "Userfile $userfile <br>" ?>
      <? print "    name $userfile_name <br>" ?>
      <? print "    size $userfile_size <br>" ?>
      <? print "    type $userfile_type <br>" ?>
      <? print "    hallo $hallo <br>" ?>

    <? endif ?>



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-11-10 12:13 UTC] hholzgra at cvs dot php dot net
is't not as easy as i thought it to be,
now it doesn't work with php3 anymore to

the problem is a blocking read in the apache code
and the browser not sending the full data for the
post request

i can get it blocking on plain cgi's to

will give the code a closer look-at tomorrow ...
 [1999-11-11 11:32 UTC] hholzgra at cvs dot php dot net
now here is what i did wrong:

i used an 'input type=file ...' with no size given
(the default size is rather short)
after the first upload the netscape file requester
remembers and highlights the file you recently used
so all i did was pressing 'OK' on subsequent test runs
but this returns only the DIRECTORY the file is in
due to the short input field i saw only the beginning 
of the pathname, which looked alright

and this is where it hangs, its not php or apache
it is the browser that starts to submit the form
content, but hangs when trying to read the directory
given as the filename

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Mar 20 19:03:41 2023 UTC