Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:1665 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59301 invoked from network); 18 May 2003 13:45:21 -0000 Received: from unknown (HELO mailout04.sul.t-online.com) (194.25.134.18) by pb1.pair.com with SMTP; 18 May 2003 13:45:21 -0000 Received: from fwd01.sul.t-online.de by mailout04.sul.t-online.com with smtp id 19HOTS-0007qS-04; Sun, 18 May 2003 15:45:14 +0200 Received: from vega.thetaphi.de (320003461825-0001@[80.132.114.205]) by fmrl01.sul.t-online.com with esmtp id 19HOTF-0Kb17oC; Sun, 18 May 2003 15:45:01 +0200 Message-ID: <5.2.0.9.0.20030518154139.0290ab10@pop3.web.de> X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Sun, 18 May 2003 15:45:00 +0200 To: zeev@zend.com Cc: internals@lists.php.net In-Reply-To: <5.1.0.14.2.20030518163923.0489c750@localhost> References: <5.2.0.9.0.20030518152936.0290aff8@pop3.web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Sender: 320003461825-0001@t-dialin.net Subject: Re: [PHP-DEV] zend_alter_ini_entry threadsave if used in SAPI modules? From: uwe@thetaphi.de (Uwe Schindler) Look here: /* * Deactivated for now. The ini system will cause random crashes when * accessed from here (since there are no locks to protect the global * known_directives) */ My question was if the modifications to the ini values are valid only for one thread, so if the webserver runs two requests in two threads at the same time with different ini settings if they can see the modification of the other one... At 16:40 18.05.2003 +0300, Zeev Suraski wrote: >At 16:36 18/05/2003, Uwe Schindler wrote: >>I am writing on an extension of the NSAPI SAPI module (see bug #8879) so >>that you can specify some overrides for php.ini entries at execution of a >>script from the webserver (like you can do it in apache). >> >>I want to set the variables with >> zend_alter_ini_entry(..., PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME); >>but this call have no reference to TSRM. >> >>Can I use it or is it not thread save? e.g. if two requests to the >>webserver on two virtual servers run at the same time and each thread >>overwrites the doc_root property in php.ini can they coexist. Are >>PHP_INI_STAGE_RUNTIME settings only valid for one thread? >> >>Looking at aolserver SAPI, the ini feature is commented out there because >>of thread safety... > >It should be thread safe. Are you sure that the comment in aolserver.c is >due to thread safety? > >Zeev > > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php