From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Oct 27 19:00:06 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85D231065670 for ; Tue, 27 Oct 2009 19:00:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 547B78FC13 for ; Tue, 27 Oct 2009 19:00:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n9RJ06Mu041475 for ; Tue, 27 Oct 2009 19:00:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n9RJ06QT041474; Tue, 27 Oct 2009 19:00:06 GMT (envelope-from gnats) Resent-Date: Tue, 27 Oct 2009 19:00:06 GMT Resent-Message-Id: <200910271900.n9RJ06QT041474@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, Per olof Ljungmark Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BE5E106568B for ; Tue, 27 Oct 2009 18:52:48 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id DF7EC8FC2E for ; Tue, 27 Oct 2009 18:52:47 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n9RIqlLD051583 for ; Tue, 27 Oct 2009 18:52:47 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n9RIqlAU051582; Tue, 27 Oct 2009 18:52:47 GMT (envelope-from nobody) Message-Id: <200910271852.n9RIqlAU051582@www.freebsd.org> Date: Tue, 27 Oct 2009 18:52:47 GMT From: Per olof Ljungmark To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/140023: PHP "basename" chops first character in filename 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: Tue, 27 Oct 2009 19:00:06 -0000 >Number: 140023 >Category: ports >Synopsis: PHP "basename" chops first character in filename >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 27 19:00:06 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Per olof Ljungmark >Release: 7-STABLE >Organization: BSDLabs AB >Environment: FreeBSD direwolf.inter-sonic.com 7.2-STABLE FreeBSD 7.2-STABLE #0: Thu Oct 15 07:23:17 CEST 2009 >Description: The platform is: FreeBSD 7.2-STABLE #0: Thu Oct 15 07:23:17 CEST 2009 PHP 5.2.11 with Suhosin-Patch 0.9.7 (cli) (built: Oct 15 2009 22:16:22) apache-2.2.13 - Problem not tied to a specific version of OS or PHP - Vanilla installation of Horde http://www.horde.org - Identical problem present on two servers - Problem started to occur spring 2009 - Low server load - Intermittent - Comes and goes at certain times during the day. Usually, the problem will start around 11:30 CEST or 10:30 CET, last for 24h and then go away for another 24h. And yes, we have looked for causes for this behaviour - Happens regardless of cache configuration in Horde, even without any caching - Happens regardless of cache and session settings in php.ini - The below is an *example* - One more user on the Horde lists have reported same problem with same OS (FreeBSD) >How-To-Repeat: Install Horde/PHP5/Apache from ports and wait. Backtrace from php's log [21-Oct-2009 07:28:28] after basename d string(8) "memcache" string(7) "emcache" [21-Oct-2009 07:28:28] backtrace NULL string(7) "emcache" #0 Horde_Cache->factory(memcache, Array ([hostspec] => Array ([0] => localhost),[port] => Array ([0] => 11211),[weight] => Array (),[persistent] => ,[compression] => ,[large_items] => 1,[enabled] => 1)) called at [/usr/local/www/horde/lib/Horde/Cache.php:234] #1 Horde_Cache->singleton(memcache, Array ([hostspec] => Array ([0] => localhost),[port] => Array ([0] => 11211),[weight] => Array (),[persistent] => ,[compression] => ,[large_items] => 1,[enabled] => 1)) called at [/usr/local/www/horde/lib/Horde/Perms/sql.php:57] #2 Perms_sql->Perms_sql(Array ([username] => horde,[password] => ,[protocol] => unix,[database] => horde,[charset] => iso-8859-1,[splitread] => ,[ssl] => ,[phptype] => mysqli)) called at [/usr/local/www/horde/lib/Horde/Perms.php:462] #3 Perms->factory(sql, Array ([username] => horde,[password] => ,[protocol] => unix,[database] => horde,[charset] => iso-8859-1,[splitread] => ,[ssl] => ,[phptype] => mysqli)) called at [/usr/local/www/horde/lib/Horde/Perms.php:496] #4 Perms->singleton() called at [/usr/local/www/horde/lib/Horde/Registry.php:278] #5 Registry->Registry(0) called at [/usr/local/www/horde/lib/Horde/Registry.php:139] #6 Registry::singleton() called at [/usr/local/www/horde/imp/lib/base.php:49] #7 require_once(/usr/local/www/horde/imp/lib/base.php) called at [/usr/local/www/horde/imp/redirect.php:89] #8 require(/usr/local/www/horde/imp/redirect.php) called at [/usr/local/www/horde/imp/index.php:26] NULL [21-Oct-2009 07:28:28] PHP Warning: include_once(Horde/Cache/emcache.php) [function.include-once]: failed to open stream: No such file or directory in /usr/local/www/horde/lib/Horde/Cache.php on line 194 [21-Oct-2009 07:28:28] PHP Warning: include_once() [function.include]: Failed opening 'Horde/Cache/emcache.php' for inclusion (include_path='/usr/local/www/horde/lib:.:/usr/local/share/pear') in /usr/local/www/horde/lib/Horde/Cache.php on line 194 [21-Oct-2009 07:28:39] after basename d string(8) "memcache" string(7) "emcache" *example* of where this occurs: function factory($driver, $params = array()) { if (is_array($driver)) { $app = $driver[0]; $driver = $driver[1]; } $driver = basename($driver); if (empty($driver) || $driver == 'none') { return new Horde_Cache($params); } if (!empty($app)) { include_once $app . '/lib/Cache/' . $driver . '.php'; } elseif (file_exists(dirname(__FILE__) . '/Cache/' . $driver . '.php')) { include_once dirname(__FILE__) . '/Cache/' . $driver . '.php'; } else { include_once 'Horde/Cache/' . $driver . '.php'; } $class = 'Horde_Cache_' . $driver; if (class_exists($class)) { $cache = new $class($params); } else { $cache = PEAR::raiseError('Class definition of ' . $class . ' not found.'); } return $cache; } >Fix: >Release-Note: >Audit-Trail: >Unformatted: