Posts: 219
Location: UK, East Anglia
|
I have had problems with cron jobs before where i couldn't find the location of the file i wanted to use so i have been using a script that runs the file when some one visits a page, but this isn't accurate enough, because if no body is online then the file won't get run at all. so i tried cron jobs again, this time i worked out the location of my file, but i get loads of errors when it is run, this is what i get in my email:
Quote:
/vetinari/nacropet/public_html/admin/restock.php: line 1: ?php: No such file or directory
/vetinari/nacropet/public_html/admin/restock.php: line 2: syntax error near unexpected token `"connect.php"'
/vetinari/nacropet/public_html/admin/restock.php: line 2: `include ("connect.php"); '
|
so i thought maybe you can't include files in a cron job so i put contents of connect.php into the file i'm running but i get this error:
Quote:
/vetinari/nacropet/public_html/admin/restock.php: line 1: ?php: No such file or directory
/vetinari/nacropet/public_html/admin/restock.php: line 2: syntax error near unexpected token `('
/vetinari/nacropet/public_html/admin/restock.php: line 2: `$db = mysql_connect("localhost", "###", "###") or die("Could not connect.");
|
how can i make this work? is there something you have to add to the file?
Last edited by timsquash5; 03-14-2005 at 12:47 PM..
|