Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29745 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12301 invoked by uid 1010); 25 May 2007 09:01:19 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 12286 invoked from network); 25 May 2007 09:01:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2007 09:01:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 204.11.219.139 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 204.11.219.139 mail.lerdorf.com Received: from [204.11.219.139] ([204.11.219.139:46573] helo=mail.lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/64-11471-DD5A6564 for ; Fri, 25 May 2007 05:01:18 -0400 Received: from trainburn-lm-corp-yahoo-com.local (c-24-6-22-164.hsd1.ca.comcast.net [24.6.22.164]) (authenticated bits=0) by mail.lerdorf.com (8.14.1/8.14.1/Debian-4) with ESMTP id l4P90l6h019859 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 25 May 2007 02:00:47 -0700 Message-ID: <4656A5BF.4020107@lerdorf.com> Date: Fri, 25 May 2007 02:00:47 -0700 User-Agent: Thunderbird 2.0.0.0 (Macintosh/20070326) MIME-Version: 1.0 To: Uwe Schindler CC: "'php-dev List'" References: <509DFE15-F28E-4869-A124-58E6226205A4@prohost.org> <46565A6A.8060504@krug.dk> <000001c79e9f$16441de0$0201a8c0@VEGA> <46569490.3090608@lerdorf.com> <46569577.3000801@lerdorf.com> <000001c79ea3$76c70200$0201a8c0@VEGA> <46569BD3.10306@lerdorf.com> <46569EEE.3040700@lerdorf.com> <000001c79ea8$c9e87ea0$4cf96686@VEGA> In-Reply-To: <000001c79ea8$c9e87ea0$4cf96686@VEGA> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.90.2/3299/Thu May 24 23:41:48 2007 on colo.lerdorf.com X-Virus-Status: Clean Subject: Re: [PHP-DEV] PHP 5.2.3RC1 Released From: rasmus@lerdorf.com (Rasmus Lerdorf) Uwe Schindler wrote: >> Rasmus Lerdorf wrote: >>> Uwe Schindler wrote: >>>> Does not link: >>>> >>>> Undefined first referenced >>>> symbol in file >>>> php_during_module_startup main/.libs/SAPI.o >>>> php_during_module_shutdown main/.libs/SAPI.o >>>> ld: fatal: Symbol referencing errors. No output written to sapi/cli/php >>>> collect2: ld returned 1 exit status >>>> gmake: *** [sapi/cli/php] Error 1 >>> gah! Who the heck added access functions for the static module globals >>> in main.c that are static themselves? That makes no sense. >>> >>> static int module_startup = 1; >>> static int module_shutdown = 0; >>> ... >>> static int php_during_module_startup() >>> static int php_during_module_shutdown() >>> >>> I had just assumed they were PHP_API functions. >> Ok, a better approach checking SG(server_context) instead attached. Try >> that. > > Works now. No more SEGFAULT. This solution is not the best one, but this was > my first idea to fix this, too. It should fix it in other SAPIs, too. Apache > for example also uses SG(server_context). All the sapis define server_context during a request, so I think this solution is ok. Some of the sapis don't use it for anything, but if you look at those like caudium and roxen you will see they do: SG(server_context) = (void *)1; /* avoid server_context == NULL */ In the request startup code. Other parts of PHP rely on server_context being there. -Rasmus