ID: 22213 Updated by: [EMAIL PROTECTED] Reported By: alan at pair dot com -Status: Open +Status: Feedback Bug Type: cURL related Operating System: FreeBSD 4.6-STABLE PHP Version: 4CVS-2003-02-13 (stable) New Comment:
Could you try this: 1. rm -rf ext/openssl 2. ./cvsclean && ./buildconf (hopefully you have the right tools to rebuild the configure :) 3. do the normal installation of PHP as static apache module Previous Comments: ------------------------------------------------------------------------ [2003-07-24 13:59:31] php at dpk dot net I'm using static modules here. The setup worked fine on one server, but not on the other. The primary difference - the borken one did the 'ClearModuleList' and then 'AddModule' for every module, while the other did not. Getting rid of the ClearModuleList and AddModule directives fixed it. I suspect it was a problem in the order in which the modules were loaded. ------------------------------------------------------------------------ [2003-02-18 13:10:13] alan at pair dot com Building apache with mod_so, SHARED_CORE=yes, and mod_ssl as a SharedModule prevents this bug from showing its head. However, we're still interested in getting this working in the statically compiled version, so if you can reproduce it in that environment, we'd appreciate any insight on what's causing it there. Thanks! Alan ------------------------------------------------------------------------ [2003-02-18 12:43:06] alan at pair dot com It looks like both mod_php and mod_ssl are being compiled in statically, along with a static core. I'm going to try doing this DSO and see if it helps; but that may not be an option for us depending on why things were compiled statically in the first place. Thanks. ------------------------------------------------------------------------ [2003-02-18 12:02:32] [EMAIL PROTECTED] Is mod_ssl compiled as DSO? Or static module? I have both PHP and mod_ssl as DSOs and I can not reproduce this.. ------------------------------------------------------------------------ [2003-02-18 08:54:05] alan at pair dot com Here's a stack dump when it segfaults: Program received signal SIGSEGV, Segmentation fault. 0x81df50c in SSL_CTX_ctrl () (gdb) bt #0 0x81df50c in SSL_CTX_ctrl () #1 0x81793f4 in ssl_init_Module (s=0x830b038, p=0x830b010) #2 0x8179741 in ssl_init_Module (s=0x830b038, p=0x830b010) at ssl_engine_init.c:304 #3 0x8195dd0 in ap_init_modules (p=0x830b010, s=0x830b038) at http_config.c:1703 #4 0x81a059e in standalone_main (argc=5, argv=0xbfbffa54) at http_main.c:5172 #5 0x81a0ec0 in main (argc=5, argv=0xbfbffa54) at http_main.c:5566 #6 0x807f72d in _start () (gdb) However, as I mentioned before, that's not completely accurate. Stepping through the code, here's a bit more detail as to where it's crashing: (gdb)n 585 ctx = SSL_CTX_new(SSLv23_server_method()); /* be more flexible */ (gdb) bt #0 ssl_init_ConfigureServer (s=0x830b038, p=0x830b010, sc=0x830b3e0) at ssl_engine_init.c:585 #1 0x8179741 in ssl_init_Module (s=0x830b038, p=0x830b010) at ssl_engine_init.c:304 #2 0x8195dd0 in ap_init_modules (p=0x830b010, s=0x830b038) at http_config.c:1703 #3 0x81a059e in standalone_main (argc=5, argv=0xbfbffa54) at http_main.c:5172 #4 0x81a0ec0 in main (argc=5, argv=0xbfbffa54) at http_main.c:5566 #5 0x807f72d in _start () (gdb) n 586 SSL_CTX_set_options(ctx, SSL_OP_ALL); (gdb) Program received signal SIGSEGV, Segmentation fault. 0x81df50c in SSL_CTX_ctrl () (gdb) bt #0 0x81df50c in SSL_CTX_ctrl () #1 0x81793f4 in ssl_init_Module (s=0x830b038, p=0x830b010) #2 0x8179741 in ssl_init_Module (s=0x830b038, p=0x830b010) at ssl_engine_init.c:304 #3 0x8195dd0 in ap_init_modules (p=0x830b010, s=0x830b038) at http_config.c:1703 #4 0x81a059e in standalone_main (argc=5, argv=0xbfbffa54) at http_main.c:5172 #5 0x81a0ec0 in main (argc=5, argv=0xbfbffa54) at http_main.c:5566 #6 0x807f72d in _start () (gdb) This particular version is compiled with PHP 4.3.0, Apache 1.3.27, mod_ssl 2.8.12, and curl 7.10.3. But I've been able to reproduce it with different versions of curl and PHP. If I run the same compiled executable without SSL turned on, it does not segfault when it receives HUP. If I compile curl --without-ssl, and compile php against this version of curl, apache does not segfault when it receives SIGHUP even when modssl is turned on. If I compile PHP without curl, apache does not segfault when it receives SIGHUP. I don't know that it's curl's fault. I just know that the problem goes away when PHP isn't using curl, or when curl isn't using SSL. Thanks, Alan ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/22213 -- Edit this bug report at http://bugs.php.net/?id=22213&edit=1