Re: explicit dot in open_basedir

From: Date: Mon, 18 Nov 2002 18:37:14 +0000
Subject: Re: explicit dot in open_basedir
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-124962@lists.php.net to get a copy of this message
My question was: what is supposed to happen if there is no dot in the open_basedir path, for example: open_basedir = /www Should I be able to open a file in ./tmp ? The way I understand the open_basedir doc, I should not be able. But another PHP user is telling me that he can open a file in ./tmp with no explicit dot in the path of open_basedir, and I cannot reproduce this behavior on my server. Marc BigDog wrote:
The explicit dot is to tell the system that you want the current working directory. So by saying "./tmp" you want the tmp (directory or file) that is located in the current working directory. If i understand what you are saying is that "./tmp" is a directory in the current working directory. If there is a file in that directory that you can open then yes you should be able to open a file in that directory. just remember that "./" means that you want the current working directory. Also, "../" means that you want to move up one in the directory structure. On Mon, 2002-11-18 at 14:58, Marc Delisle wrote:
Hi, I am using PHP 4.2.2 and would like to know what is the expected behavior when I don't put an explicit dot in the open_basedir path. Should I be able to open a file in "./tmp" ? Another question: let's say my document root is /www and I put a /www in open_basedir, then should I be able to open a file in "./tmp", which is a subdir under /www/marc? Thanks, Marc Delisle


« previous php.general (#124962) next »