Cron job turns.php

As bugs and suggestions are fixed/implemented/rejected, they will be moved in here.
Post Reply
Dracomiconia
Newbie
Posts: 3
Joined: Thu Apr 21, 2005 2:50 pm

Post by Dracomiconia »

I'm having a problem with the cron jobs for this game on my server.

Its running the turns.php file and by looking at the email log I see no errors, but the turns in the game are not increasing.

lockdb variable is 0 in all servers, and I test manually turns.php.... but nothing occurs...

Is there something else I should check ?
Dracomiconia
Newbie
Posts: 3
Joined: Thu Apr 21, 2005 2:50 pm

Post by Dracomiconia »

Another thing:

I have this cron-job

GET [URL here] > /dev/null

And in the periods....

Every 5 minutes.

User avatar
The Beatles
Fear me for I am root
Posts: 6285
Joined: Tue May 24, 2005 8:12 pm

Post by The Beatles »

Aha! You can't use GET, it's a vulnerability, as it would allow you to execute turns.php from URL. You must form a cron like:

*/5 * * * * php -f /home/username/path/to/faf/turns.php
You may also want to use a full path for the php binary:
/usr/bin/php
or
/usr/local/bin/php

If you can run it manually, you should be able to see what the path to each of these is. Hints on a UNIX box:
1. php binary's path can be found with "which php".
2. Go to the faf script and type "pwd" to find your directory.

I am sorry if this was dumbed-down but many people don't know UNIX.
:wq
Dracomiconia
Newbie
Posts: 3
Joined: Thu Apr 21, 2005 2:50 pm

Post by Dracomiconia »

Thanks!

I'll take the lesson for other crons.... ;)
User avatar
The Beatles
Fear me for I am root
Posts: 6285
Joined: Tue May 24, 2005 8:12 pm

Post by The Beatles »

You're welcome! :)

If that fixed it, I'll close the topic.
:wq
Post Reply
  • Members connected in real time

    🔒 Close the panel of connected members