php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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 .


-----8<---------------------------------------

<html>
  <head>
    <title>UPLOAD TEST 1</title>
  </head>

  <body>
    <? 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">

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


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

    <? else: ?>

    <ul>
      <? 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>" ?>
    </ul>

    <? endif ?>

  </body>
</html>



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC