gunzip has asked for the wisdom of the Perl Monks concerning the following question:
After compiling Apache 1.3.31 statically with mod_perl-1.29 and with PHP 4.3.8 as a DSO on Fedora Core 2, mod_perl segfaults when PHP is loaded but behaves itself when mod_php4 is disabled. After trawling Google extensively I found this advice regarding re-compiling Perl:
http://www.zend.com/lists/php-dev/200309/msg00189.html
If you are running apache with mod_perl and at least one other module, you may want to compile your perl with -DPERL_USE_SAFE_PUTENV. If your perl is not compiled with this macro defined, libperl.a will contain code that plays dangerously with the global variable environ, which can lead to segmentation faults when other apache modules call putenv() ...... If you see -DPERL_USE_SAFE_PUTENV in the output, your perl was compiled with that option and your apache shouldn't exhibit the bad behavior in question. If you don't see it, and apache is crashing with stack traces that contain the function putenv(), reconfigure with
$ ./Configure --Acppflags=-DPERL_USE_SAFE_PUTENV
along with any other Configure options you may need. Run "make", "make test", and "make install." Then recompile mod_perl. If your mod_perl is statically linked into apache, recompile apache as well.
Is this really necessary? Anyone come across this problem?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Static mod_perl with DSO mod_php segfaulting
by Anonymous Monk on Sep 03, 2004 at 05:27 UTC | |
by gunzip (Pilgrim) on Sep 03, 2004 at 11:40 UTC |