From owner-freebsd-questions@FreeBSD.ORG Thu Feb 16 09:01:58 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95F5016A420 for ; Thu, 16 Feb 2006 09:01:58 +0000 (GMT) (envelope-from o.greve@axis.nl) Received: from yggdrasil.interstroom.nl (yggdrasil.interstroom.nl [80.85.129.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0209B43D45 for ; Thu, 16 Feb 2006 09:01:57 +0000 (GMT) (envelope-from o.greve@axis.nl) Received: from ip127-180.introweb.nl ([80.65.127.180] helo=[192.168.1.42]) by yggdrasil with asmtp (Exim 3.35 #1 (Debian)) id 1F9f1I-0004Cv-00; Thu, 16 Feb 2006 10:01:48 +0100 Message-ID: <43F43F7B.4010900@axis.nl> Date: Thu, 16 Feb 2006 10:01:47 +0100 From: Olaf Greve User-Agent: Mozilla Thunderbird 1.0.7-1.4.1.centos4 (X11/20051007) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Olaf Greve References: <43F32AD4.1090103@axis.nl> In-Reply-To: <43F32AD4.1090103@axis.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-MailScanner-Information: Interstroom virusscan, please e-mail helpdesk@interstroom.nl for more information X-MailScanner-SpamCheck: Cc: freebsd-questions@freebsd.org Subject: Re: Help! Apache 2.2 gives segmentation fault errors with PHP. - Solved! :) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2006 09:01:58 -0000 Hi all, Yesterday I had trouble when configuring Apache 2.2 with PHP 4.4.2, which caused Apache to crash (segmentation fault) when calling various PHP functions. The hint to the answer resided in the /var/log/httpd-error.log file: > And the /var/log/httpd-error.log file mentions the following (at the end): > [...] > PHP Warning: Function registration failed - duplicate name - bzopen in > Unknown on line 0 > PHP Warning: Function registration failed - duplicate name - bzread in > Unknown on line 0 > [...] > ..............many more similar messages............... This obviously hinted at these functions (i.e php4-extensions) somehow being doubly present and called. Issuing a 'pkg_info | grep php' command was most illustrative, and showed over a screen full of output like this: mod_php4-4.4.2_1,1 PHP Apache Module php4-bcmath-4.4.2_1 The bcmath shared extension for php php4-bz2-4.3.10 The bz2 shared extension for php php4-bz2-4.4.2_1 The bz2 shared extension for php php4-calendar-4.4.2_1 The calendar shared extension for php php4-crack-4.4.2_1 The crack shared extension for php php4-ctype-4.4.2_1 The ctype shared extension for php php4-dio-4.4.2_1 The dio shared extension for php php4-domxml-4.4.2_1 The domxml shared extension for php php4-exif-4.4.2_1 The exif shared extension for php php4-extensions-1.0 A "meta-port" to install PHP extensions php4-gd-4.3.10 The gd shared extension for php php4-gd-4.4.2_1 The gd shared extension for php [...more lines where those came from...] Tadaaaah!! there we go: indeed several extensions were somehow not removed properly when a previous upgrade to PHP 4.4.2 (from v4.3.10) was performed! As to the reason for this, go figure, I always install from the ports by doing a 'make' 'make deinstall' 'make reinstall' sequence when upgrading... Anyway, manually removing all PHP extensions using the various individual 'make deinstall' sequences (and bluntly pkg_delete for pear). Then, I cleanly redid the process for installing mod_php4 and the extensions, and now all is working fine! Tnx for thinking along with me, and beware of this potential pitfall! :) Cheers! Olafo