On Fri, 7 May 2004, BUSTARRET, Jean-Francois wrote: > Let's get rid of this useless (when using a cache) realpath call, without having to > migrate to PHP5 !
Well, the realpath call's usefulness doesn't have anything to do with the cache. It is there to provide a canonicalized absolute pathname to be stored in the included_files list and on every include another realpath is done to check against this list. This means that if the same file is included via different paths, the include_once/require_once will still catch that fact. Now, I do agree with you that the cost for this convenience is way too high which is why I turn this off for my use and tell people they get what they deserve if they include the same file via different paths. Of course, turning this off also messes up any open_basedir checks as it becomes trivial to work around an open_basedir restriction with a symlink or some creative path walking. I did try your patch and it crashed my build. Granted, my tree is quite hacked up and doesn't ever call realpath, but still. Haven't had time to track down exactly why it caused problems. -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php