king2k5
02-25-2008, 07:23 PM
Ugh.. i hate crons.. i dont understand why i can never get it right the first time.. I have a cron set up, and the php file looks like this:
$db = mysql_connect("localhost","---","---");
mysql_select_db("soverei_testround",$db);
$result = mysql_query("UPDATE userinf SET land=land+'1' WHERE username='King2k5' ", $db);
Thats all thats in the file because i just want to test it out first...
i have it set to occur every minute, to make for faster testing, and it does trigger every minute, but its not working. I get this in the email from cron:
/var/www/vhosts/playsovereignty.com/httpdocs/strat/updatething.php: line 1: ?
: No such file or directory
/var/www/vhosts/playsovereignty.com/httpdocs/strat/updatething.php: line 2:
: command not found
/var/www/vhosts/playsovereignty.com/httpdocs/strat/updatething.php: line 3: syntax error near unexpected token `('
/var/www/vhosts/playsovereignty.com/httpdocs/strat/updatething.php: line 3: `$db = mysql_connect("localhost","---","---");
'
What could be wrong? any pointers would be great
$db = mysql_connect("localhost","---","---");
mysql_select_db("soverei_testround",$db);
$result = mysql_query("UPDATE userinf SET land=land+'1' WHERE username='King2k5' ", $db);
Thats all thats in the file because i just want to test it out first...
i have it set to occur every minute, to make for faster testing, and it does trigger every minute, but its not working. I get this in the email from cron:
/var/www/vhosts/playsovereignty.com/httpdocs/strat/updatething.php: line 1: ?
: No such file or directory
/var/www/vhosts/playsovereignty.com/httpdocs/strat/updatething.php: line 2:
: command not found
/var/www/vhosts/playsovereignty.com/httpdocs/strat/updatething.php: line 3: syntax error near unexpected token `('
/var/www/vhosts/playsovereignty.com/httpdocs/strat/updatething.php: line 3: `$db = mysql_connect("localhost","---","---");
'
What could be wrong? any pointers would be great