I am having trouble with a header.inc.php file. It requires that all variables (ie. databasename, user, passwd, host) are entered into an array. when I simply assign strings and connect to database,, it works. but know in an array format it continues to say that
Error: You must set your correct database access info in `inc/header.inc.php`.
but I am pretty sure the syntax is right. Unless synta is different for an array. this is what I have:
<?php
// Bold is changed
//just to simplify N= name
$db = array('host' => 'localhost',
'user' => "cpnelN_userN",
'pass' => "XXXXX",
'name' => "cpanelN_databaseNdb" );
$db['prefix'] = 'dotsilver_';
$mysql = new MySql( $db );
$mysql -> connect();
$_conf = $mysql -> get_conf_array();
$mysql -> close();
if( $_SERVER['QUERY_STRING'] != 'first')
foreach( $_conf as $value )
{
if( !$value ) Header('Location: configs.php?first');
}
$_dir = array
(
'0' => $_conf['home_dir'],
'inc' => $_conf['home_dir'].'inc/',
'smarty' => $_conf['home_dir'].'smarty/',
'layouts' => $_conf['home_dir'].'layouts/',
'langs' => $_conf['home_dir'].'langs/',
);
$_site = array(
'pid' => $_conf['site_ID'],
'layout' => $_conf['layout_name'],
'theme' => $_conf['color_theme'],
'app_name' => 'dating',
'bizname' => $_conf['bizname'],
'brand' => $_conf['brand'],
'mail_support' => $_conf['mail_support'],
'mail_links' => $_conf['mail_links'],
'mail_info' => $_conf['mail_info'],
'mail_ads' => $_conf['mail_ads'],
'age_start' => 18,
'age_end' => 75,
'online_time' => 10,
);
$_sock = array(
'domain' => 'dating-remote.dotsilver.com',
'domain_img' => 'dating-img.dotsilver.com',
);
$_url = array(
'site_url' => $_conf['site_url'],
'site' => $_conf['site_url'],
'_remote_lc_img' => "http://{$_sock'>http://{$_sock['domain_img']}/photo.php",
'_remote_lc_img_up'=> "http://{$_sock['domain_img']}/photo_up.php",
'flash_server' => 'rtmp://dotsilver.com/',
'im_xml' => 'http://dating-im.dotsilver.com/',
'anti_scam' => 'http://www.dotsilver.com/antiscam/public/dating/',
'faq_scammers'=>'http://www.dotsilver.com/antiscam/'
);
$_url['js'] = $_url['site'].'inc/js/';
$_url['member'] = $_url['site'].'member/';
$_url['layouts'] = $_url['site'].'layouts/';
$_url['tour'] = $_url['site'].'tour/';
$_url['img'] = $_url['layouts'].$_site['layout'].'/themes/'.$_site['theme'].'/img/';
$_url['image_upload'] = "{$_url['site_url']}member/photos.php";
$_langs = array(
'English',
);
?>