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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
14 - 1 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 02:02:52 2024 UTC