Re: PHP 5.2.3RC1 Released
| From: | Rasmus Lerdorf | Date: | Fri, 25 May 2007 09:00:47 +0000 |
| Subject: | Re: PHP 5.2.3RC1 Released | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-29745@lists.php.net to get a copy of this message | ||
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