FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > PHP, Perl, Python and/or MySQL
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 09-02-1999, 11:00 PM   Postid: 43149
emonson
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Jul 1999
Location: York, PA USA
Posts: 2
PHP in crontab

hello !

Does anybody can I get the php interpreter executable (not the cgi or Apache DSO) - is that included with the base PHP distribution?  Is there just an option at compile time?  I was going to automate some tasks in cron through shell scripts, or maybe perl, but since PHP is so much easier to work with, I would MUCH rather use that.

I have the same situation at work - we have a MySQL database that needs to have logging information dumped to the database every night.  It would be much easier to use PHP's built in functionality.  

I am developing on my home PC (running Mandrake 6.0), and PHP is compiled into Apache (as opposed to Red Hat 6.0, which includes it as a module).  In either case, the interpreter (executable) is not included, and I can't find it in the source tree, although I probably could have looked harder   

Thanks !

Erik


------------------
emonson is offline   Reply With Quote
Old 09-03-1999, 04:21 AM   Postid: 43150
Justin
Visitor
 
Justin's Avatar

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Jan 1999
Location: Kissimmee, FL
Posts: 3,672
We have both the command line version and the core module installed. Running from a cron, you would call PHP like this:

/usr/local/bin/php /path/to/filename.php

HTH

------------------
Justin Nelson
FutureQuest Support
Justin is offline   Reply With Quote
Old 09-10-1999, 08:33 AM   Postid: 43151
pdstein
Registered User

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: May 1999
Posts: 242
If you get this to work, let me know.  I've been trying off and on for about a month to CRON a PHP script without success.  (See http://www.aota.net/ubb/Forum15/HTML/000150.html )

- Paul

[This message has been edited by pdstein (edited 09-10-99)]
pdstein is offline   Reply With Quote
Old 09-13-1999, 06:57 PM   Postid: 43152
Justin
Visitor
 
Justin's Avatar

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Jan 1999
Location: Kissimmee, FL
Posts: 3,672
Hm... I've been running several cron jobs with PHP without problems... One backs up our database twice a day, one processes new account orders from a queue, and a few other misc. tasks - PHP has no problem.

Here's one of my crontab files:

Code Sample:

MAILTO=support@futurequest.net
0,10,20,30,40,50 * * * * /usr/local/bin/php -q /big/dom/xdomain/phpscript.php




The above would run every ten minutes.

Make sure, if you create your cron file locally and upload it, that it is uploaded in ASCII transfer. Also note that after you run crontab file.txt that you verify it by typing crontab -l, which lists the cron file.

One thing about yours, PDStein, is that your script is in your /ftp directory - I'm not sure the permissions on that directory, but keep in mind that PHP has to have access to that directory - so don't place your PHP file in your home directory or any directory with limited permission settings.

Hope this helps.

------------------
Justin Nelson
FutureQuest Support
Justin is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 11:52 PM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.