#42102 [Bgs->Opn]: Cannot access/unlink Symlinks if target does not exists

From: Date: Wed, 25 Jul 2007 20:16:37 +0000
Subject: #42102 [Bgs->Opn]: Cannot access/unlink Symlinks if target does not exists
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-115447@lists.php.net to get a copy of this message
ID: 42102 Updated by: jani@php.net Reported By: tom at ideaweb dot de -Status: Bogus +Status: Open -Bug Type: Session related +Bug Type: Safe Mode/open_basedir Operating System: Linux Debian 4.0 Etch PHP Version: 5.2.3 Previous Comments: ------------------------------------------------------------------------ [2007-07-25 14:31:12] jani@php.net Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. Related to bug #42077 (for which the solution is under discussion) ------------------------------------------------------------------------ [2007-07-25 13:13:53] tom at ideaweb dot de 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 this bug report at http://bugs.php.net/?id=42102&edit=1

« previous php.bugs (#115447) next »