Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22318 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10975 invoked by uid 1010); 10 Mar 2006 06:25:43 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 10960 invoked from network); 10 Mar 2006 06:25:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Mar 2006 06:25:43 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:8061] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id EA/C8-27106-6EB11144 for ; Fri, 10 Mar 2006 01:25:42 -0500 Received: (qmail 30760 invoked from network); 10 Mar 2006 06:25:36 -0000 Received: from localhost (HELO ANDI-NOTEBOOK.zend.com) (127.0.0.1) by localhost with SMTP; 10 Mar 2006 06:25:36 -0000 Message-ID: <7.0.1.0.2.20060309222503.08a04930@zend.com> X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Date: Thu, 09 Mar 2006 22:25:33 -0800 To: "Brian J. France" ,internals@lists.php.net In-Reply-To: <0FF5C589-6436-45E0-8626-F0B9944046ED@firehawksystems.com> References: <0FF5C589-6436-45E0-8626-F0B9944046ED@firehawksystems.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] primary file realpath change From: andi@zend.com (Andi Gutmans) Are you sure VCWD_REALPATH doesn't use the realpath cache? It did last time I checked and I think is still the right method to use there... At 09:13 PM 3/9/2006, Brian J. France wrote: >Does anybody see a problem with this patch (which is currently >against the 5.1.2 release)? > >expand_filepath will eventual do a realpath, but it also uses the >realpath cache before calling realpath. VCWD_REALPATH just maps >directly to realpath and doesn't use the realpath cache so for every >request you get a realpath call (and all the syscalls that go with >it) on the primary file. > >I think I need to pass TSRMLS_CC, but I am not sure. > >Any problems committing it to PHP_5_1 and HEAD? > >Brian > >--- ../php-5.1.2.orig/main/main.c Sun Jan 1 04:50:17 2006 >+++ main/main.c Thu Mar 9 20:00:47 2006 >@@ -1684,7 +1684,7 @@ > char realfile[MAXPATHLEN]; > int realfile_len; > int dummy = 1; >- if (VCWD_REALPATH(primary_file->filename, >realfile)) { >+ if (expand_filepath(primary_file->filename, >realfile TSRMLS_CC)) { > realfile_len = strlen(realfile); > zend_hash_add(&EG(included_files), >realfile, realfile_len+1, (void *)&dummy, sizeof(int), NULL); > if (strncmp(realfile, > primary_file- >filename, realfile_len)) { > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php