PHP 5.2.3RC1 Released

php.internals

Ilia A.

19 years ago
The first release candidate of PHP 5.2.3 is now available for testing and can be downloaded here: http://downloads.php.net/ilia/php-5.2.3RC1.tar.bz2 (md5sum: 343785b0558f5696c14607d62f084d4c) The release comes a bit sooner then anticipated as it is needed to address a regression introduced by 5.2.2 in relation to RAW_HTTP_POST_DATA handling. I'd like to keep the release cycle as short as possible so we can get this version out ASAP. I'd like to ask everyone to try this release against their code and/or test suits and report any new problems if there are any. If there are no new issues I will move to the final release within 1 week. I'd also like to ask all developers to refrain from making major commits or non-bug-fix commits for the next week to the 5.2 branch. Ilia Alshanetsky 5.2 Release Master

Edin Kadribasic

19 years ago
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The windows build: http://downloads.php.net/edink/php-5.2.3RC1-Win32.zip http://downloads.php.net/edink/php-5.2.3RC1-win32-installer.msi http://downloads.php.net/edink/pecl-5.2.3RC1-Win32.zip http://downloads.php.net/edink/php-debug-pack-5.2.3RC1-Win32.zip Edin Ilia Alshanetsky wrote:
> The first release candidate of PHP 5.2.3 is now available for testing > and can be downloaded here: > > http://downloads.php.net/ilia/php-5.2.3RC1.tar.bz2 (md5sum: > 343785b0558f5696c14607d62f084d4c) > > The release comes a bit sooner then anticipated as it is needed to > address a regression introduced by 5.2.2 in relation to > RAW_HTTP_POST_DATA handling. I'd like to keep the release cycle as short > as possible so we can get this version out ASAP. I'd like to ask > everyone to try this release against their code and/or test suits and > report any new problems if there are any. If there are no new issues I > will move to the final release within 1 week. > > I'd also like to ask all developers to refrain from making major commits > or non-bug-fix commits for the next week to the 5.2 branch. > > > Ilia Alshanetsky > 5.2 Release Master >
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGVlpqoL7jghV9D6gRAoCHAJwPksgLMNoZEVtA0cW83dwlGxz02ACfWXoy gNx/e+kwTVrwh0xbVxR8AwM= =F043 -----END PGP SIGNATURE-----

Uwe Schindler

19 years ago
I tried PHP 5.2.3RC1 today and the SunONE webserver using the NSAPI plugin crashed in module startups with a segfault. This happens because rasmus changed tsrm_virtual_cwd.c to use get_request_time instead of time() (see changelog of that file). During module startup the extension browscap tries to open the browscap.ini file and uses the TSRM functions to do that (because TSRM is used in NSAPI). At module startup there is unfortunately no request running so the call to the SAPI routine sapi_nsapi_get_request_time() core dumps because of a missing server_context. I think that should be fixed because it affects all multithreaded webserver SAPIs that supply a get_request_time-function. Here the core dump: #0 0xfc939712 in sapi_nsapi_get_request_time (tsrm_ls=0x0) at /pangaea/install/php-5.2.3RC1/sapi/nsapi/nsapi.c:721 721 return REQ_TIME( ((nsapi_request_context *)SG(server_context))->rq ); (gdb) where #0 0xfc939712 in sapi_nsapi_get_request_time (tsrm_ls=0x0) at /pangaea/install/php-5.2.3RC1/sapi/nsapi/nsapi.c:721 #1 0xfc8782b2 in sapi_get_request_time (tsrm_ls=0x86bd388) at /pangaea/install/php-5.2.3RC1/main/SAPI.c:990 #2 0xfc86ceb2 in virtual_file_ex (state=0x80476f8, path=0x827d7f0 "/pangaea/webserver70/browscap.ini", verify_path=0, use_realpath=1) at /pangaea/install/php-5.2.3RC1/TSRM/tsrm_virtual_cwd.c:522 #3 0xfc86d1b6 in virtual_fopen (path=0x827d7f0 "/pangaea/webserver70/browscap.ini", mode=0xfcb4370c "r", tsrm_ls=0x86bd388) at /pangaea/install/php-5.2.3RC1/TSRM/tsrm_virtual_cwd.c:819 #4 0xfc7edaad in zm_startup_browscap (type=1, module_number=12, tsrm_ls=0x86bd388) at /pangaea/install/php-5.2.3RC1/ext/standard/browscap.c:165 #5 0xfc7e69a2 in zm_startup_basic (type=1, module_number=12, tsrm_ls=0x86bd388) at /pangaea/install/php-5.2.3RC1/ext/standard/basic_functions.c:4026 #6 0xfc8b7bc6 in zend_startup_module_ex (module=0x8722618, tsrm_ls=0x86bd388) at /pangaea/install/php-5.2.3RC1/Zend/zend_API.c:1464 #7 0xfc8bece0 in zend_hash_apply (ht=0xfcbc5fe0, apply_func=0xfc8b7b30 <zend_startup_module_ex>, tsrm_ls=0x86bd388) at /pangaea/install/php-5.2.3RC1/Zend/zend_hash.c:673 #8 0xfc8b7df4 in zend_startup_modules (tsrm_ls=0x86bd388) at /pangaea/install/php-5.2.3RC1/Zend/zend_API.c:1511 #9 0xfc870804 in php_module_startup (sf=0xfcbb2120, additional_modules=0xfcbb2020, num_additional_modules=1) at /pangaea/install/php-5.2.3RC1/main/main.c:1621 #10 0xfc93973f in php_nsapi_startup (sapi_module=0xfcbb2120) at /pangaea/install/php-5.2.3RC1/sapi/nsapi/nsapi.c:726 #11 0xfc939866 in php5_init (pb=0x8098290, sn=0x0, rq=0x0) at /pangaea/install/php-5.2.3RC1/sapi/nsapi/nsapi.c:859 #12 0xfecde67a in func_exec_str () from /pangaea/webserver70/lib/libns-httpd40.so #13 0xfecde8e6 in INTfunc_exec () from /pangaea/webserver70/lib/libns-httpd40.so #14 0xfecdc45f in __1cSrun_init_functions6Fi_nIPRStatus__ () from /pangaea/webserver70/lib/libns-httpd40.so #15 0xfecdc598 in __1cbCconf_run_late_init_functions6FpnNConfiguration__nIPRStatus__ () from /pangaea/webserver70/lib/libns-httpd40.so #16 0xfed5f237 in __1cJWebServerDRun6F_nIPRStatus__ () from /pangaea/webserver70/lib/libns-httpd40.so #17 0x08050b18 in main () ----- Uwe Schindler thetaphi@php.net - http://www.php.net NSAPI SAPI developer Bremen, Germany

Rasmus Lerdorf

19 years ago
Uwe Schindler wrote:
> I tried PHP 5.2.3RC1 today and the SunONE webserver using the NSAPI plugin > crashed in module startups with a segfault. > > This happens because rasmus changed tsrm_virtual_cwd.c to use > get_request_time instead of time() (see changelog of that file). During > module startup the extension browscap tries to open the browscap.ini file > and uses the TSRM functions to do that (because TSRM is used in NSAPI). At > module startup there is unfortunately no request running so the call to the > SAPI routine sapi_nsapi_get_request_time() core dumps because of a missing > server_context. > > I think that should be fixed because it affects all multithreaded webserver > SAPIs that supply a get_request_time-function.
Could you try the attached patch please. -Rasmus

Rasmus Lerdorf

19 years ago
Rasmus Lerdorf wrote:
> Uwe Schindler wrote: >> I tried PHP 5.2.3RC1 today and the SunONE webserver using the NSAPI plugin >> crashed in module startups with a segfault. >> >> This happens because rasmus changed tsrm_virtual_cwd.c to use >> get_request_time instead of time() (see changelog of that file). During >> module startup the extension browscap tries to open the browscap.ini file >> and uses the TSRM functions to do that (because TSRM is used in NSAPI). At >> module startup there is unfortunately no request running so the call to the >> SAPI routine sapi_nsapi_get_request_time() core dumps because of a missing >> server_context. >> >> I think that should be fixed because it affects all multithreaded webserver >> SAPIs that supply a get_request_time-function. > > Could you try the attached patch please.
It should be a time(0) call there in the ternary, of course. Fixed patch attached. -Rasmus

Uwe Schindler

19 years ago
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 ----- Uwe Schindler thetaphi@php.net - http://www.php.net NSAPI SAPI developer Bremen, Germany

Rasmus Lerdorf

19 years ago
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. -Rasmus

Rasmus Lerdorf

19 years ago
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. -Rasmus

Uwe Schindler

19 years ago
> 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).

Rasmus Lerdorf

19 years ago
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