|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42102 Cannot access/unlink Symlinks if target does not exists
Submitted: 2007-07-25 13:13 UTC Modified: 2007-08-19 01:00 UTC
From: tom at ideaweb dot de Assigned:
Status: No Feedback Package: Safe Mode/open_basedir
PHP Version: 5.2.3 OS: Linux Debian 4.0 Etch
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.
Block user comment
Status: Assign to:
Bug Type:
From: tom at ideaweb dot de
New email:
PHP Version: OS:


 [2007-07-25 13:13 UTC] tom at ideaweb dot de
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/ in /var/www/
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:
	echo realpath( '.' );
	if( file_exists( "../media/db/test.pdf" ) ) {
     	unlink( "../media/db/test.pdf" );

Expected result:

Actual result:
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/ in /var/www/
mdb_editor.php on line 697


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-19 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 16:01:27 2024 UTC