Hi,
I am trying to make a crontab that runs a PHP script every 10 minutes. The script gets information from all my database tables, turns them into the "INSERT INTO" queries, and emails them to me. The script itself works fine when I use it in netscape, but the crontab doesn't want to use it. here is the email I get when crontab tries to run the script...
www/video/mailDB.php: ?php: No such file or directory
www/video/mailDB.php: //: is a directory
www/video/mailDB.php: syntax error near unexpected token mysql_connect('host','user','pass')'
www/video/mailDB.php: www/video/mailDB.php: line 5: mysql_connect('host','user','pass');'
Just so you know, host, user, and pass are different in the script. i just changed them for the sake of posting here.
Anyway, here is why my crontab looks like...
0,10,20,30,40,50 www/video/mailDB.php
the directory my crontab txt file is in is...
/
my main web directory is
/www
the directory the script is in is
/www/video/
If I were to use "/www/video/mailDB.php" rather than "www/video/mailDB.php" in the crontab file, I get an error thru email saying that the file cannot be found.
Also, I checked my web-hosts server info, and it says under the Apache area "Loaded Modules : mod_php4". (there are other mods, but that one stood out). Don't know if that helps any, if it does, then help me, heh