Loading...
 
Skip to main content

Features / Usability


Invalid db object passed to TikiLib constructor, tiki 1.9.x

Hello, I have an script that makes this error:
Invalid db object passed to TikiLib constructor

This code runs ok:

Copy to clipboard
$_SERVER['HTTP_HOST'] = $ini_array["hostname"]; $hostName = $ini_array["hostname"]; $wdir = $ini_array["wdir"]; $password = ""; if( !chdir($wdir) ) {exit(2);} include_once('tiki-setup.php'); include_once('lib/userslib.php');


but the next code makes this error

Copy to clipboard
function tikiconnect() { global $ini_array; $_SERVER['HTTP_HOST'] = $ini_array["hostname"]; $hostName = $ini_array["hostname"]; $wdir = $ini_array["wdir"]; $password = ""; if( !chdir($wdir) ) {exit(2);} include_once('tiki-setup.php'); include_once('lib/userslib.php'); } tikiconnect();



I have no idea why.
I am using tiki wiki 1.9.x