(ubuntu hardy) php5 and php4 both together - cli ok - apache2 segfaults..

[email protected] ("Morgan Cox")
Newsgroups php.install
Message-ID <[email protected]>
Hi.

I have just compiled the latest php4 on an ubuntu Plesk hardy server.

It already had the distro's version of PHP - (PHP 5.2.4-2ubuntu5.4 with
Suhosin-Patch 0.9.6.2), I installed PHP4 from source.

The idea being so that if apache calls a .php5 page it gets parsed by php5 -
normal .php pages to go to php4.

It compiles fine and can run both from command line.

Also I can run either of them fine - i,e php4 OR php5 - however as soon as I
load BOTH modules (i.e no extra configuration) I get a segfault.

i.e loading any ONE php module is fine........

cli output:-

php5 :
 php -v
PHP 5.2.4-2ubuntu5.4 with Suhosin-Patch 0.9.6.2 (cli) (built: Nov 25 2008
22:10:31)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

php4  :
usr/local/bin/php -v
PHP 4.4.9 (cli) (built: Dec 16 2008 15:25:01)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies


I get this in apache's error log

[Tue Dec 16 15:50:22 2008] [notice] Apache/2.2.8 (Ubuntu) mod_python/3.3.1
Python/2.5.2 PHP/5.2.4-2ubuntu5.4 with Suhosin-Patch mod_ssl/2.2.8
OpenSSL/0.9.8g PHP/4.4.9 mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming
normal operations
[Tue Dec 16 15:50:28 2008] [notice] child pid 1611 exit signal Segmentation
fault (11)


I complied php4 with

./configure  --prefix=/usr/local --sysconfdir=/etc/php4
--with-config-file-path=/etc/php4
--with-config-file-scan-dir=/etc/php4/php.d --with-pic --with-pear
--with-bz2 --with-curl=/usr/include/ --with-freetype-dir=/usr
--with-png-dir=/usr --enable-gd-native-ttf --with-gdbm --with-gettext
--with-jpeg-dir=/usr --with-gmp --with-openssl=/usr --with-png-dir --with-gd
--with-libexpat-dir=/usr/ --with-zlib --with-layout=GNU --enable-exif
--enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm
--enable-calendar --with-apxs2=/usr/bin/apxs2 --with-gd
--with-libxml-dir=/usr/include/libxml2 --enable-zip --enable-bcmath
-with-gdbm --with-mcrypt=/usr/ --enable-shared --disable-ipv6 --with-imap
--with-imap-ssl --with-kerberos --enable-zip --enable-dba
--enable-mime-magic --enable-ctype --with-system-tzdata --enable-soap
--enable-ftp --enable-mbstring --enable-zend-multibyte --with-mysql=/usr
--enable-sysvmsg --with-layout=GNU --disable-rpath --enable-shmop
--with-exec-dir=/usr/lib/php4/libexec --with-iconv --enable-wddx
--enable-dbx

I load the modules with

LoadModule php4_module /usr/lib/apache2/modules/libphp4.so
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so


Has anyone got any ideas how to stop apache segfaulting - i.e is it simply
some config or do i need to recompile ? As previously mentioned php4 and
php5 work 100% o.k seperately
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.