Configuration problem, please help me!

Can some help me please, i have site and im getting this message -

’ The configuration did not recieve appropriate variables to accept your request. ’

Whats the problem.

This is my Config file

[php]<?

session_start ();

if (!$stop_eval)
{

global $c;
if(is_dir('install/'))
{
header("Location: install/");
}



if(defined('DB_DETAILS') && $c && !$error_log) {

if(!$_SESSION['setting'])
{
$setq = mysql_query("SELECT * FROM settings");
while($r=mysql_fetch_array($setq))
{
$set[$r[set_name]] = $r['set_value'];
$_SESSION['setting'][$r[set_name]] = $r['set_value'];
}
} else {
$set = $_SESSION['setting'];
}

if(!is_array($set))
{
 die("An error occured while trying to process the settings, Please re-

access the site later or consult the administrator.");
}


DEFINE('GEN4_PROCESS', true);

if($set['theme_active'])
{
DEFINE('THDIR', 'themes/'.$set['theme_active'].'/');
DEFINE('HEADER', 'themes/'.$set['theme_active'].'/t.php');
DEFINE('FOOTER', 'themes/'.$set['theme_active'].'/f.php');
} else {
DEFINE('THDIR', 'themes/default/');
DEFINE('HEADER', 'themes/default/t.php');
DEFINE('FOOTER', 'themes/default/f.php');
}

$signin_username = $_SESSION['account_username'];
$signin_password = $_SESSION['account_password'];
$signin_token = $_SESSION['account_token'];

$admin_username = $_SESSION['admin_username'];
$admin_password = $_SESSION['admin_password'];
$admin_token = $_SESSION['admin_token'];


if($admin_username && $admin_password && $admin_token == 

session_id())
{
$admin_loggedin = 1;
$aq = mysql_query("SELECT * FROM admins WHERE 

aUsername='{$admin_username}' AND aPassword='{$admin_password}' 

LIMIT 1;");
$ar = mysql_fetch_array($aq);
}

if($signin_username && $signin_password && $signin_token == 

session_id())
{
$loggedin = 1;
if($_SESSION['me'])
{
$ir=$_SESSION['me'];
} else {
$iqcn = mysql_query("SELECT COUNT(*) AS cnt FROM users WHERE 

username='{$signin_username}' AND password='{$signin_password}' 

AND suspended='0' LIMIT 1;");
$iqcn = mysql_fetch_array($iqcn);
$iqcn = $iqcn['cnt'];
if(!$iqcn) { $do->logout(); } else {
$iq = mysql_query("SELECT * FROM users WHERE 

username='{$signin_username}' AND password='{$signin_password}' 

AND suspended='0' LIMIT 1;");
$ir = mysql_fetch_array($iq);
$_SESSION['me'] = $ir;
}
}
}

} else {
die("The configuration did not recieve appropriate variables to accept 

your request.");
}

if ($set['next_clearup'] < time ())
{
  $next_clearup = time () + 60 * 60 * 24;
  mysql_query ('' . 'UPDATE settings SET set_value=\'' . $next_clearup . '\' WHERE set_name=\'next_clearup\' LIMIT 1;');
  mysql_query ('UPDATE users SET ads_clicked=\'\' WHERE ads_clicked!=\'\'');
}

}

?>[/php]

This line is evaluating to false and hence displaying your message you are receiving.

[php]if(defined(‘DB_DETAILS’) && $c && !$error_log) {[/php]

The line is testing three conditions, if anyone one of those conditions is false it will display that error message.

You’re job is to figure out which ones are evaluating to false and the dig deeper.

You can do this by putting this statement above the line in question.

[php]echo ‘
db_details:’ . defined(‘DB_DETAILS’);
echo ‘
c:’ . $c;
echo ‘
errorLog:’ . !$error_log;
exit;[/php]

That should tell you which ones are evaluating to false then exit the php code. Once you have that information you will know where to dig deeper.

I got this result

db_details:1
c:
errorLog:1

then $c is false or null

As JimL said, the c$ is what’s causing your issue.

I don’t know what c$ is for all I can see is that it’s a global variable.

if you change

[php]if(defined(‘DB_DETAILS’) && $c && !$error_log) {[/php]

to

[php]if(defined(‘DB_DETAILS’) && !$error_log) {[/php]

You will get different results, but I have no clue what c$ is for and what it’s used for.

Sponsor our Newsletter | Privacy Policy | Terms of Service