On Tue, 10 Jun 2003, Ilia A. wrote:
> As far as realpath() goes beyond the _once() directives and php installations
> where safe_mode or open_basedir are enabled it is not really needed. To
> handle safe_mode/open_basedir is fairly easy and mostly involves passing
> TSRMLS_CC to virtual_file_ex() and then putting realpath related code inside
> if (PG(safe_mode) || PG(open_basedir)) {. I already have a patch for this. I
> wonder if instead of comming up with an alternative way, which is likely to
> involve stat() or lstat(). We could add a flag that would allow us to
> identify *_once requests and make realpath conditional on that.

The main issue here is that we do an implicit require_once on the main
script now.  If you remove the realpath() on that main script load, then a
subsequent include_once on the same file through the actual path, or a
different symlinked path will not be caught.

Personally I think this is way too much of an edge case to warrant the
horribly expensive realpath() call on every single request and I am
perfectly fine simply telling people not to do that.  We lived with this
situation for a long time and it was only recently someone "fixed" this.

-Rasmus

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to