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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2022 The PHP Group
All rights reserved.
Last updated: Mon Sep 26 22:05:54 2022 UTC