amplec
New Member
- Messages
- 9
- Reaction score
- 0
- Points
- 0
My site is showing: Warning: shell_exec() has been disabled for security reasons in /home/kamal/public_html/lib/lib_functions.php on line 12
1046: No database selected
My database details:
DEFINE('DB_DETAILS', true);
DEFINE('DB_HOST', "localhost");
DEFINE('DB_USER', "kamal_admin");
DEFINE('DB_PASS', "*****");
DEFINE('DB_NAME', "kamal_kamal");
The functions.php is as bellows. Can anyone please fix this.
1046: No database selected
My database details:
DEFINE('DB_DETAILS', true);
DEFINE('DB_HOST', "localhost");
DEFINE('DB_USER', "kamal_admin");
DEFINE('DB_PASS', "*****");
DEFINE('DB_NAME', "kamal_kamal");
The functions.php is as bellows. Can anyone please fix this.
PHP:
<?
/*
GEN2 PTC SCRIPT, A copyrighted trademark of PTCPay.com 2007-2008. DISTRIBUTED UNDER GNU GENERAL PUBLIC LICENSE.
"Gen2PTC", "PTCPay" are a copyrighted service of PTCPay.com. All other respective trademarks remain a respectable licensed product of it's original creator.
This file is a partial script from the Gen2PTC webscript which is open source and distributed through GNU PUBLIC LICENSE; This software remains copyrighted and any sign of unauthorised abuse will result in PTCPay taking action.
http://www.ptcpay.com/
*/
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");
// false is returned if something goes wront, not a result resource
if (!$setq) {
echo mysql_errno() . ': ' . mysql_error();
exit;
}
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('GEN2_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!=\'\'');
}
}
?>
Last edited: