ID:               22273
 User updated by:  germano60 at yahoo dot it
 Reported By:      germano60 at yahoo dot it
-Status:           Feedback
+Status:           Open
 Bug Type:         Apache2 related
 Operating System: HP-UX 11.00
 PHP Version:      4.3.0
 New Comment:

I confirm you that:
- httpd.conf is working fine without the directive 
LoadModule php4_module etc.
- Apache2 has always be set to work with
User www
Group other
(with Group nobody, in HP-UX11 Apache simply does not work)

Thanks for the "bt full" hint, yesterday it was the firs time I used
gdb, so please forgive my newbie behaviour :)

I tried again with httpd -X, putting some breakpoints around the
critical points, i.e.:
- when the load_module() method is invoked to check the input values
- when the apr_dso_load() method is invoked to check the input values
- after the apr_dso_load() method is finished and the apr_pstrcat()
method is invoked to generate the output string, to check the return
conditions

The source code is available in Apache2 distribution inside  
modules/mappers/mod_so.c

Here is what "bt full" returned after each step (sorry, once again it's
long):

Code section under test
 /usr/local/httpd-2.0.44/modules/mappers/mod_so.c
 function load_module()

(gdb) break mod_so.c:213
Breakpoint 2 at 0x5f908: file mod_so.c, line 213.
// BREAK on invoke of load_module

(gdb) break mod_so.c:282
Breakpoint 3 at 0x5f9ec: file mod_so.c, line 282.
// BREAK on invoke check for errors in loading the module

(gdb) break mod_so.c:285
Breakpoint 4 at 0x5fa10: file mod_so.c, line 285.
// BREAK on invoke generation of the error string for display

(gdb) enable
(gdb) run -X
Starting program: /usr/local/apache2/bin/httpd -X

Breakpoint 2, load_module (cmd=0x7f7f1340, dummy=0x7f7f3640, \
                    modname=0x40069010 "php4_module", \
                    filename=0x40069020 "modules/libphp4.so") at mod_so.c:213
213         *(ap_directive_t **)dummy = NULL;
(gdb) bt full
#0  load_module (cmd=0x7f7f1340, dummy=0x7f7f3640, \
                  modname=0x40069010 "php4_module", \
                  filename=0x40069020 "modules/libphp4.so") at mod_so.c:213
        modhandle = (apr_dso_handle_t *) 0x6c08000
        modsym = 0x7f7f3584
        modp = (module *) 0x7f7f3640
        szModuleFile = 0x7f7f3580 "@\006\217\220"
        sconf = (so_server_conf *) 0x7f7f3640
        modi = (moduleinfo *) 0x40069020
        modie = (moduleinfo *) 0x40069038
        i = 1074171936
        modhandle = (apr_dso_handle_t *) 0x6c08000
        modsym = 0x7f7f3584
#1  0x00064c5c in invoke_cmd (cmd=0x40008cd4, parms=0x7f7f1340, \
                              mconfig=0x7f7f3640, args=0x7f7f15b0 "")
at config.c:739
        w = 0x40069010 "php4_module"
        w2 = 0x40069020 "modules/libphp4.so"
        w3 = 0x40069038 "/usr/local/apache2/modules/libphp4.so"
        errmsg = 0x40069038 "/usr/local/apache2/modules/libphp4.so"
#2  0x00066348 in execute_now (cmd_line=0x40068fb8 "LoadModule", \
                    args=0x7f7f158b "php4_module       
modules/libphp4.so", \
                    parms=0x7f7f1340, p=0x0, 
    ptemp=0x40063480, sub_tree=0x7f7f3640, parent=0x0) at
config.c:1351
        mod = (module *) 0x40008d1c
        cmd = (const command_rec *) 0x40069038
        mod = (module *) 0x40008d1c
#3  0x00065684 in zif_mysql_select_db () at config.c:942
        sub_tree = (ap_directive_t *) 0x0
        current = (ap_directive_t **) 0x7f7f3580
        curr_parent = (ap_directive_t **) 0x7f7f3584
        conftree = (ap_directive_t **) 0x400098cc
        retval = 0x40069038 "/usr/local/apache2/modules/libphp4.so"
        args = 0x7f7f158b "php4_module        modules/libphp4.so"
        cmd_name = 0x40068fb8 "LoadModule"
        newdir = (ap_directive_t *) 0x40068fc8
        mod = (module *) 0x40008d1c
        cmd = (const command_rec *) 0x40069038
        args = 0x7f7f158b "php4_module        modules/libphp4.so"
        mod = (module *) 0x40008d1c
#4  0x00065c84 in zif_mysql_get_proto_info () at config.c:1149
        current = (ap_directive_t *) 0x40068f90
        curr_parent = (ap_directive_t *) 0x0
        l = "LoadModule php4_module       
modules/libphp4.so\0\0/libphp4.so\0\0ot need\0\0ed.\0\0u", 
        '\0' <repeats 15 times>, 
        
"ríS@\006hÅ\0\0\0\b\0\0\0\0\0\0\0\0@\0064\200@\0\230ä\177\177\023@@\006h´@\0\020\0\177LS8@\0Û\004@\0Û\b@\0\020\0@\0Û\030\0\006Õ_\177MÆ[\0\0
\b@\0Û\b@\0Û\020@\0Û\030@\0\020\0@\0\230à@\0Û(@\002\222¯\177j[´\177j\022,\0\002\0\0\177"...

        errmsg = 0x1 <Error reading address 0x1: Invalid argument>
        current = (ap_directive_t *) 0x40068f90
        curr_parent = (ap_directive_t *) 0x0
        l = "LoadModule php4_module       
modules/libphp4.so\0\0/libphp4.so\0\0ot need\0\0ed.\0\0u", '\0'
<repeats 15 times>,
"ríS@\006hÅ\0\0\0\b\0\0\0\0\0\0\0\0@\0064\200@\0\230ä\177\177\023@@\006h´@\0\020\0\177LS8@\0Û\004@\0Û\b@\0\020\0@\0Û\030\0\006Õ_\177MÆ[\0\0
\b@\0Û\b@\0Û\020@\0Û\030@\0\020\0@\0\230à@\0Û(@\002\222¯\177j[´\177j\022,\0\002\0\0\177"...

#5  0x00066a20 in zif_mysql_create_db () at config.c:1563
        ptemp = (apr_pool_t *) 0x40063480
        parms = {info = 0x0, override = 150, limited = -1,
limited_xmethods = 0x0, xlimited = 0x0, config_file = 0x400684b0,
directive = 0x0, 
  pool = 0x400292b0, temp_pool = 0x40063480, server = 0x4002c060, path
= 0x0, cmd = 0x40008cd4, context = 0x0, err_directive = 0x40068fc8}
        finfo = {pool = 0x4005f498, valid = 0, protection = 2135708472,
filetype = 1073885880, user = 1073745920, group = 1073780940, inode =
417963, 
  device = 2135804307, nlink = 1073910448, size = 1073786376, csize =
1073786384, atime = 4612410254066454528, mtime = 4612018939596189378, 
  ctime = 4611868967928112720, fname = 0x4000ae28 "DEBUG", name =
0x400098c8 "@\005¶Ä@\006\207âheader_parser", filehand = 0x4000ae20}
        errmsg = 0x400668a8 "/usr/local/apache2/conf/httpd.conf"
        cfp = (ap_configfile_t *) 0x400684b0
        ispatt = 0
#6  0x000674e0 in ap_read_config (process=0x4000, ptemp=0x40063480,
filename=0x4000ada4 "conf/httpd.conf", conftree=0x400098cc) at
config.c:1841
        confname = 0x40069038 "/usr/local/apache2/modules/libphp4.so"
        p = (apr_pool_t *) 0x400292b0
        s = (server_rec *) 0x4002c060
#7  0x0006a89c in zif_mysql_fetch_object () at main.c:565
        c = 88 'X'
        configtestonly = 0
        confname = 0x4000ada4 "conf/httpd.conf"
        def_server_root = 0x4000adb4 "/usr/local/apache2"
        temp_error_log = 0x0
        process = (process_rec *) 0x40027320
        server_conf = (server_rec *) 0x4000add4
        pglobal = (apr_pool_t *) 0x400272a0
        pconf = (apr_pool_t *) 0x400292b0
        plog = (apr_pool_t *) 0x40061470
        ptemp = (apr_pool_t *) 0x40063480
        pcommands = (apr_pool_t *) 0x4005f460
        opt = (apr_getopt_t *) 0x4005f4f8
        rv = 1074171960
        mod = (module **) 0x4000add4
        optarg = 0x0
        signal_server = (apr_OFN_ap_signal_server_t *) 0x40069038
<php_gd_char+160640>
        c = 88 'X'
        configtestonly = 0
        def_server_root = 0x4000adb4 "/usr/local/apache2"
        temp_error_log = 0x0
        pglobal = (apr_pool_t *) 0x400272a0
        plog = (apr_pool_t *) 0x40061470
        ptemp = (apr_pool_t *) 0x40063480
        pcommands = (apr_pool_t *) 0x4005f460
        opt = (apr_getopt_t *) 0x4005f4f8
        optarg = 0x0
        c = 88 'X'
        configtestonly = 0
        def_server_root = 0x4000adb4 "/usr/local/apache2"
        temp_error_log = 0x0
        pglobal = (apr_pool_t *) 0x400272a0
        plog = (apr_pool_t *) 0x40061470
        ptemp = (apr_pool_t *) 0x40063480
        pcommands = (apr_pool_t *) 0x4005f460
        opt = (apr_getopt_t *) 0x4005f4f8
        optarg = 0x0
#8  0x7f6efbe4 in _start () from /usr/lib/libc.2
No symbol table info available.
(gdb) continue
Continuing.

Breakpoint 3, load_module (cmd=0x7f7f1340, dummy=0x4,
modname=0x40069010 "php4_module", 
                           filename=0x15 <Error reading address 0x15:
Bad address>) at mod_so.c:282
282         if (apr_dso_load(&modhandle, szModuleFile, cmd->pool) !=
APR_SUCCESS) {
(gdb) bt full
#0  load_module (cmd=0x7f7f1340, dummy=0x4, modname=0x40069010
"php4_module", 
        filename=0x15 <Error reading address 0x15: Bad address>) at
mod_so.c:282
        modhandle = (apr_dso_handle_t *) 0x6c08000
        modsym = 0x7f7f3584
        modp = (module *) 0x4
        szModuleFile = 0x40069038
"/usr/local/apache2/modules/libphp4.so"
        sconf = (so_server_conf *) 0x4002c2b8
        modi = (moduleinfo *) 0x15
        modie = (moduleinfo *) 0x40013c58
        i = 21
        modhandle = (apr_dso_handle_t *) 0x6c08000
        modsym = 0x7f7f3584
#1  0x00064c5c in invoke_cmd (cmd=0x40008cd4, parms=0x7f7f1340,
mconfig=0x7f7f3640, args=0x7f7f15b0 "") at config.c:739
        w = 0x40069010 "php4_module"
        w2 = 0x40069020 "modules/libphp4.so"
        w3 = 0x4002c2d8 ""
        errmsg = 0x4002c2d8 ""
#2  0x00066348 in execute_now (cmd_line=0x40068fb8 "LoadModule", 
    args=0x7f7f158b "php4_module        modules/libphp4.so",
parms=0x7f7f1340, p=0x0, 
    ptemp=0x40063480, sub_tree=0x7f7f3640, parent=0x0) at
config.c:1351
        mod = (module *) 0x40008d1c
        cmd = (const command_rec *) 0x4002c2d8
        mod = (module *) 0x40008d1c
#3  0x00065684 in zif_mysql_select_db () at config.c:942
        sub_tree = (ap_directive_t *) 0x0
        current = (ap_directive_t **) 0x7f7f3580
        curr_parent = (ap_directive_t **) 0x7f7f3584
        conftree = (ap_directive_t **) 0x400098cc
        retval = 0x4002c2d8 ""
        args = 0x7f7f158b "php4_module        modules/libphp4.so"
        cmd_name = 0x40068fb8 "LoadModule"
        newdir = (ap_directive_t *) 0x40068fc8
        mod = (module *) 0x40008d1c
        cmd = (const command_rec *) 0x4002c2d8
        args = 0x7f7f158b "php4_module        modules/libphp4.so"
        mod = (module *) 0x40008d1c
#4  0x00065c84 in zif_mysql_get_proto_info () at config.c:1149
        current = (ap_directive_t *) 0x40068f90
        curr_parent = (ap_directive_t *) 0x0
        l = "LoadModule php4_module       
modules/libphp4.so\0\0/libphp4.so\0\0ot need\0\0ed.\0\0u", '\0'
<repeats 15 times>,
"ríS@\006hÅ\0\0\0\b\0\0\0\0\0\0\0\0@\0064\200@\0\230ä\177\177\023@@\006h´@\0\020\0\177LS8@\0Û\004@\0Û\b@\0\020\0@\0Û\030\0\006Õ_\177MÆ[\0\0
\b@\0Û\b@\0Û\020@\0Û\030@\0\020\0@\0\230à@\0Û(@\002\222¯\177j[´\177j\022,\0\002\0\0\177"...

        errmsg = 0x4 <Error reading address 0x4: Bad address>
        current = (ap_directive_t *) 0x40068f90
        curr_parent = (ap_directive_t *) 0x0
        l = "LoadModule php4_module       
modules/libphp4.so\0\0/libphp4.so\0\0ot need\0\0ed.\0\0u", '\0'
<repeats 15 times>,
"ríS@\006hÅ\0\0\0\b\0\0\0\0\0\0\0\0@\0064\200@\0\230ä\177\177\023@@\006h´@\0\020\0\177LS8@\0Û\004@\0Û\b@\0\020\0@\0Û\030\0\006Õ_\177MÆ[\0\0
\b@\0Û\b@\0Û\020@\0Û\030@\0\020\0@\0\230à@\0Û(@\002\222¯\177j[´\177j\022,\0\002\0\0\177"...

#5  0x00066a20 in zif_mysql_create_db () at config.c:1563
        ptemp = (apr_pool_t *) 0x40063480
        parms = {info = 0x0, override = 150, limited = -1,
limited_xmethods = 0x0, xlimited = 0x0, config_file = 0x400684b0,
directive = 0x0, 
  pool = 0x400292b0, temp_pool = 0x40063480, server = 0x4002c060, path
= 0x0, cmd = 0x40008cd4, context = 0x0, err_directive = 0x40068fc8}
        finfo = {pool = 0x4005f498, valid = 0, protection = 2135708472,
filetype = 1073885880, user = 1073745920, group = 1073780940, inode =
417963, 
  device = 2135804307, nlink = 1073910448, size = 1073786376, csize =
1073786384, atime = 4612410254066454528, mtime = 4612018939596189378, 
  ctime = 4611868967928112720, fname = 0x4000ae28 "DEBUG", name =
0x400098c8 "@\005¶Ä@\006\207âheader_parser", filehand = 0x4000ae20}
        errmsg = 0x400668a8 "/usr/local/apache2/conf/httpd.conf"
        cfp = (ap_configfile_t *) 0x400684b0
        ispatt = 0
#6  0x000674e0 in ap_read_config (process=0x1, ptemp=0x40063480,
filename=0x4000ada4 "conf/httpd.conf", conftree=0x400098cc) at
config.c:1841
        confname = 0x4002c2d8 ""
        p = (apr_pool_t *) 0x400292b0
        s = (server_rec *) 0x4002c060
#7  0x0006a89c in zif_mysql_fetch_object () at main.c:565
        c = 88 'X'
        configtestonly = 0
        confname = 0x4000ada4 "conf/httpd.conf"
        def_server_root = 0x4000adb4 "/usr/local/apache2"
        temp_error_log = 0x0
        process = (process_rec *) 0x40027320
        server_conf = (server_rec *) 0x4000add4
        pglobal = (apr_pool_t *) 0x400272a0
        pconf = (apr_pool_t *) 0x400292b0
        plog = (apr_pool_t *) 0x40061470
        ptemp = (apr_pool_t *) 0x40063480
        pcommands = (apr_pool_t *) 0x4005f460
        opt = (apr_getopt_t *) 0x4005f4f8
        rv = 1073922776
        mod = (module **) 0x4000add4
        optarg = 0x0
        signal_server = (apr_OFN_ap_signal_server_t *) 0x40013c58
<my_file_info+6512>
        c = 88 'X'
        configtestonly = 0
        def_server_root = 0x4000adb4 "/usr/local/apache2"
        temp_error_log = 0x0
        pglobal = (apr_pool_t *) 0x400272a0
        plog = (apr_pool_t *) 0x40061470
        ptemp = (apr_pool_t *) 0x40063480
        pcommands = (apr_pool_t *) 0x4005f460
        opt = (apr_getopt_t *) 0x4005f4f8
        optarg = 0x0
        c = 88 'X'
        configtestonly = 0
        def_server_root = 0x4000adb4 "/usr/local/apache2"
        temp_error_log = 0x0
        pglobal = (apr_pool_t *) 0x400272a0
        plog = (apr_pool_t *) 0x40061470
        ptemp = (apr_pool_t *) 0x40063480
        pcommands = (apr_pool_t *) 0x4005f460
        opt = (apr_getopt_t *) 0x4005f4f8
        optarg = 0x0
#8  0x7f6efbe4 in _start () from /usr/lib/libc.2
No symbol table info available.
(gdb) continue
Continuing.

Breakpoint 4, load_module (cmd=0x7f7f1340, dummy=0x4,
modname=0x40069010 "php4_module", filename=0x4002c2d8 "@\006\220\020")
at mod_so.c:285
285             return apr_pstrcat(cmd->pool, "Cannot load ",
szModuleFile,
(gdb) bt full
#0  load_module (cmd=0x7f7f1340, dummy=0x4, modname=0x40069010
"php4_module", filename=0x4002c2d8 "@\006\220\020") at mod_so.c:285
        my_error =
"@\0\214å\177\177\023@\177\177\025\212@\0ßÒ\177i\207\020of
r\177MÒµ\177MÕS\177\1775\200@\0\020\0@\0\2144\177\1776<@\006hÅ\0\0\0\0\0\0\0\n@\006t
\0\0\020\0\0\0\0\030>S~Í\177o\021\020@\0\020\0\0\0\0\0\177o\021æ\0\006ó;",
'\0' <repeats 16 times>,
"@\0\020\0\0\0\002\0\177\177\025¯\177\177\025\236</IfModule>\0\0rCh@\0\020\0\177i\207\020\0\006ág\177Nñ\v\0\0\0\020\0\0\004\0\177\1775\200@\0\020\0\177\177\025\236\0\0\0\0@\0\020\0\0\0\0\022>TƼ\0\0\0\0>+èæ\0\0"...

        modhandle = (apr_dso_handle_t *) 0x40069060
        modsym = 0x7f7f3584
        modp = (module *) 0x4
        szModuleFile = 0x40069038
"/usr/local/apache2/modules/libphp4.so"
        sconf = (so_server_conf *) 0x4002c2b8
        modi = (moduleinfo *) 0x4002c2d8
        modie = (moduleinfo *) 0x7f68385c
        i = 1073922776
        modhandle = (apr_dso_handle_t *) 0x40069060
        modsym = 0x7f7f3584
#1  0x00064c5c in invoke_cmd (cmd=0x40008cd4, parms=0x7f7f1340,
mconfig=0x7f7f3640, args=0x7f7f15b0 "") at config.c:739
        w = 0x40069010 "php4_module"
        w2 = 0x40069020 "modules/libphp4.so"
        w3 = 0x4e33
"Y\031\002\215Z\221ö.\203Á\211\031\032¼f\237&\205\fâ\f"
        errmsg = 0x4e33
"Y\031\002\215Z\221ö.\203Á\211\031\032¼f\237&\205\fâ\f"
#2  0x00066348 in execute_now (cmd_line=0x40068fb8 "LoadModule",
args=0x7f7f158b "php4_module        modules/libphp4.so",
parms=0x7f7f1340, p=0x4001b810, 
    ptemp=0x40063480, sub_tree=0x7f7f3640, parent=0x0) at
config.c:1351
        mod = (module *) 0x40008d1c
        cmd = (const command_rec *) 0x4e33
        mod = (module *) 0x40008d1c
#3  0x00065684 in zif_mysql_select_db () at config.c:942
        sub_tree = (ap_directive_t *) 0x0
        current = (ap_directive_t **) 0x7f7f3580
        curr_parent = (ap_directive_t **) 0x7f7f3584
        conftree = (ap_directive_t **) 0x400098cc
        retval = 0x4e33
"Y\031\002\215Z\221ö.\203Á\211\031\032¼f\237&\205\fâ\f"
        args = 0x7f7f158b "php4_module        modules/libphp4.so"
        cmd_name = 0x40068fb8 "LoadModule"
        newdir = (ap_directive_t *) 0x40068fc8
        mod = (module *) 0x40008d1c
        cmd = (const command_rec *) 0x4e33
        args = 0x7f7f158b "php4_module        modules/libphp4.so"
        mod = (module *) 0x40008d1c
#4  0x00065c84 in zif_mysql_get_proto_info () at config.c:1149
        current = (ap_directive_t *) 0x40068f90
        curr_parent = (ap_directive_t *) 0x0
        l = "LoadModule php4_module       
modules/libphp4.so\0\0/libphp4.so\0\0ot need\0\0ed.\0\0u", '\0'
<repeats 15 times>,
"ríS@\006hÅ\0\0\0\b\0\0\0\0\0\0\0\0@\0064\200@\0\230ä\177\177\023@@\006h´@\0\020\0\177LS8@\0Û\004@\0Û\b@\0\020\0@\0Û\030\0\006Õ_\177MÆ[\0\0
\b@\0Û\b@\0Û\020@\0Û\030@\0\020\0@\0\230à@\0Û(@\002\222¯\177j[´\177j\022,\0\002\0\0\177"...

        errmsg = 0x4001b700 "\177gé(\177gé("
        current = (ap_directive_t *) 0x40068f90
        curr_parent = (ap_directive_t *) 0x0
        l = "LoadModule php4_module       
modules/libphp4.so\0\0/libphp4.so\0\0ot need\0\0ed.\0\0u", '\0'
<repeats 15 times>,
"ríS@\006hÅ\0\0\0\b\0\0\0\0\0\0\0\0@\0064\200@\0\230ä\177\177\023@@\006h´@\0\020\0\177LS8@\0Û\004@\0Û\b@\0\020\0@\0Û\030\0\006Õ_\177MÆ[\0\0
\b@\0Û\b@\0Û\020@\0Û\030@\0\020\0@\0\230à@\0Û(@\002\222¯\177j[´\177j\022,\0\002\0\0\177"...

#5  0x00066a20 in zif_mysql_create_db () at config.c:1563
        ptemp = (apr_pool_t *) 0x40063480
        parms = {info = 0x0, override = 150, limited = -1,
limited_xmethods = 0x0, xlimited = 0x0, config_file = 0x400684b0,
directive = 0x0, 
  pool = 0x400292b0, temp_pool = 0x40063480, server = 0x4002c060, path
= 0x0, cmd = 0x40008cd4, context = 0x0, err_directive = 0x40068fc8}
        finfo = {pool = 0x4005f498, valid = 0, protection = 2135708472,
filetype = 1073885880, user = 1073745920, group = 1073780940, inode =
417963, 
  device = 2135804307, nlink = 1073910448, size = 1073786376, csize =
1073786384, atime = 4612410254066454528, mtime = 4612018939596189378, 
  ctime = 4611868967928112720, fname = 0x4000ae28 "DEBUG", name =
0x400098c8 "@\005¶Ä@\006\207âheader_parser", filehand = 0x4000ae20}
        errmsg = 0x400668a8 "/usr/local/apache2/conf/httpd.conf"
        cfp = (ap_configfile_t *) 0x400684b0
        ispatt = 0
#6  0x000674e0 in ap_read_config (process=0x4e33, ptemp=0x40063480,
filename=0x4000ada4 "conf/httpd.conf", conftree=0x400098cc) at
config.c:1841
        confname = 0x4e33
"Y\031\002\215Z\221ö.\203Á\211\031\032¼f\237&\205\fâ\f"
        p = (apr_pool_t *) 0x400292b0
        s = (server_rec *) 0x4002c060
#7  0x0006a89c in zif_mysql_fetch_object () at main.c:565
        c = 88 'X'
        configtestonly = 0
        confname = 0x4000ada4 "conf/httpd.conf"
        def_server_root = 0x4000adb4 "/usr/local/apache2"
        temp_error_log = 0x0
        process = (process_rec *) 0x40027320
        server_conf = (server_rec *) 0x4000add4
        pglobal = (apr_pool_t *) 0x400272a0
        pconf = (apr_pool_t *) 0x400292b0
        plog = (apr_pool_t *) 0x40061470
        ptemp = (apr_pool_t *) 0x40063480
        pcommands = (apr_pool_t *) 0x4005f460
        opt = (apr_getopt_t *) 0x4005f4f8
        rv = 20019
        mod = (module **) 0x4000add4
        optarg = 0x0
        signal_server = (apr_OFN_ap_signal_server_t *) 0x7f68385c
<__pth_thread_main>
        c = 88 'X'
        configtestonly = 0
        def_server_root = 0x4000adb4 "/usr/local/apache2"
        temp_error_log = 0x0
        pglobal = (apr_pool_t *) 0x400272a0
        plog = (apr_pool_t *) 0x40061470
        ptemp = (apr_pool_t *) 0x40063480
        pcommands = (apr_pool_t *) 0x4005f460
        opt = (apr_getopt_t *) 0x4005f4f8
        optarg = 0x0
        c = 88 'X'
        configtestonly = 0
        def_server_root = 0x4000adb4 "/usr/local/apache2"
        temp_error_log = 0x0
        pglobal = (apr_pool_t *) 0x400272a0
        plog = (apr_pool_t *) 0x40061470
        ptemp = (apr_pool_t *) 0x40063480
        pcommands = (apr_pool_t *) 0x4005f460
        opt = (apr_getopt_t *) 0x4005f4f8
        optarg = 0x0
#8  0x7f6efbe4 in _start () from /usr/lib/libc.2
No symbol table info available.
(gdb) continue
Continuing.
Syntax error on line 234 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp4.so into server:
Unresolved external

Program exited with code 01.
(gdb) bt full
No stack.
(gdb) 

Hope this can help.


Previous Comments:
------------------------------------------------------------------------

[2003-02-19 22:58:23] [EMAIL PROTECTED]

Just noticed there's some HPUX related note in the httpd.conf about not
running it as 'nobody'..I guess you know this too?

------------------------------------------------------------------------

[2003-02-19 22:57:32] [EMAIL PROTECTED]

Simple 'bt full' output would have been enough.. :)
Anyway, does it do the same if you run it with 'httpd -X' ?
(provide that backtrace, and just the bt output)
 
(gdb) run -X
<crash?>
(gdb) bt full

(and to be absolutely sure this is php bug, I assume that apache works
fine without PHP in httpd.conf? :)



------------------------------------------------------------------------

[2003-02-19 12:06:21] germano60 at yahoo dot it

Here you are the trace I got with gdb (long).
My comments are highlighted with //
Hope this can help.

Apparently, the apr_filepath_merge() method invoked by load_module()
fails during the strlen() evaluation.
Very odd, also because the parameters with the module name and the
relative path for libphp4.so are correct until that point.

Here you have the gdb trace:

0x0006631c in execute_now ( \
        cmd_line=0x40068fb8 "LoadModule", \
        args=0x7f7f158b "php4_module        modules/libphp4.so", \
        parms=0x7f7f1340, \
        p=0x0, \
        ptemp=0x40063480, \
        sub_tree=0x7f7f3640, \
        parent=0x0) at config.c:1343

// Contents of *args:
(gdb) x/sg 0x7f7f158b 
0x7f7f158b:      "php4_module        modules/libphp4.so"

// Contents of *parms:
(gdb) x/xw 0x7f7f1340
0x7f7f1340:     0x00000000

// Contents of *p (looks like a NULL pointer):
(gdb) x/xw 0x0
0x0:    Error accessing memory address 0x0: Invalid argument.

// Contents of *ptemp:
(gdb) x/xw 0x40063480
0x40063480 <end+305600>:        0x400292b0

// Contents of **subtree (looks like a NULL pointer):
(gdb) x/xw 0x7f7f3640
0x7f7f3640:     0x00000000

// Contents of *parent (looks like a NULL pointer):
(gdb) x/xw 0x0
0x0:    Error accessing memory address 0x0: Invalid argument.

(gdb) si
1351            return invoke_cmd(cmd, parms, sub_tree, args);

// skip all the routine call steps of the kind  
// (gdb) si
// 0x000663xx      1343        if (!(cmd =
ap_find_command_in_modules(cmd_line, &mod))) {
// 

// Test on the first argument
(gdb) si
invoke_cmd (cmd=0x40068fb8, parms=0x40001000, mconfig=0x7f7f3584,
args=0x0) at config.c:698
698     {

// Skip some code

// Final invoke after parsing the complete LoadModule directive
(gdb) s
invoke_cmd (cmd=0x40008cd4, parms=0x7f7f1340, mconfig=0x7f7f3640,
args=0x7f7f15b0 "") at config.c:735
735             if (*w == '\0' || *w2 == '\0' || *args != 0)
(gdb) si
733             w2 = ap_getword_conf(parms->pool, &args);
(gdb) si
735             if (*w == '\0' || *w2 == '\0' || *args != 0)
(gdb) si
0x00064bf8      735             if (*w == '\0' || *w2 == '\0' || *args
!= 0)
(gdb) si
0x00064bfc      735             if (*w == '\0' || *w2 == '\0' || *args
!= 0)
(gdb) si
0x00064c00      735             if (*w == '\0' || *w2 == '\0' || *args
!= 0)
(gdb) si
0x00064c04      735             if (*w == '\0' || *w2 == '\0' || *args
!= 0)
(gdb) si
0x00064c08      735             if (*w == '\0' || *w2 == '\0' || *args
!= 0)
(gdb) si
0x00064c0c      735             if (*w == '\0' || *w2 == '\0' || *args
!= 0)

// Value of parameters at this point:
(gdb) info scope config.c:735
Scope for config.c:735:
Symbol cmd is an argument in register $r4, length 4.
Symbol parms is an argument in register $r3, length 4.
Symbol mconfig is an argument in register $r8, length 4.
Symbol args is an argument at stack/frame offset -48, length 4.
Symbol w is a local variable in register $r5, length 4.
Symbol w2 is a local variable in register $r7, length 4.
Symbol w3 is a local variable in register $ret0, length 4.
Symbol errmsg is a local variable in register $ret0, length 4.
(gdb) info registers
     flags:         29000041          sr5:          d25cc00   
        r1:         40015458          sr6:          47df000   
        rp:            64bef          sr7:          47df000   
        r3: parms   7f7f1340          cr0:          10bb9c8   
        r4: cmd     40008cd4          cr8:     10bf0000ffff   
        r5: w       40069010          cr9:          8000009   
        r6:         40001000          ccr:           2050f8   
        r7: w2      40069020         cr12:               10   
        r8: mconfig 7f7f3640         cr13:            af43c   
        r9:         7f7f1340         cr24:    400003ffffff7   
       r10:         40063480         cr25:           718740   
       r11:         400098cc         cr26: c600000000000000   
       r12:         7f7f3580   mpsfu_high:         4001b810   
       r13:         40063480    mpsfu_low:             2000   
       r14:         4002c060   mpsfu_ovfl:           410fa8   
       r15:         400098cc          pad: 4ab6b8b14a4406f9   
       r16:         4000a650         fpsr:          8200000   
       r17:         4000a664         fpe1:                0   
       r18:         4000ada4         fpe2:                0   
       r19:         40001000         fpe3:                0   
       r20:         7f7f15b0         fpe4:                0   
       r21:                0         fpe5:                0   
       r22:                0         fpe6:                0   
       r23:         7f7f15af         fpe7:                0   
       r24:               12          fr4:                0   
       r25:         7f7f15b0         fr4R:         6174696f   
       r26:                0          fr5:                2   
        dp:         40015c58         fr5R:         20746865   
      ret0: errmsg  40069020          fr6:                0   
      ret1:             2f6c         fr6R:                0   
        sp:         7f7f37b0          fr7:         733a0a23   
       r31:         7f69bba0         fr7R:         2020204f   
       sar:               28          fr8:         7074696f   
     pcoqh:            64c0c         fr8R:         6e732046   
     pcsqh:          a049800          fr9:         696c6549   
     pcoqt:            64c10         fr9R:         6e666f20   
     pcsqt:          a049800         fr10:         41757468   
      eiem: ffffffffffffffff        fr10R:         436f6e66   
       iir:                4         fr11:         6967204c   
       isr:                0        fr11R:         696d6974   
       ior:                0         fr12:         55555555   
      ipsw:       ff0004ff1f        fr12R:         55555555   
      goto:                2         fr13:         55555555   
       sr4:          a049800        fr13R:         55555555   
       sr0:          a049800         fr14:         55555555   
       sr1:          6c08000        fr14R:         55555555   
       sr2:                0         fr15:         55555555   
       sr3:                0        fr15R:         55555555   

// Contents of w:
(gdb) x/sg 0x40069010
0x40069010 <end+329040>:         "php4_module"

// Contents of w2:
(gdb) x/sg 0x40069020
0x40069020 <end+329056>:         "modules/libphp4.so"

(gdb) info frame
Stack level 0, frame at 0x7f7f3730:
 pcoqh = 0x64c0c in invoke_cmd (config.c:735); saved pcoqh 0x66348
 called by frame at 0x7f7f36b0
 source language c.
 Arglist at 0x7f7f3730, args: cmd=0x40008cd4, parms=0x7f7f1340,
mconfig=0x7f7f3640, args=0x7f7f15b0 ""
 Locals at 0x7f7f3730, Previous frame's sp is 0x7f7f3730
 Saved registers:
  rp at 0x7f7f371c, r3 at 0x7f7f3744, r4 at 0x7f7f3740, r5 at
0x7f7f373c, r6 at 0x7f7f3738, r7 at 0x7f7f3734, r8 at 0x7f7f3730

// Contents of args:
(gdb) x/xb 0x7f7f15b0
0x7f7f15b0:     0x00

// Stepped execution trace proceeds:
(gdb) si
0x00064c48      739             return cmd->AP_TAKE2(parms, mconfig, w,
w2);
(gdb) si
0x00064c4c      739             return cmd->AP_TAKE2(parms, mconfig, w,
w2);
(gdb) si
0x00064c50      739             return cmd->AP_TAKE2(parms, mconfig, w,
w2);
(gdb) si
0x00064c54      739             return cmd->AP_TAKE2(parms, mconfig, w,
w2);
(gdb) si
0x00064c58      739             return cmd->AP_TAKE2(parms, mconfig, w,
w2);
(gdb) si
0x000377c8 in  ()
(gdb) si
0x000377cc in  ()
(gdb) si
0x000377d0 in  ()
(gdb) si
0x000377d4 in  ()
(gdb) si
0x000377d8 in noshlibs ()
(gdb) si
0x000377dc in noshlibs ()
(gdb) si
0x000377e0 in noshlibs ()
(gdb) si
0x000377e4 in noshlibs ()
(gdb) si
0x0005f844 in load_module () at mod_so.c:188
188         modi->name = NULL;
(gdb) si
0x0005f848      188         modi->name = NULL;
(gdb) si
load_module (cmd=0x40063480, \
             dummy=0x40008cd4, \
             modname=0x7f7f1340 "", \
             filename=0x7f7f1340 "") at mod_so.c:199
199     {
(gdb) si   
0x0005f8b4      199     {
(gdb) si
0x0005f8b8 in load_module (cmd=0x40063480, \
                           dummy=0x40008cd4, \
                           modname=0x7f7f1340 "", \
                           filename=0x7f7f1340 "") at mod_so.c:199
199     {
(gdb) si
0x0005f8bc      199     {
(gdb) si
0x0005f8c0      199     {
(gdb) si
0x0005f8c4      199     {
(gdb) si
0x0005f8c8      199     {
(gdb) si
0x0005f8cc      199     {
(gdb) si
0x0005f8d0      199     {
(gdb) si
0x0005f8d4      199     {
(gdb) si
0x0005f8d8      199     {
(gdb) si
203         const char *szModuleFile =
ap_server_root_relative(cmd->pool, filename);
(gdb) si
199     {
(gdb) si
0x0005f8e4      199     {
(gdb) si
0x0005f8e8      199     {
(gdb) si
0x0005f8ec      199     {
(gdb) si
0x0005f8f0      199     {
(gdb) si
0x0005f8f4      199     {
(gdb) si
0x0005f8f8      199     {
(gdb) si
0x0005f8fc      199     {
(gdb) si
203         const char *szModuleFile =
ap_server_root_relative(cmd->pool, filename);
(gdb) si
0x0005f904      203         const char *szModuleFile =
ap_server_root_relative(cmd->pool, filename);
(gdb) si
ap_server_root_relative (p=0x400292b0, file=0x40069010 "php4_module")
at config.c:1278
1278    {
(gdb) si
1281        rv = apr_filepath_merge(&newpath, ap_server_root, file,
(gdb) si
1278    {
(gdb) si
0x0006607c in ap_server_root_relative (p=0x400292b0, file=0x40069010
"php4_module") at config.c:1278
1278    {
(gdb) si
0x00066080      1278    {
(gdb) si
1281        rv = apr_filepath_merge(&newpath, ap_server_root, file,
(gdb) si
1278    {
(gdb) si
0x0006608c      1278    {
(gdb) si
1281        rv = apr_filepath_merge(&newpath, ap_server_root, file,
(gdb) si
0x00066094      1281        rv = apr_filepath_merge(&newpath,
ap_server_root, file,
(gdb) si
1279        char *newpath = NULL;
(gdb) si
1281        rv = apr_filepath_merge(&newpath, ap_server_root, file,
(gdb) si
0x000660a0      1281        rv = apr_filepath_merge(&newpath,
ap_server_root, file,
(gdb) si
0x000660a4      1281        rv = apr_filepath_merge(&newpath,
ap_server_root, file,
(gdb) si
0x00066054 in apr_filepath_merge () at filepath.c:123
123     {
(gdb) si
0x00066058      123     {
(gdb) si
0x0006605c      123     {
(gdb) si
0x00066060      123     {
(gdb) si
0x00066064      123     {
(gdb) si
0x00066068      123     {
(gdb) si
0x0006606c      123     {
(gdb) si
0x7f4dc988 in apr_filepath_merge () at filepath.c:123
123     {
(gdb) si
0x7f4dc98c      123     {
(gdb) si
apr_filepath_merge (newpath=0x4002c060, \
                    rootpath=0x40001000 "\177\177", \
                    addpath=0x40001000 "\177\177", \
                    flags=1074148480, \
                    p=0x0) at filepath.c:123
123     {
(gdb) si
0x7f4dc9d4      123     {
(gdb) si
0x7f4dc9d8 in apr_filepath_merge (newpath=0x4002c060, \
                                  rootpath=0x40001000 "\177\177", \
                                  addpath=0x40001000 "\177\177", \
                                  flags=1074148480, \
                                  p=0x400292b0)
    at filepath.c:123
123     {
(gdb) si
0x7f4dc9dc      123     {
(gdb) si
0x7f4dc9e0      123     {
(gdb) si
0x7f4dc9e4      123     {
(gdb) si
0x7f4dc9e8      123     {
(gdb) si
0x7f4dc9ec      123     {
(gdb) si
0x7f4dc9f0      123     {
(gdb) si
0x7f4dc9f4      123     {
(gdb) si
0x7f4dc9f8      123     {
(gdb) si
0x7f4dc9fc      123     {
(gdb) si
0x7f4dca00      123     {
(gdb) si
0x7f4dca04      123     {
(gdb) si
0x7f4dca08      123     {
(gdb) si
0x7f4dca0c      123     {
(gdb) si
0x7f4dca10      123     {
(gdb) si
0x7f4dca14      123     {
(gdb) si
0x7f4dca18      123     {
(gdb) si
0x7f4dca1c      123     {
(gdb) si
0x7f4dca20      123     {
(gdb) si
0x7f4dca24      123     {
(gdb) si
0x7f4dca28      123     {
(gdb) si
134         if (!addpath)
(gdb) si
0x7f4dca30      134         if (!addpath)
(gdb) si
137         if (addpath[0] == '/') {
(gdb) si
0x7f4dca38      137         if (addpath[0] == '/') {
(gdb) si
0x7f4dca3c      137         if (addpath[0] == '/') {
(gdb) si
0x7f4dca40      137         if (addpath[0] == '/') {
(gdb) si
160             if (flags & APR_FILEPATH_NOTABSOLUTE) {
(gdb) si
168         if (!rootpath) {
(gdb) si
0x7f4dca60      168         if (!rootpath) {
(gdb) si
186         rootlen = strlen(rootpath);
(gdb) si
0x7f4dca68      186         rootlen = strlen(rootpath);
(gdb) si
0x7f4d5a08 in strlen () from /usr/local/apache2/lib/libapr-0.sl.9
(gdb) si
0x7f4d5a0c in strlen () from /usr/local/apache2/lib/libapr-0.sl.9
(gdb) si
0x7f4d5a10 in strlen () from /usr/local/apache2/lib/libapr-0.sl.9
(gdb) si
0x7f4d5a14 in strlen () from /usr/local/apache2/lib/libapr-0.sl.9
(gdb) s
Single stepping until exit from function strlen, 
which has no line number information.
Syntax error on line 234 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp4.so into server:
Unresolved external


Program exited with code 01.
breakpoint_delete_event
(gdb)

------------------------------------------------------------------------

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/22273

-- 
Edit this bug report at http://bugs.php.net/?id=22273&edit=1

Reply via email to