Xikeon

Registered
Sep 28, 2006
2
0
151
Hello,
my host has cPanel and I set up a cronjob with a mysql connection in the file.

Now, I said to sent the status per job to me email, but I get this:
/home/mikeo/public_html/game/__cron__uur__hour1337.php: line 1: ?php: No such file or directory
/home/mikeo/public_html/game/__cron__uur__hour1337.php: line 2:
: command not found
/home/mikeo/public_html/game/__cron__uur__hour1337.php: line 3: syntax error near unexpected token `"localhost","mikeo_game","*****"'
/home/mikeo/public_html/game/__cron__uur__hour1337.php: line 3: ` mysql_connect("localhost","mikeo_game","*****");
'
The ***** is my password (is correct for sure)...

Does anyone know how to fix it?

Thanks.
 

webignition

Well-Known Member
Jan 22, 2005
1,880
0
166
It looks like you're specifying the cron job task by merely entering the path to the PHP script.

When doing so, the script will be executed in the same way as if it were executed from the command line and in order for that to work, you'd need to add a shebang line in your script - search the forums for info on how to do this.
 

Xikeon

Registered
Sep 28, 2006
2
0
151
Well,
I now have this command:
/usr/bin/php /home/xikeon/public_html/__cron__uur__hour1337.php
Now nothing happens...

EDIT!!!!
Thanks, it works now :D
 
Last edited: