tomazos has asked for the wisdom of the Perl Monks concerning the following question:

My ISP just tried to install mod_perl for me on an Apache 1.3 instance and he said that when he put mod_perl in, php4 "choked".

I'm trying to get more information off him, but has anyone heard of an incompatibility?

Update: Here is some more information:

What I am trying to do is make a version of apache 1.x with the following modules. It compiles just fine, and everything works except php4, which causes segfaults. As soon as I take out mod_perl, php4 works fine again. Any suggestions?

mod_ssl
mod_frontpage
mod_perl
mod_php4
mod_so
mod_info
mod_status
mod_rewrite

Update 2: There is a known incompatibility due to the way Perl and PHP set environment variables. There is a workaround available:

* Recompile Perl itself with -DPERL_USE_SAFE_PUTENV, then recompile mod_perl and Apache, in that order.

-OR-

* Replace all PHP calls to putenv() with apache_setenv().

Too quick for you all, but I'll leave this up incase anyone has similiar problems. -Andrew.


Andrew Tomazos  |  andrew@tomazos.com  |  www.tomazos.com

Replies are listed 'Best First'.
Re: mod_perl and php4 incompatibility?
by astroboy (Chaplain) on Jul 28, 2005 at 19:18 UTC
    I have mod_perl, php 4 and Apache v1 installed on almost every site I work. In fact I generate php from mod_perl. I haven't encountered any errors to date, but thanks for the heads up.