Re my problem with Apache dying when I try and load the PHP module, it was
suggested to me that I should run strace on Apache when it is and isn't
trying to load PHP. Thanks to John Holden for the suggestion
Well....
To keep the trace relatively simple, I actually did a ktrace (it's 'ktrace' on
OpenBSD, not 'strace') when just asking apache to do a syntax check. The
syntax check fails when I include the 'LoadModule libphp4.so' line.
So, the command line was:
ktrace httpd -t
To compare like with like, I ran this with the 'LoadModule access_module' and
then again with 'LoadModule php4_module'.
This is what I got. When asked to load the PHP module, apache seems to then go and
search /usr/lib and /usr/local/lib. I'm assuming it's trying to resolve some
dependencies arrising from the PHP module, but I have no idea what they might be. Am I
missing some obvious dependencies ? What could apache be looking for ?
regards,
Rich.
=========================================================
(1) LoadModule access_module ...'
--snip--
218 httpd CALL read(0x5,0x3c0720c8,0x1000)
218 httpd GIO fd 5 read 314 bytes
"# Apache 2 config
ErrorLog logs/error_log
LogLevel debug
ServerRoot "/usr/local/apache2"
User httpd
Group httpd
PidFile logs/httpd.pid
LoadModule access_module modules/mod_access.so
# Dynamic Shared Object (DSO) Support
# LoadModule php4_module modules/libphp4.so
Listen 192.168.0.2:80
# EOF
"
218 httpd RET read 314/0x13a
218 httpd CALL sigprocmask(0x1,0xffffffff)
218 httpd RET sigprocmask 0
218 httpd CALL mprotect(0x3c01f000,0x1000,0x3)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x3c01f000,0x1000,0x1)
218 httpd RET mprotect 0
218 httpd CALL sigprocmask(0x3,0)
218 httpd RET sigprocmask -65793/0xfffefeff
218 httpd CALL sigprocmask(0x1,0xffffffff)
218 httpd RET sigprocmask 0
218 httpd CALL mprotect(0x3c01f000,0x1000,0x3)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x3c01f000,0x1000,0x1)
218 httpd RET mprotect 0
218 httpd CALL sigprocmask(0x3,0)
218 httpd RET sigprocmask -65793/0xfffefeff
218 httpd CALL sigprocmask(0x1,0xffffffff)
218 httpd RET sigprocmask 0
218 httpd CALL mprotect(0x3c01f000,0x1000,0x3)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x3c01f000,0x1000,0x1)
218 httpd RET mprotect 0
218 httpd CALL sigprocmask(0x3,0)
218 httpd RET sigprocmask -65793/0xfffefeff
218 httpd CALL sigprocmask(0x1,0xffffffff)
218 httpd RET sigprocmask 0
218 httpd CALL mprotect(0x2946f000,0x1000,0x3)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x2946f000,0x1000,0x1)
218 httpd RET mprotect 0
218 httpd CALL sigprocmask(0x3,0)
218 httpd RET sigprocmask -65793/0xfffefeff
218 httpd CALL stat(0x3c0731f0,0xcfbefc88)
218 httpd NAMI "/usr/local/apache2"
218 httpd RET stat 0
218 httpd CALL sigprocmask(0x1,0xffffffff)
218 httpd RET sigprocmask 0
218 httpd CALL mprotect(0x3c01f000,0x1000,0x3)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x3c01f000,0x1000,0x1)
218 httpd RET mprotect 0
218 httpd CALL sigprocmask(0x3,0)
218 httpd RET sigprocmask -65793/0xfffefeff
218 httpd CALL sigprocmask(0x1,0xffffffff)
218 httpd RET sigprocmask 0
218 httpd CALL mprotect(0x2946f000,0x1000,0x3)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x2946f000,0x1000,0x1)
218 httpd RET mprotect 0
218 httpd CALL sigprocmask(0x3,0)
218 httpd RET sigprocmask -65793/0xfffefeff
218 httpd CALL open(0x3c073330,0,0)
218 httpd NAMI "/usr/local/apache2/modules/mod_access.so"
218 httpd RET open 6
218 httpd CALL read(0x6,0xcfbeeb64,0x1000)
218 httpd GIO fd 6 read 4088 bytes
"\^?ELF\^A\^A\^A\0\0\0\0\0\0\0\0\0\^C\0\^C\0\^A\0\0\0P
--snip-- - binary image data
\M-6\0\^A\0\0\M^KM\bQ\M-h\M-i\M-}\M^?\M^?\M^C\M-D\^P\M^E\M-@"
218 httpd GIO fd 6 read 8 bytes
"t\^Z\M^C\M-D\M-|W\M^?\M-6"
218 httpd RET read 4096/0x1000
218 httpd CALL mquery(0,0x2000,0x5,0,0x6,0,0,0)
218 httpd RET mquery 123121664/0x756b000
218 httpd CALL mquery(0x2756b000,0x1000,0x1,0x10,0xffffffff,0,0,0)
218 httpd RET mquery 659992576/0x2756b000
218 httpd CALL mquery(0x2756c000,0x1000,0x3,0x10,0xffffffff,0,0,0)
218 httpd RET mquery 659996672/0x2756c000
218 httpd CALL mquery(0x2756d000,0x1000,0x3,0x10,0xffffffff,0,0,0)
218 httpd RET mquery 660000768/0x2756d000
218 httpd CALL mquery(0x2756e000,0x1000,0x3,0x10,0xffffffff,0,0,0)
218 httpd RET mquery 660004864/0x2756e000
218 httpd CALL mmap(0x756b000,0x2000,0x5,0x12,0x6,0,0,0)
218 httpd RET mmap 123121664/0x756b000
218 httpd CALL mmap(0x2756b000,0x1000,0x1,0x12,0x6,0,0x2000,0)
218 httpd RET mmap 659992576/0x2756b000
218 httpd CALL mmap(0x2756c000,0x1000,0x3,0x12,0x6,0,0x2000,0)
218 httpd RET mmap 659996672/0x2756c000
218 httpd CALL mmap(0x2756d000,0x1000,0x3,0x12,0x6,0,0x2000,0)
218 httpd RET mmap 660000768/0x2756d000
218 httpd CALL mmap(0x2756e000,0x1000,0x3,0x12,0x6,0,0x2000,0)
218 httpd RET mmap 660004864/0x2756e000
218 httpd CALL close(0x6)
218 httpd RET close 0
218 httpd CALL mprotect(0x756b000,0x10b0,0x7)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x2756b000,0x160,0x3)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x756b000,0x10b0,0x5)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x2756b000,0x160,0x1)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x756b000,0x10b0,0x7)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x2756b000,0x160,0x3)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x756b000,0x10b0,0x5)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x2756b000,0x160,0x1)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x2756d000,0x1000,0x1)
218 httpd RET mprotect 0
218 httpd CALL sigprocmask(0x1,0xffffffff)
218 httpd RET sigprocmask 0
218 httpd CALL mprotect(0x3c01f000,0x1000,0x3)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x3c01f000,0x1000,0x1)
218 httpd RET mprotect 0
218 httpd CALL sigprocmask(0x3,0)
218 httpd RET sigprocmask -65793/0xfffefeff
218 httpd CALL sigprocmask(0x1,0xffffffff)
218 httpd RET sigprocmask 0
218 httpd CALL mprotect(0x2946f000,0x1000,0x3)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x2946f000,0x1000,0x1)
218 httpd RET mprotect 0
218 httpd CALL sigprocmask(0x3,0)
218 httpd RET sigprocmask -65793/0xfffefeff
218 httpd CALL sigprocmask(0x1,0xffffffff)
218 httpd RET sigprocmask 0
218 httpd CALL mprotect(0x2756d000,0x1000,0x3)
218 httpd RET mprotect 0
218 httpd CALL mprotect(0x2756d000,0x1000,0x1)
--snip-- - continues....
=========================================================
(2) LoadModule php4_module ...'
12265 httpd CALL read(0x5,0x3c0720c8,0x1000)
12265 httpd GIO fd 5 read 314 bytes
"# Apache 2 config
ErrorLog logs/error_log
LogLevel debug
ServerRoot "/usr/local/apache2"
User httpd
Group httpd
PidFile logs/httpd.pid
# LoadModule access_module modules/mod_access.so
# Dynamic Shared Object (DSO) Support
LoadModule php4_module modules/libphp4.so
Listen 192.168.0.2:80
# EOF
"
12265 httpd RET read 314/0x13a
12265 httpd CALL sigprocmask(0x1,0xffffffff)
12265 httpd RET sigprocmask 0
12265 httpd CALL mprotect(0x3c01f000,0x1000,0x3)
12265 httpd RET mprotect 0
12265 httpd CALL mprotect(0x3c01f000,0x1000,0x1)
12265 httpd RET mprotect 0
12265 httpd CALL sigprocmask(0x3,0)
12265 httpd RET sigprocmask -65793/0xfffefeff
12265 httpd CALL sigprocmask(0x1,0xffffffff)
12265 httpd RET sigprocmask 0
12265 httpd CALL mprotect(0x3c01f000,0x1000,0x3)
12265 httpd RET mprotect 0
12265 httpd CALL mprotect(0x3c01f000,0x1000,0x1)
12265 httpd RET mprotect 0
12265 httpd CALL sigprocmask(0x3,0)
12265 httpd RET sigprocmask -65793/0xfffefeff
12265 httpd CALL sigprocmask(0x1,0xffffffff)
12265 httpd RET sigprocmask 0
12265 httpd CALL mprotect(0x3c01f000,0x1000,0x3)
12265 httpd RET mprotect 0
12265 httpd CALL mprotect(0x3c01f000,0x1000,0x1)
12265 httpd RET mprotect 0
12265 httpd CALL sigprocmask(0x3,0)
12265 httpd RET sigprocmask -65793/0xfffefeff
12265 httpd CALL sigprocmask(0x1,0xffffffff)
12265 httpd RET sigprocmask 0
12265 httpd CALL mprotect(0x26974000,0x1000,0x3)
12265 httpd RET mprotect 0
12265 httpd CALL mprotect(0x26974000,0x1000,0x1)
12265 httpd RET mprotect 0
12265 httpd CALL sigprocmask(0x3,0)
12265 httpd RET sigprocmask -65793/0xfffefeff
12265 httpd CALL stat(0x3c0731f0,0xcfbf9944)
12265 httpd NAMI "/usr/local/apache2"
12265 httpd RET stat 0
12265 httpd CALL sigprocmask(0x1,0xffffffff)
12265 httpd RET sigprocmask 0
12265 httpd CALL mprotect(0x3c01f000,0x1000,0x3)
12265 httpd RET mprotect 0
12265 httpd CALL mprotect(0x3c01f000,0x1000,0x1)
12265 httpd RET mprotect 0
12265 httpd CALL sigprocmask(0x3,0)
12265 httpd RET sigprocmask -65793/0xfffefeff
12265 httpd CALL sigprocmask(0x1,0xffffffff)
12265 httpd RET sigprocmask 0
12265 httpd CALL mprotect(0x26974000,0x1000,0x3)
12265 httpd RET mprotect 0
12265 httpd CALL mprotect(0x26974000,0x1000,0x1)
12265 httpd RET mprotect 0
12265 httpd CALL sigprocmask(0x3,0)
12265 httpd RET sigprocmask -65793/0xfffefeff
12265 httpd CALL open(0x3c073328,0,0)
12265 httpd NAMI "/usr/local/apache2/modules/libphp4.so"
12265 httpd RET open 6
12265 httpd CALL read(0x6,0xcfbf8820,0x1000)
12265 httpd GIO fd 6 read 4088 bytes
"\^?ELF\^A\^A\^A\0\0\0\0\0\0\0\0\0\^
--snip-- binary image data
12265 httpd GIO fd 6 read 8 bytes
"\0\0\0\0\M-G\^B\0\0"
12265 httpd RET read 4096/0x1000
12265 httpd CALL mquery(0,0xf7000,0x5,0,0x6,0,0,0)
12265 httpd RET mquery 54980608/0x346f000
12265 httpd CALL mquery(0x2346f000,0x27000,0x1,0x10,0xffffffff,0,0,0)
12265 httpd RET mquery 591851520/0x2346f000
12265 httpd CALL mquery(0x23496000,0xe000,0x3,0x10,0xffffffff,0,0,0)
12265 httpd RET mquery 592011264/0x23496000
12265 httpd CALL mquery(0x234a4000,0x2000,0x3,0x10,0xffffffff,0,0,0)
12265 httpd RET mquery 592068608/0x234a4000
12265 httpd CALL mquery(0x234a6000,0x1000,0x3,0x10,0xffffffff,0,0,0)
12265 httpd RET mquery 592076800/0x234a6000
12265 httpd CALL mquery(0x234a7000,0x5000,0x3,0x10,0xffffffff,0,0,0)
12265 httpd RET mquery 592080896/0x234a7000
12265 httpd CALL mmap(0x346f000,0xf7000,0x5,0x12,0x6,0,0,0)
12265 httpd RET mmap 54980608/0x346f000
12265 httpd CALL mmap(0x2346f000,0x27000,0x1,0x12,0x6,0,0xf7000,0)
12265 httpd RET mmap 591851520/0x2346f000
12265 httpd CALL mmap(0x23496000,0xe000,0x3,0x12,0x6,0,0x11d000,0)
12265 httpd RET mmap 592011264/0x23496000
12265 httpd CALL mmap(0x234a4000,0x2000,0x3,0x12,0x6,0,0x12a000,0)
12265 httpd RET mmap 592068608/0x234a4000
12265 httpd CALL mmap(0x234a6000,0x1000,0x3,0x12,0x6,0,0x12b000,0)
12265 httpd RET mmap 592076800/0x234a6000
12265 httpd CALL mmap(0x234a7000,0x5000,0x3,0x1012,0xffffffff,0,0,0)
12265 httpd RET mmap 592080896/0x234a7000
12265 httpd CALL close(0x6)
12265 httpd RET close 0
12265 httpd CALL open(0xcfbf9414,0x4,0x2c1)
12265 httpd NAMI "/usr/lib"
12265 httpd RET open 6
12265 httpd CALL fstat(0x6,0xcfbf9344)
12265 httpd RET fstat 0
12265 httpd CALL fcntl(0x6,0x2,0x1)
12265 httpd RET fcntl 0
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 1024/0x400
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 1024/0x400
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 1024/0x400
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 1024/0x400
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 512/0x200
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 0
12265 httpd CALL lseek(0x6,0,0,0,0)
12265 httpd RET lseek 0
12265 httpd CALL close(0x6)
12265 httpd RET close 0
12265 httpd CALL open(0xcfbf9414,0x4,0x1)
12265 httpd NAMI "/usr/local/lib"
12265 httpd RET open 6
12265 httpd CALL fstat(0x6,0xcfbf9344)
12265 httpd RET fstat 0
12265 httpd CALL fcntl(0x6,0x2,0x1)
12265 httpd RET fcntl 0
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 1024/0x400
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 1024/0x400
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 0
12265 httpd CALL lseek(0x6,0,0,0,0)
12265 httpd RET lseek 0
12265 httpd CALL close(0x6)
12265 httpd RET close 0
12265 httpd CALL open(0xcfbf9414,0x4,0x1)
12265 httpd NAMI "/usr/lib"
12265 httpd RET open 6
12265 httpd CALL fstat(0x6,0xcfbf9344)
12265 httpd RET fstat 0
12265 httpd CALL fcntl(0x6,0x2,0x1)
12265 httpd RET fcntl 0
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 1024/0x400
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 1024/0x400
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 1024/0x400
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 1024/0x400
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 512/0x200
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 0
12265 httpd CALL lseek(0x6,0,0,0,0)
12265 httpd RET lseek 0
12265 httpd CALL close(0x6)
12265 httpd RET close 0
12265 httpd CALL open(0xcfbf9414,0x4,0x1)
12265 httpd NAMI "/usr/local/lib"
12265 httpd RET open 6
12265 httpd CALL fstat(0x6,0xcfbf9344)
12265 httpd RET fstat 0
12265 httpd CALL fcntl(0x6,0x2,0x1)
12265 httpd RET fcntl 0
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 1024/0x400
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 1024/0x400
12265 httpd CALL getdirentries(0x6,0x7c01f8ec,0x400,0x7c01f8d8)
12265 httpd RET getdirentries 0
12265 httpd CALL lseek(0x6,0,0,0,0)
12265 httpd RET lseek 0
12265 httpd CALL close(0x6)
12265 httpd RET close 0
12265 httpd CALL exit(0x4)
-- END OF OUTPUT--
=========================================================