From owner-freebsd-questions@FreeBSD.ORG Tue Nov 28 06:07:49 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 370BE16A4CE for ; Tue, 28 Nov 2006 06:07:49 +0000 (UTC) (envelope-from list@museum.rain.com) Received: from ns.umpquanet.com (ns.umpquanet.com [63.105.30.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3581344C67 for ; Tue, 28 Nov 2006 05:49:02 +0000 (GMT) (envelope-from list@museum.rain.com) Received: from ns.umpquanet.com (localhost [127.0.0.1]) by ns.umpquanet.com (8.13.8/8.13.8) with ESMTP id kAS5mlUx059481 for ; Mon, 27 Nov 2006 21:48:47 -0800 (PST) (envelope-from list@museum.rain.com) Received: (from james@localhost) by ns.umpquanet.com (8.13.8/8.13.8/Submit) id kAS5mls1059480 for freebsd-questions@freebsd.org; Mon, 27 Nov 2006 21:48:47 -0800 (PST) (envelope-from list@museum.rain.com) Date: Mon, 27 Nov 2006 21:48:46 -0800 From: James Long To: freebsd-questions@freebsd.org Message-ID: <20061128054846.GA59193@ns.umpquanet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Subject: Latest Apache13 with PHP5 crashes when PostgreSQL support is added 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: Tue, 28 Nov 2006 06:07:49 -0000 I have been running Apache (apache+mod_ssl-1.3.34+2.8.25_1) for some time with php5 and extensions to support PostgreSQL 8.0.9. After upgrading to PostgreSQL 8.1.15 I find that Apache crashes if the php5 PostgreSQL extension is installed. I have updated Apache to apache+mod_ssl-1.3.37+2.8.28 with no improvement. I have pkg_deleted and re-installed the php5 port with no improvement. Starting Apache via the package's rc.d script results in a short- lived httpd process that doesn't live long enough to log anything before it exits. I have to run it as "httpd -DSSL -X" to see any debugging info at all, which is simply "Segmentation fault: 11 (core dumped)" and an httpd.core file. I am compiling php5-extensions with only pgsql support. With this php5-extensions meta-port installed, Apache will not start with PHP support. If I either comment out Apache's PHP support, or de-install the php5-pgsql-5.2.0 package, Apache will start. That suggests to me that I have narrowed down my list of suspects. How can I get the latest Apache 1.3.X and PHP5 to support the latest PostgreSQL? Thank you for your time. Jim ns : 21:05:31 /usr/ports/lang/php5-extensions# make showconfig | grep -vw off ===> The following configuration options are available for php5-extensions-1.0: PGSQL=on "PostgreSQL database support" ===> Use 'make config' to modify these settings If I install php5-pgsql-5.2.0 and run "/usr/local/etc/rc.d/apache start" I get no error message on the console, and a single httpd process lives briefly then exits. Manually running httpd -DSSL -X shows a segmentation fault 11. Below, findps is a shell shortcut that is basically ps -axl | grep "$@" which is a quick and dirty way to see whether a process is running. ns : 21:26:27 /usr/local/etc/apache# findps http ns : 21:26:30 /usr/local/etc/apache# pkg_info | grep php php5-5.2.0 PHP Scripting Language (Apache Module and CLI) php5-extensions-1.0 A "meta-port" to install PHP extensions php5-pgsql-5.2.0 The pgsql shared extension for php ns : 21:26:36 /usr/local/etc/apache# pkg_info | grep ^apache apache+mod_ssl-1.3.37+2.8.28 The Apache 1.3 webserver with SSL/TLS functionality ns : 21:26:44 /usr/local/etc/apache# httpd -DSSL -X Processing config directory: /usr/local/etc/apache/virtual-hosts/*.conf Processing config file: /usr/local/etc/apache/virtual-hosts/com.example1.conf Processing config file: /usr/local/etc/apache/virtual-hosts/com.example2.conf Processing config file: /usr/local/etc/apache/virtual-hosts/com.example3.conf Processing config file: /usr/local/etc/apache/virtual-hosts/com.example4.conf Processing config file: /usr/local/etc/apache/virtual-hosts/com.example5.conf Processing config file: /usr/local/etc/apache/virtual-hosts/com.example6.conf Processing config file: /usr/local/etc/apache/virtual-hosts/com.example7.conf (... etc.) Processing config file: /usr/local/etc/apache/virtual-hosts/org.exampleN.conf Segmentation fault: 11 (core dumped) ns : 21:26:59 /usr/local/etc/apache# ls -l *core -rw------- 1 root wheel 27332608 Nov 27 21:26 httpd.core ns : 21:27:08 /usr/local/etc/apache# If I de-install the PHP support for Postgres, apache will start: ns : 21:30:07 /usr/local/etc/apache# pkg_delete php5-pgsql-5.2.0 pkg_delete: package 'php5-pgsql-5.2.0' is required by these other packages and may not be deinstalled: php5-extensions-1.0 ns : 21:30:12 /usr/local/etc/apache# pkg_delete php5-extensions-1.0 ns : 21:30:26 /usr/local/etc/apache# pkg_delete php5-pgsql-5.2.0 ns : 21:30:28 /usr/local/etc/apache# /usr/local/etc/rc.d/apache.sh start Starting apache. Processing config directory: /usr/local/etc/apache/virtual-hosts/*.conf Processing config file: /usr/local/etc/apache/virtual-hosts/com.example1.conf Processing config file: /usr/local/etc/apache/virtual-hosts/com.example2.conf Processing config file: /usr/local/etc/apache/virtual-hosts/com.example3.conf Processing config file: /usr/local/etc/apache/virtual-hosts/com.example4.conf Processing config file: /usr/local/etc/apache/virtual-hosts/com.example5.conf Processing config file: /usr/local/etc/apache/virtual-hosts/com.example6.conf Processing config file: /usr/local/etc/apache/virtual-hosts/com.example7.conf (... etc.) Processing config file: /usr/local/etc/apache/virtual-hosts/org.exampleN.conf ns : 21:30:58 /usr/local/etc/apache# findps http root 56898 41.4 3.1 37024 32404 ?? Ss 9:30PM 0:02.72 /usr/local/sbin/httpd -DSSL www 57036 0.0 3.1 37024 32420 ?? S 9:31PM 0:00.01 /usr/local/sbin/httpd -DSSL www 57037 0.0 3.1 37024 32420 ?? S 9:31PM 0:00.00 /usr/local/sbin/httpd -DSSL www 57038 0.0 3.1 37024 32420 ?? S 9:31PM 0:00.01 /usr/local/sbin/httpd -DSSL www 57039 0.0 3.1 37024 32420 ?? S 9:31PM 0:00.01 /usr/local/sbin/httpd -DSSL www 57040 0.0 3.1 37024 32420 ?? S 9:31PM 0:00.00 /usr/local/sbin/httpd -DSSL ns : 21:31:03 /usr/local/etc/apache#