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 httpdCALL read(0x5,0x3c0720c8,0x1000)
218 httpdGIO 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_modulemodules/libphp4.so
Listen 192.168.0.2:80
# EOF
"
218 httpdRET read 314/0x13a
218 httpdCALL sigprocmask(0x1,0x)
218 httpdRET sigprocmask 0
218 httpdCALL mprotect(0x3c01f000,0x1000,0x3)
218 httpdRET mprotect 0
218 httpdCALL mprotect(0x3c01f000,0x1000,0x1)
218 httpdRET mprotect 0
218 httpdCALL sigprocmask(0x3,0)
218 httpdRET sigprocmask -65793/0xfffefeff
218 httpdCALL sigprocmask(0x1,0x)
218 httpdRET sigprocmask 0
218 httpdCALL mprotect(0x3c01f000,0x1000,0x3)
218 httpdRET mprotect 0
218 httpdCALL mprotect(0x3c01f000,0x1000,0x1)
218 httpdRET mprotect 0
218 httpdCALL sigprocmask(0x3,0)
218 httpdRET sigprocmask -65793/0xfffefeff
218 httpdCALL sigprocmask(0x1,0x)
218 httpdRET sigprocmask 0
218 httpdCALL mprotect(0x3c01f000,0x1000,0x3)
218 httpdRET mprotect 0
218 httpdCALL mprotect(0x3c01f000,0x1000,0x1)
218 httpdRET mprotect 0
218 httpdCALL sigprocmask(0x3,0)
218 httpdRET sigprocmask -65793/0xfffefeff
218 httpdCALL sigprocmask(0x1,0x)
218 httpdRET sigprocmask 0
218 httpdCALL mprotect(0x2946f000,0x1000,0x3)
218 httpdRET mprotect 0
218 httpdCALL mprotect(0x2946f000,0x1000,0x1)
218 httpdRET mprotect 0
218 httpdCALL sigprocmask(0x3,0)
218 httpdRET sigprocmask -65793/0xfffefeff
218 httpdCALL stat(0x3c0731f0,0xcfbefc88)
218 httpdNAMI "/usr/local/apache2"
218 httpdRET stat 0
218 httpdCALL sigprocmask(0x1,0x)
218 httpdRET sigprocmask 0
218 httpdCALL mprotect(0x3c01f000,0x1000,0x3)
218 httpdRET mprotect 0
218 httpdCALL mprotect(0x3c01f000,0x1000,0x1)
218 httpdRET mprotect 0
218 httpdCALL sigprocmask(0x3,0)
218 httpdRET sigprocmask -65793/0xfffefeff
218 httpdCALL sigprocmask(0x1,0x)
218 httpdRET sigprocmask 0
218 httpdCALL mprotect(0x2946f000,0x1000,0x3)
218 httpdRET mprotect 0
218 httpdCALL mprotect(0x2946f000,0x1000,0x1)
218 httpdRET mprotect 0
218 httpdCALL sigprocmask(0x3,0)
218 httpdRET sigprocmask -65793/0xfffefeff
218 httpdCALL open(0x3c073330,0,0)
218 httpdNAMI "/usr/local/apache2/modules/mod_access.so"
218 httpdRET open 6
218 httpdCALL read(0x6,0xcfbeeb64,0x1000)
218 httpdGIO 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 httpdGIO fd 6 read 8 bytes
"t\^Z\M^C\M-D\M-|W\M^?\M-6"
218 httpdRET read 4096/0x1000
218 httpdCALL mquery(0,0x2000,0x5,0,0x6,0,0,0)
218 httpdRET mquery 123121664/0x756b000
218 httpdCALL mquery(0x2756b000,0x1000,0x1,0x10,0x,0,0,0)
218 httpdRET mquery 659992576/0x2756b000
218 httpdCALL mquery(0x2756c000,0x1000,0x3,0x10,0x,0,0,0)
218 httpdRET mquery 659996672/0x2756c000
218 httpdCALL mquery(0x2756d000,0x1000,0x3,0x10,0x,0,0,0)
218 httpdRET mquery 66768/0x2756d000
218 httpdCALL mquery(0x2756e000,0x1000,0x3,0x10,0x,0,0,0)
218 httpdRET mquery 660004864/0x2756e000
218 httpdCALL mmap(0x756b000,0x2000,0x5,0x12,0x6,0,0,0)