Jump to content
MakeWebGames

help with crons


ashstyx
 Share

Recommended Posts

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

Link to comment
Share on other sites

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'];

Link to comment
Share on other sites

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'
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...