I am working on a project using an older version of CMS Made Simple ( I think its 1.02 ) and I'm encountering an issue when I create a 2nd connection to a different database ( both mysql ).
DB connection 1 connects to the default database where all the CMS data resides.
DB connection 2 connects to a different database to gather some information to display in a form dropdown list.
When the page processes, it displays everything fine up to the point of the form.
Then it displays the form fine ( including the drop down list with data from the 2nd database )
Then it continues to display remaining page elements, until it comes to a smarty element in the template like a global_content or something, and then returns the following error message :
string(77) "Smarty error: unable to read resource: "globalcontent:site_footer_plain"" string(77) "Smarty error: unable to read resource: "globalcontent:site_footer_plain"".
When I comment out the calls to the DB2 connection, the page displays fine (except there is no data in the dropdown list ).
Here is the code I am using to create the DB2 connection:
$db2_hostname = 'localhost';
$db2_username = 'username';
$db2_password = 'password';
$db2_name = 'db2_name';
$db2_obj = &ADONewConnection('mysql', 'pear
$connect_result = $db2_obj->NConnect($db2_hostname,$db2_username,$db2_password,$db2_name);
if (FALSE == $connect_result)
{
die ('Database Connection failed');
}
$db2_obj->SetFetchMode(ADODB_FETCH_ASSOC);
$my_db2 = &$db2_obj;
return $my_db2;
I am still learning my way around this system, as I have taken over this project form someone else, so any help would be appreciated.
Thanks.