Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45309 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54346 invoked from network); 18 Aug 2009 02:41:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Aug 2009 02:41:07 -0000 Authentication-Results: pb1.pair.com header.from=daniel@zoltak.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=daniel@zoltak.com; spf=permerror; sender-id=softfail Received-SPF: error (pb1.pair.com: domain zoltak.com from 203.16.214.57 cause and error) X-PHP-List-Original-Sender: daniel@zoltak.com X-Host-Fingerprint: 203.16.214.57 ipmail04.adl2.internode.on.net Received: from [203.16.214.57] ([203.16.214.57:1682] helo=ipmail04.adl2.internode.on.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 23/2C-22854-0C41A8A4 for ; Mon, 17 Aug 2009 22:41:07 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtgEAKuwiUqWZZo2/2dsb2JhbACBUtUThBkF X-IronPort-AV: E=Sophos;i="4.43,399,1246804200"; d="scan'208";a="429415636" Received: from ppp154-54.static.internode.on.net (HELO zoltak.com) ([150.101.154.54]) by ipmail04.adl2.internode.on.net with SMTP; 18 Aug 2009 12:11:00 +0930 Received: (qmail 3734 invoked from network); 18 Aug 2009 02:41:00 -0000 Received: from unknown (HELO localhost) (127.0.0.1) by 127.0.0.1 with SMTP; 18 Aug 2009 02:41:00 -0000 Received: from myob.com.au (myob.com.au [203.34.100.2]) by webmail.zoltak.com (Horde MIME library) with HTTP; Tue, 18 Aug 2009 12:41:00 +1000 Message-ID: <20090818124100.kixgo879us8g8koo@webmail.zoltak.com> Date: Tue, 18 Aug 2009 12:41:00 +1000 To: internals@lists.php.net References: <20090731101017.jcs6fiyk0sg4gcok@webmail.zoltak.com> <4A72A254.8030808@sci.fi> <4A7545C4.60202@zoltak.com> <4A75A950.6030701@sci.fi> <4A760126.9070002@lerdorf.com> <4A76199F.9040701@sci.fi> <20090803145207.l09o05kib4ow8448@webmail.zoltak.com> <4A76993F.5000401@sci.fi> <20090803215255.0vh3a3gif4wk8o0w@webmail.zoltak.com> <4A76D3DB.4040106@sci.fi> <20090803221910.mmhi8jy20o48gc00@webmail.zoltak.com> <4A76D997.5090008@sci.fi> <20090804121441.wuq024oznoc88c4o@webmail.zoltak.com> <374A7AD0-D3BE-4FAE-BBBF-9B08D3A613E5@macvicar.net> <20090804134933.vf99eu7e8so8gg4w@webmail.zoltak.com> <20090804141646.7fqv1kq2o0k00w8c@webmail.zoltak.com> <20090804143651.js8pg021ww084kg8@webmail.zoltak.com> <5E1C7604-0E34-40E7-86AA-906D9975BBBD@macvicar.net> <20090804151701.kz6r6iu0gsggow0k@webmail.zoltak.com> <20090805131007.xmx38kxuggs0gs4g@webmail.zoltak.com> In-Reply-To: <20090805131007.xmx38kxuggs0gs4g@webmail.zoltak.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1.6) Subject: Re: [PHP-DEV] fopen_wrappers.c DOCUMENT_ROOT .htaccess error From: daniel@zoltak.com Quoting daniel@zoltak.com: > Quoting daniel@zoltak.com: > >> Quoting Scott MacVicar : >> >> Ideally both should be performed to ensure the error_log path is within >> the open_base. > > In the function OnUpdateErrorLog in main.c is there anyway to obtain > the HTTP_HOST or SERVER_NAME variable or ideally the DOCUMENT_ROOT. I > have tried using getenv() and sapi_getenv() without success. Are there > any other methods? It appears there was a bug in PHP prior to 5.2.7 where PG(open_base_dir) had not been initialised in the OnUpdateErrorLog therefore the php_check_open_basedir() function was never being called if a custom error_log was specified in the .htaccess. So in fact the custom code we had should have never worked when the .htaccess had an error_log defined. I have now reworked our patch to perform some extra validation in our environment so this scenario works. Thanks to everyone that attempted to steer me in the right direction :)