php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15715 file upload - empty $userfile
Submitted: 2002-02-25 11:53 UTC Modified: 2002-03-06 12:31 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: remi dot collet at univ-reims dot fr Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.1.1 OS: HP-UX 11i
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: remi dot collet at univ-reims dot fr
New email:
PHP Version: OS:

 

 [2002-02-25 11:53 UTC] remi dot collet at univ-reims dot fr
With sample page :
<form enctype="multipart/form-data" action="<?php echo $PHP_SELF; ?>" method="post">
        <input type="hidden" name="MAX_FILE_SIZE" value="100000">
        Send this file: <input name="userfile" type="file"><BR>
        <input type="submit" value="Send File">
</form></CENTER>
<HR>
<?php
        echo "Field : " . $userfile ."<BR>";
        echo "File : " . $_FILES[userfile][name] ."<BR>";
        echo "Type : " . $_FILES[userfile][type] ."<BR>";
        echo "Temp : " . $_FILES[userfile][tmp_name] ."<BR>";
        echo "Size : " . $_FILES[userfile][size] ."<BR>";
        if (is_uploaded_file($_FILES[userfile][tmp_name]))
                echo "Download : Ok<BR>";
        else    echo "Download : KO<BR>";
        }

On RedHat 7.2 (PHP 4.1.1, Apache 1.3.23) no problem,
$userfile=none or path to /tmp/xxxxx

On HP-UX 11i (PHP 4.0.6, Apache 1.3.19 build by HP) no problem.

On HP-UX 11i (PHP 4.1.1, Apache 1.3.23 build from source) $userfile and other variables are empty.
(It's work one time on many)
Compile flags :

./configure  --with-oci8  --with-apache=../apache_1.3.23
--with-gd=/opt/gd --with-pdflib=/opt/pdflib
--with-jpeg-dir=/opt/jpeg-6 --with-png-dir=/opt/libpng
--with-tiff-dir=/opt/tiff-3.5 --with-zlib-dir=/opt/zlib
--enable-sigchild --with-mysql=/opt/mysql
--enable-sockets --with-tsrm-pthreads

Thank's for your help.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-05 15:56 UTC] mdruilhe at w-agora dot net
I experiment the same problem on a Linux platform.
All variables including $_POST, $HTTP_POST_VARS (,and so on ) are empty.
The problem occurs if the attribute 'enctype="multipart/form-data" ' is set in the FORM tag even if no file is uploaded in the script.
Everything is OK if the enctype parameter is removed.

-M
 [2002-03-06 12:28 UTC] remi dot collet at univ-reims dot fr
Hi, 

After upgrading to PHP 4.1.2, no more problem.
 [2002-03-06 12:31 UTC] remi dot collet at univ-reims dot fr
ok with PHP 4.1.2
 [2002-03-06 12:31 UTC] jan@php.net
closing this one.
 [2002-04-18 10:04 UTC] a dot sleep at asleep dot net
We have reproduced this same bug on Solaris 7 and Apache.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 12:01:33 2025 UTC