open_basedir bug or misunderstanding?

From: Date: Wed, 07 Feb 2001 10:13:38 +0000
Subject: open_basedir bug or misunderstanding?
Groups: php.general php.general php.install php.install 
Request: Send a blank email to php-general+get-38732@lists.php.net to get a copy of this message
Hi php users, I found something strange and don't know if it is a bug or that it is the way it should work. Situation: ---------- open_basedir = . PHP-4 runs as apache module. (unix) Safe-mode is on. Webserver document tree: /home/www/html/ There exists a link in that tree to the www directory of a user: /home/www/html/rvdberg -> /home/rvdberg/www I have a PHP script in: /home/rvdberg/www/test_fopen.php and a file: /home/rvdberg/www/textfile.txt Problem: --------- When opening files in the current directory with PHP: $fp = fopen("./textfile.txt","r"); This gives an error complaining about the open_basedir setting not allowing to open this file. It all DOES work when I do the same thing in a directory which isn't pointed to by a symbolic link! So, the same php file in the directory /home/www/html/php_testdir/test_fopen.php works!? Question: --------- What I want is clear I think: I only want the php scripts to be able to open files in the current directory and further down in the tree. Setting open_basedir to "." seems logical, but doesn't work. Seems to be related to the symbolic link. How to solve? Or should I submit a bug report? -Remco -- ---------------------------------------------------------------------------- Remco van den Berg Admin/SO/helpdesk DSE ICQ: 47514668 rvdberg@dse.nl http://www.dse.nl/ ----------------------------------------------------------------------------

« previous php.general (#38732) next »