From:             [EMAIL PROTECTED]
Operating system: Windows XP - IIS
PHP version:      4.3.0
PHP Bug Type:     Filesystem function related
Bug description:  move_uploaded_file error with open_basedir

i've a script that worked well with 4.2.2, this scripts makes an upload

my ini is set to:

open basedir=. 

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if
not
; specified).
upload_tmp_dir ="c:\temp\php-uploads"

; Maximum allowed size for uploaded files.
upload_max_filesize = 6M


my script does simply:

move_uploaded_file($_FILES['new_file_file']['tmp_name'],
$this->path.$this->filename);
in my class...

it gives me:

Warning: move_uploaded_file() [function.move-uploaded-file.html]:
open_basedir restriction in effect.
File(c:\temp\php-uploads\phpD.tmp) is not within the allowed path(s): (.)
in C:\neoportal\modules\mediaalbum\mediafile_class.php on line 95

it seems that a open_basedir check is made on the source file and not only
on the destination file. the file is correctly uploaded to
c:\temp\php-uploads\phpD.tmp but not moved to dest folder (that is a
subfolder of current dir so it's in the allowed path)

The same error is in PHPMYADMIN 2.3.3pl1 when i try to upload a file .sql

Adding the c:\temp\ path to open basedir as ".;c:\temp\" doesn't help

-- 
Edit bug report at http://bugs.php.net/?id=21885&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21885&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21885&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21885&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21885&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21885&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21885&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21885&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21885&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21885&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21885&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21885&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21885&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21885&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=21885&r=gnused

Reply via email to