Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31417 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43991 invoked by uid 1010); 3 Aug 2007 12:04:33 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 43976 invoked from network); 3 Aug 2007 12:04:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Aug 2007 12:04:33 -0000 Authentication-Results: pb1.pair.com header.from=thetaphi@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=thetaphi@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 80.190.230.99 as permitted sender) X-PHP-List-Original-Sender: thetaphi@php.net X-Host-Fingerprint: 80.190.230.99 www.troja.net Linux 2.5 (sometimes 2.4) (4) Received: from [80.190.230.99] ([80.190.230.99:54908] helo=mail.troja.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CD/A0-32246-0D913B64 for ; Fri, 03 Aug 2007 08:04:33 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.troja.net (Postfix) with ESMTP id 1301D2E592; Fri, 3 Aug 2007 14:04:30 +0200 (CEST) Received: from mail.troja.net ([127.0.0.1]) by localhost (cyca.troja.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02643-09; Fri, 3 Aug 2007 14:04:24 +0200 (CEST) Received: from VEGA (unknown [134.102.249.76]) (using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.troja.net (Postfix) with ESMTP id E44E62E58E; Fri, 3 Aug 2007 14:04:18 +0200 (CEST) To: "'Antony Dovgal'" , "'Uwe Schindler'" Cc: "'Ilia Alshanetsky'" , "'PHP Internals'" References: <87E4F8AF-06DE-4FCC-AD1B-83E932A5E180@prohost.org> <000201c7d598$14f53cf0$0201a8c0@VEGA> <46B2E92A.40303@zend.com> <000001c7d5ae$1534b4f0$4cf96686@VEGA> <46B2F4D0.4070003@zend.com> <000101c7d5b6$233cf4b0$4cf96686@VEGA> <46B302AF.2060007@zend.com> <000001c7d5bb$d01eab60$4cf96686@VEGA> <46B309E5.10401@zend.com> Date: Fri, 3 Aug 2007 14:04:23 +0200 Message-ID: <000401c7d5c6$71b22650$4cf96686@VEGA> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 In-Reply-To: <46B309E5.10401@zend.com> Thread-Index: AcfVvP7f+O8AXPOkRzunQgL2XinjDAAB7iAg X-Virus-Scanned: amavisd-new at troja.net Subject: RE: [PHP-DEV] 5.2.4RC1 Released From: thetaphi@php.net ("Uwe Schindler") > On 03.08.2007 14:48, Uwe Schindler wrote: > >> How EXACTLY does the web-server put the value? > >> To me it looks like you're using some global config file, so no wonder > >> it's put globally. > > > > It is not global. The overwritten value is set only for a specific path > (you > > can be sure that I know how Sun Webserver works, I maintain the NSAPI > > module... :-) ). > > > > The changed value then corrupts the ini entry complete. I found out why > this > > is so, so this is a _bug_. > > > > The following patch, when reverted fixes it and restores the old > behaviour: > > > > > http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini.c?r1=1.39.2.2.2.8&r2=1. > 39 > > .2.2.2.9&pathrev=PHP_5_2 > > It's done to prevent overwriting settings set in httpd.conf (aka > php_admin_value's). I know how this is meant. But without the added patch, it does not corrupt error_reporting. The problem is that your patch is not compatible to a webserver that runs more than one request per process (a multithreaded one), because it modifies the ini setting in a way that affects later running threads. I try to find a way to reproduce it in other webservers. This is the code that NSAPI uses to modify the INI entries: entry->param->name is the nullterminated ini key name, entry->param->value is the nullteminated value. This code runs on every request (like in apache a php_(admin)_value) that needs to set some specific ini-values. The server runs only *one* process that handles all requests in its lifetime because it is multithreaded: if (zend_alter_ini_entry(entry->param->name, strlen(entry->param->name)+1, entry->param->value, strlen(entry->param->value), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE)==FAILURE) { log_error(LOG_WARN, pblock_findval("fn", NSG(pb)), NSG(sn), NSG(rq), "Cannot change php.ini key \"%s\" to \"%s\"", entry->param->name, entry->param->value); } . It is always runned with admin "privileges" because SJSWS does not have htaccess files. The big advantage to have the possibility to set ini values is, that it is not server-wide you can change the call to PHP SAPI e.g. per virtual server or URI path (see documentation of NSAPI). Uwe