Re: Configuring cron on ensim servers?
| From: | Richard Lynch | Date: | Mon, 05 Aug 2002 23:43:07 +0000 |
| Subject: | Re: Configuring cron on ensim servers? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-111290@lists.php.net to get a copy of this message | ||
>I just got a dedicated server from rackshack (www.rackshack.net). It
>has ensim on it. Does anyone know how to use cron to run php on an
>ensim server? The support won't help.
I got no idea what "ensim" is, and have never heard of "rackshack"...
But...
1. First, you need to find out if they bothered to compile PHP as a
stand-alone binary (aka CGI) (and recently also known as CLI, though CGI and
CLI may be subtly different... I ain't quite figured that out yet...)
Start simple:
whereis php
If this has one of:
/bin/php
/usr/bin/php
/usr/local/bin/php
.
.
.
in the output, you can do:
file /whatever/path/to/php
to be sure it's an "ELF binary blah blah blah"
If it is, then you can just do:
/whatever/path/to/php -f /full/path/to/your/script.php
in your cron job.
If you need an alternate php.ini file, you can use:
/whatever/path/to/php -c /full/path/to/alternate/php.ini -f
/full/path/to/your/script.php
Now, just because 'whereis' didn't find 'php', doesn't mean it's
not
there...
So if that fails, don't despair. Whip out 'locate':
locate php | grep -e "/php$"
The locate will generate *FAR* too many answers, since *EVERY* file *under*
a directory named *anything* like 'php' including every damn file that ends
in .php on the server...
So, like the grep thingie says to snag only the ones that actually *END* in
'/php'
That will still show some directories that are useless, but should get rid
of most of the junk you don't.
To actually understand cron, use:
man 5 crontab
That makes it about as clear as it gets...
--
Like Music? http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro). Need to record live events (mixed already) to stereo
CD-quality. Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff. Zero (0)
post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.