From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Aug 27 13:12:10 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5260416A538 for ; Sun, 27 Aug 2006 13:12:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43DBD44506 for ; Sun, 27 Aug 2006 12:40:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k7RCeKMs046667 for ; Sun, 27 Aug 2006 12:40:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k7RCeKsX046665; Sun, 27 Aug 2006 12:40:20 GMT (envelope-from gnats) Resent-Date: Sun, 27 Aug 2006 12:40:20 GMT Resent-Message-Id: <200608271240.k7RCeKsX046665@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andrew Tulloch Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A413316A4DA for ; Sun, 27 Aug 2006 12:31:33 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 54BB644788 for ; Sun, 27 Aug 2006 12:31:33 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k7RCVXgL026364 for ; Sun, 27 Aug 2006 12:31:33 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k7RCVXbg026354; Sun, 27 Aug 2006 12:31:33 GMT (envelope-from nobody) Message-Id: <200608271231.k7RCVXbg026354@www.freebsd.org> Date: Sun, 27 Aug 2006 12:31:33 GMT From: Andrew Tulloch To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: ports/102561: rc.d ordering results in apache + mod_php5 starting without pdo mysql support X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Aug 2006 13:12:10 -0000 >Number: 102561 >Category: ports >Synopsis: rc.d ordering results in apache + mod_php5 starting without pdo mysql support >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Aug 27 12:40:19 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Andrew Tulloch >Release: 6.1-STABLE >Organization: >Environment: FreeBSD xxxxxxxx.dev 6.1-STABLE FreeBSD 6.1-STABLE #0: Sat Aug 26 13:54:04 BST 2006 root@xxxxxxxx.dev:/usr/obj/usr/src/sys/XXXXXXXX i386 >Description: Due to rc.d script ordering on boot the apache2 port starting before the mysql client libs script is run. This results in the following error: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20050922/pdo_mysql.so' - Shared object "libmysqlclient.so.15" not found, required by "pdo_mysql.so" in Unknown on line 0 [Sun Aug 27 13:00:35 2006] [notice] Apache/2.0.59 (FreeBSD) PHP/5.1.5 configured -- resuming normal operations Apache is now running with PHP, but with PDO without PDO mysql support because the mysql libs were not present at the time apache was started. >How-To-Repeat: Install apache (www/apache2) php5 (www/mod_php5) with PDO (databases/pecl-PDO) and install PDO mysql (databases/pecl-PDO_MYSQL). Reboot the machine and you should see the error: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20050922/pdo_mysql.so' - Shared object "libmysqlclient.so.15" not found, required by "pdo_mysql.so" in Unknown on line 0 [Sun Aug 27 13:00:35 2006] [notice] Apache/2.0.59 (FreeBSD) PHP/5.1.5 configured -- resuming normal operations In /var/log/httpd-error.log >Fix: Create a more modern startup script so that mysqlclient libs are present before other daemons are started as it seems old style startup scripts are processed last. Something like: #!/bin/sh # # # PROVIDE: mysqlclient # REQUIRE: NETWORKING SERVERS # BEFORE: DAEMON # KEYWORD: shutdown . /etc/rc.subr name="mysqlclient" rcvar=`set_rcvar` start_cmd="mysqlclient_start" load_rc_config $name mysqlclient_start() { /sbin/ldconfig -m /usr/local/lib/mysql } run_rc_command "$1" >Release-Note: >Audit-Trail: >Unformatted: