ashstyx Posted January 8, 2012 Share Posted January 8, 2012 hello, im not sure where i should post this but i need help with cron jobs i am using the Plesk control panel and ive added the crons to the crontab but i get this error PHP Fatal error: require(): Failed opening required '../class/class_db_.php' (include_path='.:') in /var/www/vhosts/dclxvi.co.uk/httpdocs/cron_day.php on line 6 please someone help me as my game wont work without the crons working i have version 2.5 but it downloaded with the name redux so thats what i used for this post's prefix dclxvi.co.uk thankyou Quote Link to comment Share on other sites More sharing options...
ashstyx Posted January 8, 2012 Author Share Posted January 8, 2012 the 1st 20 lines of cron_day.php <?php include_once ('../Global/config.php'); global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "../class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $db->query("UPDATE fedjail set fed_days=fed_days-1"); $q=$db->query("SELECT * FROM fedjail WHERE fed_days=0"); $ids=array(); while($r=$db->fetch_row($q)) { $ids[]=$r['fed_userid']; Quote Link to comment Share on other sites More sharing options...
Nickson Posted January 8, 2012 Share Posted January 8, 2012 Redux is the codename for mcc v2.5, no need to worry about that. PHP Fatal error: require(): Failed opening required '../class/class_db_.php' (include_path='.:') in /var/www/vhosts/dclxvi.co.uk/httpdocs/cron_day.php on line 6 The php interpreter can not find the correct database class. I'm quite sure your folder contains both the class_db_mysql.php and class_db_mysqli.php file, but if you read the error properly, you will notice it will only say /class_db_.php. This means {$_CONFIG['driver']} isn't doing what it should. Check config.php to make sure this value has been set to either mysql or mysqli 'driver' => 'mysql' Quote Link to comment Share on other sites More sharing options...
ashstyx Posted January 8, 2012 Author Share Posted January 8, 2012 (edited) 'driver' => 'mysql', is what it says :/ and the class_db_mysql.php and class_db_mysqli.php files are in there separate folder called class Edited January 8, 2012 by ashstyx Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.