Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #40497 : File-Upload does not work
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 11th July 03:15
php-bugs
External User
 
Posts: 1
Default #40497 : File-Upload does not work



From: mueller at intertrend dot de
Operating system: Suse Linux
PHP version: 4.4.5
PHP Bug Type: *General Issues
Bug description: File-Upload does not work

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/***x/www/***x/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
)

)

--
Edit bug report at http://bugs.php.net/?id=40497&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40497&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40497&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40497&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40497&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40497&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40497&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40497&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40497&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40497&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40497&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40497&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40497&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40497&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40497&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40497&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40497&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40497&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40497&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40497&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40497&r=mysqlcfg
  Reply With Quote


  sponsored links


2 11th July 03:15
External User
 
Posts: 1
Default #40497 : File-Upload does not work



ID: 40497
Updated by: derick@php.net
Reported By: mueller at intertrend dot de
-Status: Open
+Status: Feedback
Bug Type: *General Issues
Operating System: Suse Linux
PHP Version: 4.4.5
New Comment:

Please try using this CVS snapshot:

http://snaps.php.net/php4-STABLE-latest.tar.gz

For Windows:

http://snaps.php.net/win32/php4-win32-STABLE-latest.zip


Previous Comments:
------------------------------------------------------------------------

[2007-02-15 17:13:04] 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/***x/www/***x/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
)

)


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


--
Edit this bug report at http://bugs.php.net/?id=40497&edit=1
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666