Page 1 of 1

Database error now with connect statement after moving from

Posted: Fri Mar 10, 2017 12:31 am
by NeilF
I have a PHP script which we use with VBulletin. The script works under PHP 5.3, but when we change to PHP 5.5 the code produces a "database error."

The line it happens on is:-

Code: Select all

$db->connect(
    $config['Database']['dbname'],
    $config['MasterServer']['servername'],
    $config['MasterServer']['port'],
    $config['MasterServer']['username'],
    $config['MasterServer']['password'],
    $config['MasterServer']['usepconnect'],
    $config['SlaveServer']['servername'],
    $config['SlaveServer']['port'],
    $config['SlaveServer']['username'],
    $config['SlaveServer']['password'],
    $config['SlaveServer']['usepconnect'],
    $config['Mysqli']['ini_file']
I'm hoping quite simply that for PHP 5.5 that command needs to be altered in someway?

Thanks for any help...



ps: Preceding that code is the following in case it's important:-

Code: Select all

switch (strtolower($config['Database']['dbtype']))
{
	// load standard MySQL class
	case 'mysql':
	case '':
	{
		$db =& new vB_Database($vbulletin);
		break;
	}

	// load MySQLi class
	case 'mysqli':
	{
		$db =& new vB_Database_MySQLi($vbulletin);
		break;
	}

	// load extended, non MySQL class
	default:
	{
		die('Fatal error: Database class not found');
	}
}

Re: Database error now with connect statement after moving f

Posted: Fri Mar 10, 2017 6:40 am
by requinix
What "database error"? Is your version even compatible with PHP 5.5?