PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
nikko50
Forum Commoner
Posts: 43 Joined: Thu Apr 08, 2004 6:28 am
Post
by nikko50 » Thu May 20, 2004 9:30 pm
Hello there. I can't seem to get this crontab to run my cron.php page which is is a simple db query. Here is the code for the crontab entry
27 * * * * /homepages/29/test/htdocs/cron.php >/dev/null
Does this look good to you. Any suggestions???
launchcode
Forum Contributor
Posts: 401 Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:
Post
by launchcode » Thu May 20, 2004 9:35 pm
You should be passing it through php first (or using a CGI version of PHP in your script).
It's location will vary depending on your server. But pass the "php.exe" (on Windows) your path + file.
nikko50
Forum Commoner
Posts: 43 Joined: Thu Apr 08, 2004 6:28 am
Post
by nikko50 » Thu May 20, 2004 9:51 pm
Thanks for the reply. Can I find my web server PHP executable location with phpinfo()?? Also can I find my root dir with phpinfo()??
Tracy:)
launchcode
Forum Contributor
Posts: 401 Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:
Post
by launchcode » Thu May 20, 2004 10:00 pm
Root DIR yes definitely - php exe location I'm afraid not, sorry. Do you have telnet/ssh access to your server?
nikko50
Forum Commoner
Posts: 43 Joined: Thu Apr 08, 2004 6:28 am
Post
by nikko50 » Thu May 20, 2004 10:03 pm
Hi Rich. Yes I do. I'm in there right now.
Tracy
launchcode
Forum Contributor
Posts: 401 Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:
Post
by launchcode » Thu May 20, 2004 10:06 pm
If it is a Unix server try this:
where php
for me it is in: /usr/local/bin/php
You can pass your PHP scrript directly to that.
nikko50
Forum Commoner
Posts: 43 Joined: Thu Apr 08, 2004 6:28 am
Post
by nikko50 » Thu May 20, 2004 10:10 pm
tried that and get bad command.
Tracy:(
launchcode
Forum Contributor
Posts: 401 Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:
Post
by launchcode » Thu May 20, 2004 10:13 pm
Is it a Unix server? If so you could try "locate php" too - or just see if the following work:
/usr/local/bin/php
/usr/bin/php
Remember you must pass it the full path to your script (once you locate it!)
nikko50
Forum Commoner
Posts: 43 Joined: Thu Apr 08, 2004 6:28 am
Post
by nikko50 » Thu May 20, 2004 10:40 pm
Works great now. Hugs for you!!
Cheers,
Tracy