Jump to content
MakeWebGames

Cron Problem


skooda

Recommended Posts

Before you all read this yes I know how to format and I search the forum non of the results are not similiar to my issue.

The problem is when I put the cron in manually it work(Type in browser)

But when I put it in my cron job it dosnt update(I use 3diffent cron jobs form 3 different host)and it still dont work heres what formating.

 

curl http://gamename.com/******/cron_minute.php?code=****

 

curl www.gamename.com/******/cron_minute.php?code=****

 

http://gamename.com/******/cron_minute.php?code=****

 

www.gamename.com/******/cron_minute.php?code=****

 

curl gamename.com/******/cron_minute.php?code=****

 

gamename.com/******/cron_minute.php?code=****

 

I tryed them all and they dont work even tried wihout the code I dont what could be causing this.Heres the cron_minute file if thats needed.

<?php
include "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 users set hospital=hospital-1 WHERE hospital>0");
$db->query("UPDATE `users` SET jail=jail-1 WHERE `jail` > 0");
$hc=$db->num_rows($db->query("SELECT * FROM users WHERE hospital > 0"));
$jc=$db->num_rows($db->query("SELECT * FROM users WHERE jail > 0"));
$db->query("UPDATE settings SET conf_value='$hc' WHERE conf_name='hospital_count'");
$db->query("UPDATE settings SET conf_value='$jc' WHERE conf_name='jail_count'");
$db->query("UPDATE users SET maxmail=0 WHERE maxmail=1");
$db->query("UPDATE users SET cityclicks=0");
$db->query("UPDATE users SET maxcomment=0 WHERE maxcomment=1");
$db->query("UPDATE users SET maxforum=0 WHERE maxforum=1");
$db->query("update auctions set time=time-1",$c);
$qqq=$db->query("select * from auctions where time=0");
while($win=$db->fetch_row($qqq))
{

$time=$win['time'];
$item=$win['itemname'];
$winner=$win['bidder'];
$owner=$win['owner'];

$iname=$db->query("SELECT itmname FROM items WHERE itmid='{$item}'");
if($win['bids'] > 0)
{

$query = "insert into inventory VALUES('','$item','$winner','1')";
   $db->query($query);
$r=$db->query("SELECT username FROM users WHERE userid='$owner'");
$rr=$db->fetch_row($r);
$text = "You won {$rr['username']}s auction for \${$win['current']}";
$textt = "Your item was sold successfully on the auction market with {$win['bids']} bids. You have been paid \${$win['current']}";
$db->query("INSERT INTO events VALUES('','$winner',UNIX_TIMESTAMP(),0,'$text')");
$db->query("UPDATE users SET new_events=new_events+1 WHERE userid='$winner'");
$db->query("INSERT INTO events VALUES('','$owner',UNIX_TIMESTAMP(),0,'$textt')");
$db->query("UPDATE users SET new_events=new_events+1 WHERE userid='$owner'");
$dquery = "UPDATE users SET money=money+{$win['current']},auctionquota=auctionquota-1 WHERE userid='$owner'";
   $db->query($dquery);
}
if($win['bids'] == 0)
{
$texttt = "Your auction has ended with no bidders. Your item has been returned to your inventory.";
$db->query("INSERT INTO events VALUES('','$owner',UNIX_TIMESTAMP(),0,'$texttt')");
$db->query("UPDATE users SET new_events=new_events+1 WHERE userid='$owner'"); 

$winner=$win['owner'];


$deleted = "INSERT INTO inventory VALUES('','$item','$winner','1')";
$db->query($deleted);
}
}
$delete = ("DELETE FROM auctions WHERE time <= 0");
   $db->query($delete);
$db->query("UPDATE `users` SET `expire`=`expire`-1 WHERE `expire`>1");
$expired = $db->query("SELECT `userid`,`expire` FROM `users` WHERE `expire`=1");
while($ex=$db->fetch_row($expired))
{
$findout = $db->query("SELECT `strength`,`agility`,`guard` FROM `oldstats` WHERE `userid`=".$ex['userid']."");
$update = $db->fetch_row($findout);

$db->query("UPDATE `userstats` SET `agility`=".$update['agility'].",`strength`=".$update['strength'].",`guard`=".$update['guard']." WHERE `userid`=".$ex['userid']."");

$db->query("DELETE FROM `oldstats` WHERE `userid`=".$ex['userid']."");
$db->query("UPDATE `users` SET `expire`=0 WHERE `userid`=".$ex['userid']."");
$db->query("UPDATE `rehab` SET `rTIME`=`rTIME`-1 WHERE `rTIME`>0");
} 
?>
Link to comment
Share on other sites

for the code on OP, i will assume you have

 

http://gamename.com/******/cron_minute.php?code=****  /*your example*/

 

and looking at the code posted...

 

http://gamename.com/******/class/class_db_{$_CONFIG['driver']}.php

 

which leads me to think that this is pointing wrong...

wouldn't it be something more like...?

 

http://gamename.com/class/class_db_{$_CONFIG['driver']}.php
Link to comment
Share on other sites

for the code on OP, i will assume you have

 

http://gamename.com/******/cron_minute.php?code=****  /*your example*/

 

and looking at the code posted...

 

http://gamename.com/******/class/class_db_{$_CONFIG['driver']}.php

 

which leads me to think that this is pointing wrong...

wouldn't it be something more like...?

 

http://gamename.com/class/class_db_{$_CONFIG['driver']}.php

no it this

http://www.gamenamecom/iMpoRtAnT/cron_day.php?code=*********

Link to comment
Share on other sites

Or try the path to the cron

/usr/bin/php -q /home/usrname/public_html/cron_day.php?code=thisisnotneededjustputmeoutofhtewebroot

Note the command /usr/bin/php -q does depend on where php is installed so if your server host has installed it to/usr/lib/php then it will be that instead.

Speak to your host they would have been able to resolve this for you on the the same day

Link to comment
Share on other sites

Well you do not have something either setup correctly server wise or you have a issue in your code which Lithium has tried to point out to you. Or your not setting the cron command correctly.

So either post a script so the code can be seen.

Screenshot your cron entry in your control panel

Link to comment
Share on other sites

cronpic.png.jpg

Heres my cron job files

Cron_day

<?php

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

}

if(count($ids) > 0)

{

$db->query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")");

}

$db->query("DELETE FROM fedjail WHERE fed_days=0");

$db->query("UPDATE sbjail set sb_days=sb_days-1");

$q=$db->query("SELECT * FROM sbjail WHERE sb_days=0");

$ids=array();

while($r=$db->fetch_row($q))

{

$ids[]=$r['sb_userid'];

}

if(count($ids) > 0)

{

$db->query("UPDATE users SET banshout=0 WHERE userid IN(".implode(",", $ids).")");

}

$db->query("DELETE FROM sbjail WHERE sb_days=0");

$db->query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0");

$db->query("UPDATE users SET daysold=daysold+1, boxes_opened=0");

$db->query("UPDATE users SET reward_done=0");

$db->query("UPDATE bodyguard SET days=days-1");

$db->query("UPDATE userfarm SET ffertilized=0 WHERE ffertilized !=0");

$db->query("UPDATE userfarm SET age=age+1 WHERE age < 8");

$db->query("DELETE FROM userfarm WHERE age > 7");

$db->query("UPDATE rehab SET test=0 WHERE test !=0");

$db->query("UPDATE users SET rob=1");

$db->query("UPDATE gangaffliates SET ga_days=ga_days+1 WHERE ga_accept=1");

$db->query("DELETE FROM bodyguard WHERE days=0");

$db->query("UPDATE users SET gameturns=50");

$db->query("UPDATE users SET tired=0");

$db->query("UPDATE users SET smuggling=5 WHERE donatordays=0");

$db->query("UPDATE users SET smuggling=10 WHERE donatordays>0");

$db->query("UPDATE users SET turns=turns+25 WHERE donatordays=0");

$db->query("UPDATE users SET turns=turns+50 WHERE donatordays>0");

$db->query("UPDATE users SET mailban=mailban-1 WHERE mailban > 0");

$db->query("UPDATE users SET donatordays=donatordays-1 WHERE donatordays > 0");

$db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/100*2) where bankmoney>0 AND donatordays=0");

$db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*5) where cybermoney>0 AND donatordays=0");

$db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/100*4) where bankmoney>0 AND donatordays>0");

$db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*8) where cybermoney>0 AND donatordays>0");

$db->query("UPDATE users SET cdays=cdays-1 WHERE course > 0");

$q=$db->query("SELECT * FROM users WHERE cdays=0 AND course > 0");

while($r=$db->fetch_row($q))

{

$cd=$db->query("SELECT * FROM courses WHERE crID={$r['course']}");

$coud=$db->fetch_row($cd);

$userid=$r['userid'];

$db->query("INSERT INTO coursesdone VALUES({$r['userid']},{$r['course']})");

$upd="";

$ev="";

if($coud['crSTR'] > 0)

{

$upd.=",us.strength=us.strength+{$coud['crSTR']}";

$ev.=", {$coud['crSTR']} strength";

}

if($coud['crGUARD'] > 0)

{

$upd.=",us.guard=us.guard+{$coud['crGUARD']}";

$ev.=", {$coud['crGUARD']} guard";

}

if($coud['crLABOUR'] > 0)

{

$upd.=",us.labour=us.labour+{$coud['crLABOUR']}";

$ev.=", {$coud['crLABOUR']} labour";

}

if($coud['crAGIL'] > 0)

{

$upd.=",us.agility=us.agility+{$coud['crAGIL']}";

$ev.=", {$coud['crAGIL']} agility";

}

if($coud['crIQ'] > 0)

{

$upd.=",us.IQ=us.IQ+{$coud['crIQ']}";

$ev.=", {$coud['crIQ']} IQ";

}

$ev=substr($ev,1);

if ($upd) {

$db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.userid=us.userid $upd WHERE u.userid=$userid");

}

$db->query("INSERT INTO events VALUES('',$userid,unix_timestamp(),0,'Congratulations, you completed the {$coud['crNAME']} and gained $ev!')");

$db->query("UPDATE users SET new_events=new_events+1 WHERE userid=$userid");

}

$db->query("UPDATE users SET course=0 WHERE cdays=0");

$db->query("TRUNCATE TABLE usrate;");

$db->query("UPDATE pets SET petAGE=petAGE+1");

$db->query("UPDATE pets SET petSPECIAL=0");

$db->query("UPDATE pets SET petPREGDAYS=petPREGDAYS-1 WHERE petPREG=1 AND petPREGDAYS!=0");

$zzz=$db->query("SELECT * FROM pets WHERE petPREG=1 AND petPREGDAYS=0");

$zz=$db->fetch_row($zzz);

$chance=rand(1,2);

if($chance == 1)

{

$gender='Male';

}

else

{

$gender='Female';

}

$db->query("INSERT INTO pets VALUES('','{$zz['petOWNER']}','$gender','Unnamed','Dog',1,0,10,100,100,10,0,100,100,100,0,0,0)");

$db->query("UPDATE pets SET petPREG=0 WHERE petPREGDAYS=0");

$t=$db->query("SELECT * FROM referals");

while($ref=$db->fetch_row($t))

{

$u=$db->query("SELECT * FROM users WHERE userid={$ref['refREFED']}");

$user=$db->fetch_row($u);

$db->query("UPDATE referals SET refLEVEL={$user['level']} WHERE refREFER={$ref['refREFER']} AND refREFED={$ref['refREFED']}");

if($ref['refLEVEL'] > 4 && $ref['refBONUS'] == 0)

{

$db->query("UPDATE users SET crystals=crystals+30,points=points+1, turns=turns+50 WHERE userid={$ref['refREFER']}");

$db->query("UPDATE referals SET refBONUS=1 WHERE refREFER={$ref['refREFER']} AND refREFED={$ref['refREFED']}");

event_add($ref['refREFER'],"Your referal, <a href='viewuser.php?u={$user['userid']}'>{$user['username']}</a>, has reach level 5, you have been awarded 30 crystals, 50 street steps and 1 point.",$c);

}

if($ref['refLEVEL'] > 19 && $ref['refBONUS'] == 1)

{

$db->query("UPDATE users SET crystals=crystals+50,points=points+5, turns=turns+75 WHERE userid={$ref['refREFER']}");

$db->query("UPDATE referals SET refBONUS=2 WHERE refREFER={$ref['refREFER']} AND refREFED={$ref['refREFED']}");

event_add($ref['refREFER'],"Your referal, <a href='viewuser.php?u={$user['userid']}'>{$user['username']}</a>, has reach level 500, you have been awarded 50 crystals, 70 street steps and 5 point.",$c);

}

if($ref['refLEVEL'] > 29 && $ref['refBONUS'] == 2)

{

$db->query("UPDATE users SET crystals=crystals+75,points=points+8, turns=turns+95 WHERE userid={$ref['refREFER']}");

$db->query("UPDATE referals SET refBONUS=3 WHERE refREFER={$ref['refREFER']} AND refREFED={$ref['refREFED']}");

event_add($ref['refREFER'],"Your referal, <a href='viewuser.php?u={$user['userid']}'>{$user['username']}</a>, has reach level 750, you have been awarded 75 crystals, 95 street steps and 8 point.",$c);

}

if($ref['refLEVEL'] > 49 && $ref['refBONUS'] == 3)

{

$db->query("UPDATE users SET crystals=crystals+100,points=points+13, turns=turns+120 WHERE userid={$ref['refREFER']}");

$db->query("UPDATE referals SET refBONUS=4 WHERE refREFER={$ref['refREFER']} AND refREFED={$ref['refREFED']}");

event_add($ref['refREFER'],"Your referal, <a href='viewuser.php?u={$user['userid']}'>{$user['username']}</a>, has reach level 1000, you have been awarded 100 crystals, 120 street steps and 13 point.",$c);

}

if($ref['refLEVEL'] > 69 && $ref['refBONUS'] == 4)

{

$db->query("UPDATE users SET crystals=crystals+150,points=points+18, turns=turns+180 WHERE userid={$ref['refREFER']}");

$db->query("UPDATE referals SET refBONUS=5 WHERE refREFER={$ref['refREFER']} AND refREFED={$ref['refREFED']}");

event_add($ref['refREFER'],"Your referal, <a href='viewuser.php?u={$user['userid']}'>{$user['username']}</a>, has reach level 2000, you have been awarded 150 crystals, 180 street steps and 18 point.",$c);

}

if($ref['refLEVEL'] > 89 && $ref['refBONUS'] == 5)

{

$db->query("UPDATE users SET crystals=crystals+200,points=points+21, turns=turns+240 WHERE userid={$ref['refREFER']}");

$db->query("UPDATE referals SET refBONUS=6 WHERE refREFER={$ref['refREFER']} AND refREFED={$ref['refREFED']}");

event_add($ref['refREFER'],"Your referal, <a href='viewuser.php?u={$user['userid']}'>{$user['username']}</a>, has reach level 3500, you have been awarded 200 crystals, 240 street steps and 21 point.",$c);

}

if($ref['refLEVEL'] > 99 && $ref['refBONUS'] == 6)

{

$db->query("UPDATE users SET crystals=crystals+250,points=points+25, turns=turns+325 WHERE userid={$ref['refREFER']}");

$db->query("UPDATE referals SET refBONUS=7 WHERE refREFER={$ref['refREFER']} AND refREFED={$ref['refREFED']}");

event_add($ref['refREFER'],"Your referal, <a href='viewuser.php?u={$user['userid']}'>{$user['username']}</a>, has reach level 5000, you have been awarded 250 crystals, 325 street steps and 25 point.",$c);

}

}

?>

 

Cron fivemins

<?php

include "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;

$set=array();

$settq=$db->query("SELECT * FROM settings");

while($r=$db->fetch_row($settq))

{

$set[$r['conf_name']]=$r['conf_value'];

}

//brave update

$query="UPDATE users SET brave=brave+((maxbrave/10)+0.5) WHERE brave<maxbrave ";

$query2="UPDATE users SET brave=maxbrave WHERE brave>maxbrave";

$query3="UPDATE users SET hp=hp+(maxhp/3) WHERE hp<maxhp";

$query4="UPDATE users SET hp=maxhp WHERE hp>maxhp";

$db->query($query);

$db->query($query2);

$db->query($query3);

$db->query($query4);

//enerwill update

$query6="UPDATE users SET dexterity=dexterity+(maxdexterity/(12.5)) WHERE dexterity<maxdexterity AND donatordays=0";

$query8="UPDATE users SET dexterity=dexterity+(maxdexterity/(6)) WHERE dexterity<maxdexterity AND donatordays>0";

$query7="UPDATE users SET dexterity=maxdexterity WHERE dexterity > maxdexterity";

$query="UPDATE users SET energy=energy+(maxenergy/(12.5)) WHERE energy<maxenergy AND donatordays=0";

$query5="UPDATE users SET energy=energy+(maxenergy/(6)) WHERE energy<maxenergy AND donatordays>0";

$query2="UPDATE users SET energy=maxenergy WHERE energy>maxenergy";

$db->query($query);

$db->query($query6);

$db->query($query7);

$db->query($query8);

$db->query($query5);

$db->query($query2);

$query24="UPDATE users SET will=will+(maxwill/(3)) WHERE will<maxwill AND donatordays=0";

$query45="UPDATE users SET will=will+(maxwill/(4)) WHERE will<maxwill AND donatordays>0";

$query4="UPDATE users SET will=maxwill WHERE will>maxwill";

$db->query($query24);

$db->query($query45);

$db->query($query4);

if($set['validate_period'] == 5 && $set['validate_on'])

{

$db->query("UPDATE users SET verified=0");

}

if($set['validate_period'] == 15 && $set['validate_on'] && in_array(date('i'),array("00", "15", "30", "45")))

{

$db->query("UPDATE users SET verified=0");

}

$stocks = mysql_query("SELECT stockID FROM `stock_stocks`");

while($soc = mysql_fetch_assoc($stocks)) {

$rand = mt_rand(1,2);

if($rand == 2) {

$mr = mt_rand(10,25);

mysql_query("UPDATE `stock_stocks` SET `stockUD` = 2, `stockCHANGE` = ".$mr.", `stockNPRICE` = (`stockNPRICE` - ".$mr.") WHERE `stockID` = ".$soc['stockID']);

}

else {

$mr = mt_rand(10,25);

mysql_query("UPDATE `stock_stocks` SET `stockUD` = 1, `stockCHANGE` = ".$mr.", `stockNPRICE` = (`stockNPRICE` + ".$mr.") WHERE `stockID` = ".$soc['stockID']);

}

}

include_once('global_func.php');

$sel = mysql_query("SELECT stockID,stockNAME FROM `stock_stocks` WHERE `stockNPRICE` < 0");

while($soc = mysql_fetch_assoc($sel)) {

if(mysql_num_rows(mysql_query("SELECT holdingID FROM `stock_holdings` WHERE `holdingSTOCK` = ".$soc['stockID']))) {

$user = mysql_query("SELECT holdingUSER FROM `stock_holdings` WHERE `holdingSTOCK` = ".$soc['stockID']);

$user = mysql_fetch_assoc($user);

event_add($user['holdingUSER'], 'Stock '.$soc['stockNAME'].' crashed, you lost all your shares.');

}

mysql_query("DELETE FROM `stock_holdings` WHERE `holdingSTOCK` = ".$soc['stockID']);

mysql_query("UPDATE `stock_stocks` SET `stockUD` = 1,`stockCHANGE` = 0,`stockNPRICE` = `stockOPRICE` WHERE `stockID` = ".$soc['stockID']);

}

$db->query("UPDATE users SET bounty=0");

$query4 = "UPDATE users SET power=power+(maxpower/(12.5)) WHERE power<maxpower AND donatordays='0'";

$query5 = "UPDATE users SET power=power+(maxpower/(6)) WHERE power<maxpower AND donatordays>'0'";

$query11="UPDATE users SET power=maxpower WHERE power>maxpower";

$db->query($query4);

$db->query($query5);

$db->query($query11);

?>

 

<?php

include "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 users set hospital=hospital-1 WHERE hospital>0");

$db->query("UPDATE `users` SET jail=jail-1 WHERE `jail` > 0");

$hc=$db->num_rows($db->query("SELECT * FROM users WHERE hospital > 0"));

$jc=$db->num_rows($db->query("SELECT * FROM users WHERE jail > 0"));

$db->query("UPDATE settings SET conf_value='$hc' WHERE conf_name='hospital_count'");

$db->query("UPDATE settings SET conf_value='$jc' WHERE conf_name='jail_count'");

$db->query("UPDATE users SET maxmail=0 WHERE maxmail=1");

$db->query("UPDATE users SET cityclicks=0");

$db->query("UPDATE users SET maxcomment=0 WHERE maxcomment=1");

$db->query("UPDATE users SET maxforum=0 WHERE maxforum=1");

$db->query("update auctions set time=time-1",$c);

$qqq=$db->query("select * from auctions where time=0");

while($win=$db->fetch_row($qqq))

{

$time=$win['time'];

$item=$win['itemname'];

$winner=$win['bidder'];

$owner=$win['owner'];

$iname=$db->query("SELECT itmname FROM items WHERE itmid='{$item}'");

if($win['bids'] > 0)

{

$query = "insert into inventory VALUES('','$item','$winner','1')";

$db->query($query);

$r=$db->query("SELECT username FROM users WHERE userid='$owner'");

$rr=$db->fetch_row($r);

$text = "You won {$rr['username']}s auction for \${$win['current']}";

$textt = "Your item was sold successfully on the auction market with {$win['bids']} bids. You have been paid \${$win['current']}";

$db->query("INSERT INTO events VALUES('','$winner',UNIX_TIMESTAMP(),0,'$text')");

$db->query("UPDATE users SET new_events=new_events+1 WHERE userid='$winner'");

$db->query("INSERT INTO events VALUES('','$owner',UNIX_TIMESTAMP(),0,'$textt')");

$db->query("UPDATE users SET new_events=new_events+1 WHERE userid='$owner'");

$dquery = "UPDATE users SET money=money+{$win['current']},auctionquota=auctionquota-1 WHERE userid='$owner'";

$db->query($dquery);

}

if($win['bids'] == 0)

{

$texttt = "Your auction has ended with no bidders. Your item has been returned to your inventory.";

$db->query("INSERT INTO events VALUES('','$owner',UNIX_TIMESTAMP(),0,'$texttt')");

$db->query("UPDATE users SET new_events=new_events+1 WHERE userid='$owner'");

$winner=$win['owner'];

 

$deleted = "INSERT INTO inventory VALUES('','$item','$winner','1')";

$db->query($deleted);

}

}

$delete = ("DELETE FROM auctions WHERE time <= 0");

$db->query($delete);

$db->query("UPDATE `users` SET `expire`=`expire`-1 WHERE `expire`>1");

$expired = $db->query("SELECT `userid`,`expire` FROM `users` WHERE `expire`=1");

while($ex=$db->fetch_row($expired))

{

$findout = $db->query("SELECT `strength`,`agility`,`guard` FROM `oldstats` WHERE `userid`=".$ex['userid']."");

$update = $db->fetch_row($findout);

$db->query("UPDATE `userstats` SET `agility`=".$update['agility'].",`strength`=".$update['strength'].",`guard`=".$update['guard']." WHERE `userid`=".$ex['userid']."");

$db->query("DELETE FROM `oldstats` WHERE `userid`=".$ex['userid']."");

$db->query("UPDATE `users` SET `expire`=0 WHERE `userid`=".$ex['userid']."");

$db->query("UPDATE `rehab` SET `rTIME`=`rTIME`-1 WHERE `rTIME`>0");

}

?>

Link to comment
Share on other sites

So now going back to what both Lithium and HD stated to you.

Where are the crons in relation to your class_db and config file!!

According to a previous post you made you have put them in iMpoRtAnt (really do you think that really stops people from finding them lol)

But your cron script is looking for class/class_db

Which is incorrect. Is your directory structure like this?

home/username/public_html/iMpoRtAnt/class

or like this

home/username/public_html/class

BTW if you had set an email for crons then you would have been sent an error output saying just that ;)

Seriously though just remove the important nonsense directory. Make a directory called crons out of the wwwroot so

/home/username/crons

Place all your crons in there

Then amend your crons so it looks like this.

 

require "/home/username/public_html/global_func.php";include "/home/username/public_html/config.php";


global $_CONFIG;
//if($_GET['code'] != $_CONFIG['code']) { die(""); } you dont need this rubbish its a false sense of security
define("MONO_ON", 1);
require "/home/username/public_html/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;


$Set = array();
$SelectSettings = $db->query("SELECT `conf_name`, `conf_value` FROM `settings`");
while($r = $db->fetch_row($SelectSettings))
{
 $Set[$r['conf_name']] = $r['conf_value'];
}


 

Run the crons OUT of the wwwroot getting rid of the ?code=lalalalalalathisisjustdumb

Set your crons to run /usr/bin/php -q /home/username/crons/cron_min.php

Job done.

Link to comment
Share on other sites

home/username/public_html/iMpoRtAnt/class

or like this

home/username/public_html/class.

Both

Also is this correct

<?php
require "/home/username/public_html/global_func.php";include "/home/username/public_html/config.php";


global $_CONFIG;
//if($_GET['code'] != $_CONFIG['code']) { die(""); } you dont need this rubbish its a false sense of security
define("MONO_ON", 1);
require "/home/username/public_html/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;


$Set = array();
$SelectSettings = $db->query("SELECT `conf_name`, `conf_value` FROM `settings`");
while($r = $db->fetch_row($SelectSettings))
{
 $Set[$r['conf_name']] = $r['conf_value'];
}
$db->query("UPDATE users set hospital=hospital-1 WHERE hospital>0");
$db->query("UPDATE `users` SET jail=jail-1 WHERE `jail` > 0");
$hc=$db->num_rows($db->query("SELECT * FROM users WHERE hospital > 0"));
$jc=$db->num_rows($db->query("SELECT * FROM users WHERE jail > 0"));
$db->query("UPDATE settings SET conf_value='$hc' WHERE conf_name='hospital_count'");
$db->query("UPDATE settings SET conf_value='$jc' WHERE conf_name='jail_count'");
$db->query("UPDATE users SET maxmail=0 WHERE maxmail=1");
$db->query("UPDATE users SET cityclicks=0");
$db->query("UPDATE users SET maxcomment=0 WHERE maxcomment=1");
$db->query("UPDATE users SET maxforum=0 WHERE maxforum=1");
$db->query("update auctions set time=time-1",$c);
$qqq=$db->query("select * from auctions where time=0");
while($win=$db->fetch_row($qqq))
{

$time=$win['time'];
$item=$win['itemname'];
$winner=$win['bidder'];
$owner=$win['owner'];

$iname=$db->query("SELECT itmname FROM items WHERE itmid='{$item}'");
if($win['bids'] > 0)
{

$query = "insert into inventory VALUES('','$item','$winner','1')";
   $db->query($query);
$r=$db->query("SELECT username FROM users WHERE userid='$owner'");
$rr=$db->fetch_row($r);
$text = "You won {$rr['username']}s auction for \${$win['current']}";
$textt = "Your item was sold successfully on the auction market with {$win['bids']} bids. You have been paid \${$win['current']}";
$db->query("INSERT INTO events VALUES('','$winner',UNIX_TIMESTAMP(),0,'$text')");
$db->query("UPDATE users SET new_events=new_events+1 WHERE userid='$winner'");
$db->query("INSERT INTO events VALUES('','$owner',UNIX_TIMESTAMP(),0,'$textt')");
$db->query("UPDATE users SET new_events=new_events+1 WHERE userid='$owner'");
$dquery = "UPDATE users SET money=money+{$win['current']},auctionquota=auctionquota-1 WHERE userid='$owner'";
   $db->query($dquery);
}
if($win['bids'] == 0)
{
$texttt = "Your auction has ended with no bidders. Your item has been returned to your inventory.";
$db->query("INSERT INTO events VALUES('','$owner',UNIX_TIMESTAMP(),0,'$texttt')");
$db->query("UPDATE users SET new_events=new_events+1 WHERE userid='$owner'"); 

$winner=$win['owner'];


$deleted = "INSERT INTO inventory VALUES('','$item','$winner','1')";
$db->query($deleted);
}
}
$delete = ("DELETE FROM auctions WHERE time <= 0");
   $db->query($delete);
$db->query("UPDATE `users` SET `expire`=`expire`-1 WHERE `expire`>1");
$expired = $db->query("SELECT `userid`,`expire` FROM `users` WHERE `expire`=1");
while($ex=$db->fetch_row($expired))
{
$findout = $db->query("SELECT `strength`,`agility`,`guard` FROM `oldstats` WHERE `userid`=".$ex['userid']."");
$update = $db->fetch_row($findout);

$db->query("UPDATE `userstats` SET `agility`=".$update['agility'].",`strength`=".$update['strength'].",`guard`=".$update['guard']." WHERE `userid`=".$ex['userid']."");

$db->query("DELETE FROM `oldstats` WHERE `userid`=".$ex['userid']."");
$db->query("UPDATE `users` SET `expire`=0 WHERE `userid`=".$ex['userid']."");
$db->query("UPDATE `rehab` SET `rTIME`=`rTIME`-1 WHERE `rTIME`>0");
} 
?>
Link to comment
Share on other sites

o sorry I have php but nothing is installed is their any certain application that need to be install

EX-PHP Extension(s) and Application(s) Available for Installation

Module Name    Description    Actions
Archive_Tar (1.3.10)    Tar file management class    Install Show Docs
Archive_Zip (0.1.2)    Zip file archiving management class    Install Show Docs
Auth (1.6.4)    Creating an authentication system.    Install Show Docs
Auth_HTTP (2.1.8)    HTTP authentication    Install Show Docs
Auth_PrefManager (1
.2.1)    Preferences management class    Install Show Docs
Auth_PrefManager2 (
2.0.0dev1)    Preferences management class    Install Show Docs
Auth_RADIUS (1.0.7)    Wrapper Classes for the RADIUS PECL.    Install Show Docs
Auth_SASL (1.0.6)    Abstraction of various SASL mechanism responses    Install Show Docs
Auth_SASL2 (0.1.0)    Abstraction of various SASL mechanism responses.    Install Show Docs
Benchmark (1.2.9)    Framework to benchmark PHP scripts or function calls.    Install Show Docs
Cache (1.5.6)    Framework for caching of arbitrary data.    Install Show Docs
Cache_Lite (1.7.12)    Fast and Safe little cache system    Install Show Docs
Calendar (0.5.5)    A package for building Calendar data structures (irrespect
ive of output)    Install Show Docs
CodeGen (1.0.7)    Tool to create Code generaters that operate on XML descrip
tions    Install Show Docs
CodeGen_MySQL (1.0.
0RC1)    Abstract base package for MySQL code generators    Install Show Docs
CodeGen_MySQL_Plugi
n (0.9.2)    Tool to generate MySQL Pugins from an XML description    Install Show Docs
CodeGen_MySQL_UDF (
1.0.0RC1)    Tool to generate MySQL UDF extensions from an XML descript
ion    Install Show Docs
CodeGen_PECL (1.1.3)    Tool to generate PECL extensions from an XML description    Install Show Docs
Config (1.10.12)    Your configuration's swiss-army knife.    Install Show Docs
Config_Lite (0.1.2)    a lightweight and fast Config class for ini style text con
figuration files.    Install Show Docs
Console_Color (1.0.3)    This Class allows you to easily use ANSI console colors in
your application.    Install Show Docs
Console_Color2 (0.1
.1)    This Class allows you to easily use ANSI console colors in
your application.    Install Show Docs
Console_CommandLine
(1.1.3)    A full featured command line options and arguments parser    Install Show Docs
Console_Getargs (1.
3.5)    A command-line arguments parser    Install Show Docs
Console_Getopt (1.3
.1)    Command-line option parser    Install Show Docs
Console_GetoptPlus 
(1.0.0RC1)    Command-line option parser - Console Getopt+ (Getopt Plus)    Install Show Docs
Console_ProgressBar
(0.5.2beta)    This class provides you with an easy-to-use interface to p
rogress bars.    Install Show Docs
Console_Table (1.1.4)    Class that makes it easy to build console style tables    Install Show Docs
Contact_AddressBook
(0.5.1)    Address book export-import class    Install Show Docs
Contact_Vcard_Build
(1.1.2)    Build (create) and fetch vCard 2.1 and 3.0 text blocks.    Install Show Docs
Contact_Vcard_Parse
(1.32.0)    Parse vCard 2.1 and 3.0 files.    Install Show Docs
Crypt_Blowfish (1.1
.0RC2)    Allows for quick two-way blowfish encryption without requi
ring the MCrypt PHP extension.    Install Show Docs
Crypt_CBC (1.0.1)    A class to emulate Perl's Crypt::CBC module.    Install Show Docs
Crypt_CHAP (1.5.0)    Generating CHAP packets.    Install Show Docs
Crypt_DiffieHellman
(0.2.6)    Implementation of Diffie-Hellman Key Exchange cryptographi
c protocol for PHP5    Install Show Docs
Crypt_GPG (1.3.2)    GNU Privacy Guard (GnuPG)    Install Show Docs
Crypt_HMAC (1.0.1)    A class to calculate RFC 2104 compliant hashes.    Install Show Docs
Crypt_HMAC2 (1.0.0)    Implementation of Hashed Message Authentication Code for P
HP5    Install Show Docs
Crypt_MicroID (0.1.0)    PHP MicroID library.    Install Show Docs
Crypt_RC4 (1.0.3)    Encryption class for RC4 encryption.    Install Show Docs
Crypt_RC42 (0.9.0)    Encryption class for RC4 encryption for PHP 5    Install Show Docs
Crypt_RSA (1.2.1)    Provides RSA-like key generation, encryption/decryption, s
igning and signature checking.    Install Show Docs
Crypt_Xtea (1.1.0)    A class that implements the Tiny Encryption Algorithm (TEA
) (New Variant).    Install Show Docs
Crypt_XXTEA (0.9.0)    An implementation of the XXTEA encryption algorithm. NOTIC
E: unregular default behavior.    Install Show Docs
Date (1.5.0a2)    Generic date/time handling class for PEAR    Install Show Docs
Date_Holidays (0.21
.6)    Driver based class to calculate holidays.    Install Show Docs
Date_Holidays_Austr
alia (0.2.1)    Driver based class to calculate holidays in Australia.    Install Show Docs
Date_Holidays_Austr
ia (0.1.4)    Driver based class to calculate holidays in Austria.    Install Show Docs
Date_Holidays_Brazi
l (0.1.2)    Driver based class to calculate holidays in Brazil.    Install Show Docs
Date_Holidays_Croat
ia (0.1.1)    Driver based class to calculate holidays in Croatia.    Install Show Docs
Date_Holidays_Denma
rk (0.1.3)    Driver based class to calculate holidays in Denmark.    Install Show Docs
Date_Holidays_Disco
rdian (0.1.1)    Driver based class to calculate Discordian holidays.    Install Show Docs
Date_Holidays_Engla
ndWales (0.1.4)    Driver based class to calculate holidays in England and Wa
les.    Install Show Docs
Date_Holidays_Finla
nd (0.1.2)    Driver based class to calculate holidays in Finland.    Install Show Docs
Date_Holidays_Germa
ny (0.1.2)    Driver based class to calculate holidays in Germany.    Install Show Docs
Date_Holidays_Icela
nd (0.1.2)    Driver based class to calculate holidays in Iceland.    Install Show Docs
Date_Holidays_Irela
nd (0.1.3)    Driver based class to calculate holidays in Ireland.    Install Show Docs
Date_Holidays_Italy
(0.1.1)    Driver based class to calculate holidays in Italy.    Install Show Docs
Date_Holidays_Japan
(0.1.2)    Driver based class to calculate holidays in Japan.    Install Show Docs
Date_Holidays_Nethe
rlands (0.1.2)    Driver based class to calculate holidays in the Netherlands.    Install Show Docs
Date_Holidays_Norwa
y (0.1.2)    Driver based class to calculate holidays in Norway.    Install Show Docs
Date_Holidays_PHPdo
tNet (0.1.2)    Driver based class to calculate birthdays of some members 
of the PHP.net community.    Install Show Docs
Date_Holidays_Portu
gal (0.1.0)    Driver based class to calculate holidays in Portugal.    Install Show Docs
Date_Holidays_Roman
ia (0.1.2)    Driver based class to calculate holidays in Romania.    Install Show Docs
Date_Holidays_SanMa
rino (0.1.1)    Driver based class to calculate holidays in San Marino.    Install Show Docs
Date_Holidays_Slove
nia (0.1.2)    Driver based class to calculate holidays in Slovenia.    Install Show Docs
Date_Holidays_Spain
(0.1.3)    Driver based class to calculate holidays in Spain.    Install Show Docs
Date_Holidays_Swede
n (0.1.3)    Driver based class to calculate holidays in Sweden.    Install Show Docs
Date_Holidays_Ukrai
ne (0.1.2)    Driver based class to calculate holidays in the Ukraine.    Install Show Docs
Date_Holidays_UNO (
0.1.3)    Driver based class to calculate holidays in UNO.    Install Show Docs
Date_Holidays_USA (
0.1.1)    Driver based class to calculate holidays in USA.    Install Show Docs
Date_Holidays_Venez
uela (0.1.1)    Driver based class to calculate holidays in Venezuela.    Install Show Docs
DB (1.7.14)    Database Abstraction Layer    Install Show Docs
DBA (1.1.1)    Berkely-style database abstraction class    Install Show Docs
DBA_Relational (0.2
.0)    Berkely-style database abstraction class    Install Show Docs
DB_ado (1.3.1)    DB driver which use MS ADODB library    Install Show Docs
DB_DataObject (1.9.6)    An SQL Builder, Object Interface to Database Tables    Install Show Docs
DB_DataObject_FormB
uilder (1.0.2)    Class to automatically build HTML_QuickForm objects from a
DB_DataObject-derived class    Install Show Docs
DB_ldap (1.2.1)    DB interface to LDAP server    Install Show Docs
DB_ldap2 (0.5.1)    DB drivers for LDAP v2 and v3 database    Install Show Docs
DB_NestedSet (1.4.1)    API to build and query nested sets    Install Show Docs
DB_odbtp (1.0.4)    DB interface for ODBTP    Install Show Docs
DB_Pager (0.7.2)    Retrieve and return information of database result sets    Install Show Docs
DB_QueryTool (1.1.2)    An OO-interface for easily retrieving and modifying data i
n a DB.    Install Show Docs
DB_Sqlite_Tools (0.
1.7)    DB_Sqlite_Tools is an object oriented interface to effecti
vely manage and backup Sqlite databases.    Install Show Docs
DB_Table (1.5.6)    An object oriented interface to, and model of, a database.
Integrates with HTML_QuickForm.    Install Show Docs
Event_Dispatcher (1
.1.0)    Dispatch notifications using PHP callbacks    Install Show Docs
Event_SignalEmitter
(0.3.2)    Generic signal emitting class with the same API as GObject.    Install Show Docs
File (1.4.1)    Common file and directory routines    Install Show Docs
File_Archive (1.5.5)    File_Archive will let you manipulate easily the tar, gz, t
gz, bz2, tbz, zip, ar (or deb) files    Install Show Docs
File_Bittorrent (1.
1.0)    Decode and Encode data in Bittorrent format    Install Show Docs
File_Bittorrent2 (1
.3.1)    Decode and Encode data in Bittorrent format    Install Show Docs
File_Cabinet (0.1.0)    Microsoft Cabinet file extraction using either cabextract 
or expand    Install Show Docs
File_CSV (1.0.0)    Read and write of CSV files    Install Show Docs
File_CSV_DataSource
(1.0.1)    Simple data access object for csv files in php5.    Install Show Docs
File_DeliciousLibra
ry (0.1.1)    Parser for the library database of the Delicious Library s
oftware.    Install Show Docs
File_DICOM (0.3)    Package for reading and modifying DICOM files    Install Show Docs
File_DNS (0.1.0)    Manipulate RFC1033-style DNS Zonefiles    Install Show Docs
File_Find (1.3.1)    A Class the facilitates the search of filesystems    Install Show Docs
File_Fortune (1.0.0)    File_Fortune provides an interface for reading from and wr
iting to fortune files.    Install Show Docs
Edited by Djkanna
Code tags.
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.

×
×
  • Create New...