MDB2: Call to undefined function: getone()

From: Date: Thu, 24 Jan 2008 01:28:54 +0000
Subject: MDB2: Call to undefined function: getone()
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-28461@lists.php.net to get a copy of this message
I'm seeing this error on the production server only and can't figure out why. The 'Extended' module is being loaded (AFAIK--see below). My connection function is: function getDBConnection($admin = FALSE) { require_once "${_SERVER['DOCUMENT_ROOT']}/includes/php/MDB2.php"; $db_user = $admin ? DB_ADMIN : DB_USER; $db_pass = $admin ? DB_ADMIN_PASS : DB_USER_PASS; $dsn = array(
    'phptype'  => 'mysql',
    'hostspec' => DB_HOST,
    'database' => DB_NAME,
    'username' => $db_user,
    'password' => $db_pass
); $options = array(
    'debug' => 2,
    'result_buffering' => true
); $mdb2 =& MDB2::connect($dsn, $options); if (MDB2::isError($mdb2)) {
    die ('Failed to connect. ' . (SBF_DEBUG ? $mdb2->getMessage() : NULL));
} $mdb2->loadModule('Extended'); $mdb2->setFetchMode(MDB2_FETCHMODE_ASSOC); $mdb2->query('SET NAMES utf8'); $mdb2->query('SET CHARACTER SET utf8'); return $mdb2; } The FATAL error is occuring in this function: function getPressItemFilename($item_id) { GLOBAL $conn; $sql = 'SELECT filename FROM press_item WHERE id = ?'; return $conn->getOne($sql, Array('text'), Array($item_id), Array('id' => 'integer')); } I have $conn = getDBConnection(); at the top of the script, and the connection itself is fine and operating normally before this function is called. Can anyone think of why this might be happening? And is there some way i can confirm that the Extended module is being loaded? brian

« previous php.pear.general (#28461) next »