Menu

#7 Slash breaks if mod_perl and mod_php are both enabled.

closed-fixed
Other (492)
1
2000-06-13
2000-04-12
Chad Day
No

Scenario:

FreeBSD 3.4, perl 5.005_03.

Apache 1.3.12, mod perl 1.22, php 4.0 RC1 all compiled from source.

After a successful compilation and launch of apache with the slash configuration, slash will no longer run. Going to the main page will come up with various things depending on browser (in IE, page can't be displayed; in lynx, unexpected network read error)..

Apache's error_log (not slash's error_log) reports:

[Wed Apr 12 19:29:24 2000] [notice] child pid 5678 exit signal Segmentation fault (11)

for each page access.

Slash runs fine on my box if I have apache compiled without php.

I've confirmed php is being parsed correctly, via this URL: http://www.frungy.com/~cday/index.php

Confirmed mod_perl is working correctly, via this test module:

http://www.frungy.com/env

If any developers need access to my box to research the problem, I will gladly provide it. I really would like to be able to run both slash and php on my system.

Discussion

  • Clifton Wood

    Clifton Wood - 2000-05-02

    I'll take a look into this sometime this week. However, I do not have a FreeBSD install here (yet), and will be doing this under Linux. If I can get it working, it will give us at least some idea as to where the problem is.

     
  • Clifton Wood

    Clifton Wood - 2000-05-03

    The problem is confirmed. I compiled PHP4 into one of my working Apache setups for Slash. Once I enabled the PHP4 module none of the scripts worked. I have submitted a bug report to the PHP developers. We'll see how it turns out.

     
  • Clifton Wood

    Clifton Wood - 2000-05-04

    There are a lot of things that seem to conflict inside Apache if both PHP4 and mod_perl are compiled in. First, if PHP is compiled with --with-mysql, the following will occur (under Linux) on ANY request from that httpd:

    --- SIGSEGV (Segmentation fault) ---
    +++ killed by SIGSEGV +++

    #0 0x401fe872 in mysql_real_connect (mysql=0x0, host=0x8766210 "localhost", user=0x87660d8 "slash",
    passwd=0x87660e8 "change", db=0x8598a00 "slash", port=0, unix_socket=0x0, client_flag=0) at libmysql.c:1125
    #1 0x40391a24 in mysql_dr_connect () from /usr/local/lib/perl5/site_perl/5.6.0/i686-linux/auto/DBD/mysql/mysql.so
    #2 0x40391d90 in _MyLogin () from /usr/local/lib/perl5/site_perl/5.6.0/i686-linux/auto/DBD/mysql/mysql.so
    #3 0x40391e03 in mysql_db_login () from /usr/local/lib/perl5/site_perl/5.6.0/i686-linux/auto/DBD/mysql/mysql.so
    #4 0x40395ab4 in XS_DBD__mysql__db__login ()
    from /usr/local/lib/perl5/site_perl/5.6.0/i686-linux/auto/DBD/mysql/mysql.so
    #5 0x81111fc in Perl_pp_entersub ()
    #6 0x810bf80 in Perl_runops_standard ()
    #7 0x80d143a in S_call_body ()
    #8 0x80d0ffe in Perl_call_sv ()
    #9 0x403532fa in XS_DBI_dispatch () from /usr/local/lib/perl5/site_perl/5.6.0/i686-linux/auto/DBI/DBI.so
    #10 0x81111fc in Perl_pp_entersub ()
    #11 0x810bf80 in Perl_runops_standard ()
    #12 0x80d143a in S_call_body ()
    #13 0x80d1206 in Perl_call_sv ()
    #14 0x807e710 in perl_call_handler (sv=0x8304114, r=0x85883ac, args=0x0) at mod_perl.c:1621
    #15 0x807e02c in perl_run_stacked_handlers (hook=0x81541d9 "PerlHandler", r=0x85883ac, handlers=0x82cca48)
    at mod_perl.c:1341
    #16 0x807cc24 in perl_handler (r=0x85883ac) at mod_perl.c:893
    #17 0x80976f4 in ap_invoke_handler (r=0x85883ac) at http_config.c:508
    #18 0x80a5d0c in process_request_internal (r=0x85883ac) at http_request.c:1215
    #19 0x80a5d68 in ap_process_request (r=0x85883ac) at http_request.c:1231
    #20 0x809fb29 in child_main (child_num_arg=0) at http_main.c:4177
    #21 0x809fc9c in make_child (s=0x818c204, slot=0, now=957417976) at http_main.c:4281
    #22 0x809fdb9 in startup_children (number_to_start=5) at http_main.c:4363
    #23 0x80a026b in standalone_main (argc=4, argv=0xbffffd54) at http_main.c:4651
    #24 0x80a091a in main (argc=4, argv=0xbffffd54) at http_main.c:4978

    Don't know if there is a fix for this problem, but there is more. I need to get the backtrace on that one next.

     
  • Clifton Wood

    Clifton Wood - 2000-05-04

    With PHP4 compiled without "--with-mysql" we still fail on EVERY request, except at a different point in the code:

    Program received signal SIGSEGV, Segmentation fault.
    0x401eadd1 in php_xbithack_handler (r=0x857d24c) at mod_php4.c:636
    636 conf = (php_apache_info_struct *) get_module_config(r->per_dir_config, &php4_module);

    #0 0x401eadd1 in php_xbithack_handler (r=0x857d24c) at mod_php4.c:636
    #1 0x8097614 in ap_invoke_handler (r=0x857d24c) at http_config.c:511
    #2 0x80a5c2c in process_request_internal (r=0x857d24c) at http_request.c:1215
    #3 0x80a5f01 in ap_internal_redirect (new_uri=0x857d224 "/index.html", r=0x857c5a4) at http_request.c:1339
    #4 0x8070f5c in handle_dir (r=0x857c5a4) at mod_dir.c:173
    #5 0x8097614 in ap_invoke_handler (r=0x857c5a4) at http_config.c:511
    #6 0x80a5c2c in process_request_internal (r=0x857c5a4) at http_request.c:1215
    #7 0x80a5c88 in ap_process_request (r=0x857c5a4) at http_request.c:1231
    #8 0x809fa49 in child_main (child_num_arg=0) at http_main.c:4177
    #9 0x809fbbc in make_child (s=0x81803e4, slot=0, now=957453448) at http_main.c:4281
    #10 0x809fcd9 in startup_children (number_to_start=5) at http_main.c:4363
    #11 0x80a018b in standalone_main (argc=4, argv=0xbffffd34) at http_main.c:4651
    #12 0x80a083a in main (argc=4, argv=0xbffffd34) at http_main.c:4978

    And these all occur only when PHP4 is enabled. I guess the next step would be to compile without mod_perl and see if PHP4 works properly by itself, but I have to drop this for a bit and work on other things. I'll submit both of these reports to PHP.net, however.

     
  • Clifton Wood

    Clifton Wood - 2000-05-05
    • status: Error - status not found --> open
     
  • Nobody/Anonymous

    I just compiled with the latest PHP3, Apache, and mod_perl and it seems to be working ok.

     
  • Clifton Wood

    Clifton Wood - 2000-05-11

    Yes, PHP3 works fine, but the problem is with the latest release candidates of PHP4. The problem has already been sent to the PHP developers so I will close this entry.

     
  • Clifton Wood

    Clifton Wood - 2000-05-11
    • assigned_to: nobody --> cbwood
    • status: open --> closed
     
  • Clifton Wood

    Clifton Wood - 2000-06-13
    • priority: 5 --> 1
    • status: closed --> closed-fixed
     
  • Clifton Wood

    Clifton Wood - 2000-06-13

    Just as a followup, Slash DOES now work with the latest php4 debs. I've had a discussion with Bill Adams <badams@tqs.com>
    on the best way to do this from source, he writes:

    "Well, I finally figured out why Apache kept dumping core. Basically it came down to there being bad MySQL source in the PHP source tar-ball. When you configure PHP like:

    ../configure --with-mysql --with-apxs

    PHP uses the ./ext/mysql directory to build and link libmysql. What you have to do is run configure like:

    ../configure --with-mysql=/usr

    if you configured mysql with the default --prefix
    or:

    ../configure --with-mysql=/path/to/mysql

    if you did a custom mysql directory."

    Hope this fixes the problem.

     

Log in to post a comment.