php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11323 thttpd+php4 upload bug with post-method
Submitted: 2001-06-06 17:01 UTC Modified: 2001-10-28 17:36 UTC
From: dirk dot brueggen at aachen dot utimaco dot de Assigned:
Status: Closed Package: Other web server
PHP Version: 4.0 Latest CVS (2001-06-06) OS: FreeBSD3.2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dirk dot brueggen at aachen dot utimaco dot de
New email:
PHP Version: OS:

 

 [2001-06-06 17:01 UTC] dirk dot brueggen at aachen dot utimaco dot de
Hello,

on my(our) system(s), html-fileupload does not work with php4 and thttpd.
It is not to see if it is a bug in php4 or in thttpd.

I tested it with various versions of Php and Thttpd (see below).
Sometime it works with the same php-scipts, but only with files
under 600bytes and only with stunnel. The same scripts are
running with Apache without errors.

There are 2 kinds of error-syndromes:
1. The temp-file ($userfile, in my example below) and size ($userfile_size)
   does not exists, the variables are not generated=empty,
   but the file-name ($userfile_name) and mime-type ($userfile_type)
   are fine.
   This happened, if the upload-file was under 600bytes.
2. With bigger files, Netscape shows a network error: Broken pipe


Anybody know the problem and can help me??

Maybe not enough stacksize?
Resource limits (current):
  cputime          infinity secs
  filesize         infinity kb
  datasize           524288 kb
  stacksize           65536 kb
  coredumpsize     infinity kb
  memoryuse        infinity kb
  memorylocked     infinity kb
  maxprocesses          531
  openfiles            1064



Best regards,  Dirk Brueggen


-------

Testet on Systems:
 FreeBSD 3.2  PHP4.0.6-dev   Thttpd2.20b    stunnel3.11 (works with small
 FreeBSD 3.2  PHP4.0.3pl1    Thttpd2.20b                 files)
 FreeBSD 3.2  PHP4.0.5       Thttpd2.21  
 FreeBSD 3.2  PHP4.0.6-dev   Thttpd2.19 
 FreeBSD 3.0  PHP4.0.3pl1    Apache        (Works fine!)

-------

Build with, one example:
 tar xzvf php4-latest_tar.tar
 tar xzvf thttpd-2.21.tar.gz
 cd php4-200104170045
 ./configure --with-thttpd=../thttpd-2.21
or
 ./configure --with-thttpd=../thttpd-2.21 --enable-wddx
or
 ./configure --with-thttpd=../thttpd-2.21 \
              --enable-wddx --enable-shared=no \
              --with-config-file-path=/usr/local/lib \
              --enable-short-tags --without-mysql \
              --without-pcre-regex
 make install
 cd ../thttpd-2.21
 ./configure
 make
 make install

------

I tested various php-settings, for example:
 max_execution_time=34
 memory_limit=1200000
 post_max_size=5000000
 upload_tmp_dir=incoming/
 upload_max_filesize=50000000

------

Only for testing, I have siplified the php-scripts:
----------------
uploadtest9.html
---------
<HTML>
<HEAD>
<TITLE>UploadTest php4 V9.1</TITLE>
<!-- Created by: Dirk Brueggen, 6.06.2001 -->
<BODY bgcolor=#e0e0e0 text=#000000 link=#00b0ff vlink=#e10000 alink=#80000f>
<BR><BR>
<H3>Upload Test V9.1</H3>

<FORM ENCTYPE="multipart/form-data" ACTION="uploadtest9.php" METHOD="POST">
<INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="1000000">
Datei:
<INPUT NAME="userfile" TYPE="file" SIZE="50">
<BR>
<INPUT TYPE="submit" VALUE="File Senden">
</FORM>

</BODY>
</HTML>

------------------------------
uploadtest9.php
-----------
<HTML>
<HEAD>
<TITLE>UploadTest php4 V9.1</TITLE>
<!-- Created by: Dirk Brueggen, 6.06.2001 -->
<BODY bgcolor=e0e0e0 text=#000000 link=#00b0ff vlink=#e10000 alink=#80000f>
<BR><BR>

<HR>
<H3>Ergebniss</H3><BR>

<?php

set_time_limit(600);

echo "Tmp-File: $userfile <BR>";
echo "Original-Datei: $userfile_name <BR>";
echo "Groesse: $userfile_size <BR>";
echo "Mime: $userfile_type <BR>";

$path1 = "incoming/".$userfile_name;
echo "<BR>Ziel: $path1 <BR>";

copy($userfile,$path1);
?>

</BODY>
</HTML>

-----------------------------------

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-19 04:02 UTC] sniper@php.net
Does this happen with latest CVS snapshot:

http://snaps.php.net/

 [2001-08-21 02:34 UTC] dirk dot brueggen at aachen dot utimaco dot de
Yes the same error, sorry...

I am fear its thttpd, because there are no problems with
Apache.

Greetings,  Dirk Brueggen

----------

Btw., what Operating-System do you use? ,-))

tar xzvf php4-200108200135.tar.gz
cd php4-200108200135
./configure --with-thttpd=../thttpd-2.21b/ --enable-wddx --enable-shared=no --enable-short-tags --without-mysql --without-pcre-regex

make install
------- out:
...
+ /usr/downloads/php4-200108200135/build/shtool install -c -m 644
/usr/downloads/php4-200108200135/pear/Log/observer.php
/usr/local/lib/php/Log/
cp: /usr/downloads/php4-200108200135/pear/Log/observer.php: No such file or
directory
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
----

Easyest Solution:
cp or mv php4-200108200135/pear/Log/Observer.php php4-200108200135/pear/Log/observer.php

OOOooohhh ,-))


Greetings,  Dirk Br?ggen.


 [2001-10-28 17:36 UTC] sniper@php.net
Please report this to the kind folks of thttpd developers.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 13 12:01:27 2024 UTC