Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11541 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66788 invoked by uid 1010); 24 Jul 2004 15:22:19 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 66756 invoked from network); 24 Jul 2004 15:22:19 -0000 Received: from unknown (HELO e-matters.de) (217.69.76.213) by pb1.pair.com with SMTP; 24 Jul 2004 15:22:19 -0000 Received: (qmail 26690 invoked by uid 0); 24 Jul 2004 15:20:22 -0000 Received: from p54875a39.dip.t-dialin.net (HELO ?192.168.1.77?) (84.135.90.57) by /var/run/qmail-smtp.pid with SMTP; 24 Jul 2004 15:20:22 -0000 Message-ID: <41027EA5.2000007@php.net> Date: Sat, 24 Jul 2004 17:22:13 +0200 User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Rasmus Lerdorf , internals@lists.php.net References: <5.1.0.14.2.20040724003444.034ea690@127.0.0.1> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Everyone on the road? From: sesser@php.net (Stefan Esser) Hi, > I'd love to see a realpath() replacement function which makes use of the > stat cache for partial paths as well. Chances are that on a busy ISP > server, for example, you will have thousands of scripts and include files > served up from the same base path and you are going to be statting your > way along that tree every time you hit a file that isn't in the cache. It is a very good idea to replace realpath() with an own function. Realpath is not only slow, it is also "dangerous" on some systems like linux where it also works on paths that are not really existing. example: include "./foo/bar/index.php/../../../../../../etc/passwd"; On the BSDs this should be invalid, but linux happily accepts it as /etc/passwd. This is just one thing that would largely benefit from an own realpath(). Stefan