php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40497 File-Upload does not work
Submitted: 2007-02-15 17:13 UTC Modified: 2007-02-23 01:00 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:3 (100.0%)
From: mueller at intertrend dot de Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 4.4.5 OS: Suse Linux
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: mueller at intertrend dot de
New email:
PHP Version: OS:

 

 [2007-02-15 17:13 UTC] mueller at intertrend dot de
Description:
------------
File upload does not work.

upload_tmp_dir = /tmp   is set in php.ini

downgrade to 4.4.4 fix the problem

Reproduce code:
---------------
<?php

$uploaddir = '/home/xxxx/www/xxxx/test';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);

echo '<pre>';
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
    echo "File is valid, and was successfully uploaded.\n";
} else {
    echo "Possible file upload attack!\n";
}

echo 'Here is some more debugging info:';
print_r($_FILES);

print "</pre>";

?>


Expected result:
----------------
file should be uploaded nad moved to dest-directory

Actual result:
--------------
(
    [userfile] => Array
        (
            [name] => test.txt
            [type] => 
            [tmp_name] => 
            [error] => 6
            [size] => 0
        )

)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-23 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 14:01:30 2024 UTC