Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38984 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21474 invoked from network); 15 Jul 2008 19:20:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jul 2008 19:20:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.94.239.7 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.94.239.7 mail.jdi-ict.nl Linux 2.6 Received: from [82.94.239.7] ([82.94.239.7:59009] helo=mail.jdi-ict.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F4/EB-11609-758FC784 for ; Tue, 15 Jul 2008 15:20:28 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.jdi-ict.nl (8.13.7/8.12.11) with ESMTP id m6FJJ8cP007327; Tue, 15 Jul 2008 21:19:08 +0200 Date: Tue, 15 Jul 2008 21:19:08 +0200 (CEST) X-X-Sender: derick@kossu.ez.no To: Amir Hardon cc: Rasmus Lerdorf , PHP Internals List In-Reply-To: <1216149220.16451.10.camel@amirh> Message-ID: References: <1216133436.6875.35.camel@amirh> <487CEF26.7030802@lerdorf.com> <1216149220.16451.10.camel@amirh> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Subject: Re: [PHP-DEV] lstat call on each directory level From: derick@php.net (Derick Rethans) On Tue, 15 Jul 2008, Amir Hardon wrote: > On Tue, 2008-07-15 at 11:40 -0700, Rasmus Lerdorf wrote: > > > That's a realpath() call and it should be getting cached by the > > realpath cache, so if you are seeing these on every request, try > > increasing your realpath_cache size in your .ini. Without checking > > the realpath, you would be able to circumvent open_basedir checking > > really easily with a symlink. > > I've already increased the realpath_cache to the point it didn't give > any more benefit(And it did give benefit), but there are still many > lstat calls, and still placing our portal dir in the root directory > gave a huge performance benefit(After fine-tuning realpath_cache). We > don't use open_basedir. > > I think it might be wise to make this dir check configurable, as the > performance impact is major. Anyway - can you please direct me to the > place where this check is made in php's source, so I'll be able to > disable it manually? I've a patch for php 4.3 and 4.4 online - based on a patch by rasmus: http://files.derickrethans.nl/patches/php-4.3-skip-path-checks.patch http://files.derickrethans.nl/patches/php-4.4-skip-path-checks.patch regards, Derick -- Derick Rethans http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org