php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37557 Problem with open base, move_uploaded_file worked fine before now it doesnt.
Submitted: 2006-05-23 04:16 UTC Modified: 2006-05-26 19:06 UTC
From: jcink2k at gmail dot com Assigned:
Status: Not a bug Package: Safe Mode/open_basedir
PHP Version: 4.4.3RC1 OS: Windows XP SP2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jcink2k at gmail dot com
New email:
PHP Version: OS:

 

 [2006-05-23 04:16 UTC] jcink2k at gmail dot com
Description:
------------
Hi, I am not sure if this is a bug or not, so I apologize if it's bogus. But I'm having this issue in RC2 at the moment. RC1 is the only option here so I have picked that.

I have open_basedir set to "."

Reproduce code:
---------------
$folder = "./uploads/";
$temporary = $_FILES['swforpic']['tmp_name'];
$realfilename = $_FILES['swforpic']['name'];

move_uploaded_file($temporary, $folder.$realfilename) or die("Problem writing the file. ");

Worked fine for me on PHP 4.4.2

Expected result:
----------------
I expected the file to upload, as it does just fine in PHP 4.4.2 with open_basedir set to "."

Actual result:
--------------
Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(C:\PROGRA~1\EASYPH~1\\tmp\phpED.tmp) is not within the allowed path(s): (.) in c:\program files\easyphp1-8\www\um\textfilebb_v1p0p17\add_reply.php on line 217

Don't know if this is a bug or not. But it was working just fine before, which makes me think that it is somehow.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-23 12:46 UTC] youza at post dot cz
Yes the similiar problem found in

http://bugs.php.net/bug.php?id=37236
 [2006-05-23 15:32 UTC] jcink2k at gmail dot com
Alright, thanks, is there a workaround to this someplace? I saw the fix on that page on making upload_tmp_dir the same as the destination... but when I tried upload_tmp_dir = "." (making it the same as open base) it didn't work.
 [2006-05-24 20:13 UTC] tony2001@php.net
Duplicate of bug #37236.
 [2006-05-26 19:06 UTC] jcink2k at gmail dot com
Hi,

Have there been any updates on this bug? I tried the latest php4 snap and the problem still seems to be there.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 18:01:28 2024 UTC