From: tom at ideaweb dot de
Operating system: Linux Debian 4.0 Etch
PHP version: 5.2.3
PHP Bug Type: Safe Mode/open_basedir
Bug description: Cannot access/unlink Symlinks if target does not exists
Description:
------------
If i have a symlink with a deleted target in the same directory (like
vmware.pdf -> 118536740980919500.file), i cannot access the symlink
anymore and get an error that open_basedir restriction in effect.
I followed the instruction of closed bug #41847. i downloaded the
latest php snapshot, but it doesnt help, same issue and now i get new
strange thing (but only with >5.2.3):
Warning: session_start() [function.session-start]: open_basedir
restriction in effect. File(/www/tmp) is not within the allowed path
(s): (/var/www/ideaweb.de/) in /var/www/ideaweb.de/ideacms/admin/
cms_log.php on line 1
/www/tmp is the session.save_path in php.ini
Is it a good idea, that i have to put the session files in the webroot
with upcoming php versions (>5.2.3)? It means more overhead to
protocet files from public if basedir is webroot.
Reproduce code:
---------------
<?php
echo realpath( '.' );
if( file_exists( "../media/db/test.pdf" ) ) {
unlink( "../media/db/test.pdf" );
}
?>
Expected result:
----------------
/var/www/ideaweb.de/ideacms/admin
Actual result:
--------------
/var/www/ideaweb.de/ideacms/admin
Warning: file_exists() [function.file-exists]: open_basedir restriction
in effect. File(../media/db/test.pdf) is not within the allowed path(s):
(/var/www/ideaweb.de/) in /var/www/ideaweb.de/ideacms/admin/
mdb_editor.php on line 697
--
Edit bug report at http://bugs.php.net/?id=42102&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=42102&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=42102&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=42102&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42102&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=42102&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42102&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42102&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42102&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42102&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42102&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=42102&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=42102&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42102&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42102&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42102&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42102&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42102&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42102&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42102&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42102&r=mysqlcfg