ID:               31309
 Updated by:       [EMAIL PROTECTED]
 Reported By:      frido at isp-services dot nl
-Status:           Open
+Status:           Feedback
 Bug Type:         PHP options/info functions
 Operating System: RedHat 7.2 / Gentoo 2004
 PHP Version:      4.3.10
 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:
------------------------------------------------------------------------

[2004-12-27 12:30:29] frido at isp-services dot nl

Description:
------------
We currently define in our apache vhost the following doc_root:

php_admin_value open_basedir
"/home/sites/site7/:/home/sites/www.sjeemz.be/:/usr/lib/php/:
/tmp:/home/sites/general"

Where site7 is a real directory and sjeemz.be is a symlink, when we use
the symlink as a directory to safe to:

http://www.sjeemz.be/upload/index.php

this creates an error, while the symlink is in the open_basedir.


Reproduce code:
---------------
http://www.sjeemz.be/upload/index.phps

Expected result:
----------------
"When a script tries to open a file with, for example, fopen() or
gzopen(), the location of the file is checked. When the file is outside
the specified directory-tree, PHP will refuse to open it. All symbolic
links are resolved, so it's not possible to avoid this restriction with
a symlink."

the symlink is not resolved to site7 in example above.


Actual result:
--------------
Warning: move_uploaded_file(): open_basedir restriction in effect.
File(/home/sites/symlink/web/uploads/chenbro_aug.sxc) is not within the
allowed path(s): (/home/sites/symlink/web) in
/home/sites/test/web/index.php on line 16
There was an error whilst uploading the file.


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


-- 
Edit this bug report at http://bugs.php.net/?id=31309&edit=1

Reply via email to