PHP :: Bug #21885 :: move_uploaded_file error with open_basedir
| Bug #21885 | move_uploaded_file error with open_basedir | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2003-01-26 05:01 UTC | Modified: | 2005-01-31 23:30 UTC |
|
||||||||||
| From: | mak77 at anvi dot it | Assigned: | wez (profile) | |||||||||||
| Status: | Closed | Package: | Safe Mode/open_basedir | |||||||||||
| PHP Version: | 4.3.1-dev | OS: | any | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2003-01-26 05:01 UTC] mak77 at anvi dot it
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
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2003-01-27 05:25 UTC] coffee at tea dot com
[2003-01-27 06:36 UTC] mak77 at anvi dot it
[2003-01-27 15:35 UTC] ryan at hostbaby dot com
[2003-01-27 17:11 UTC] info at ofek dot com
[2003-02-21 20:20 UTC] wez@php.net
[2003-02-23 16:32 UTC] sniper@php.net