Re: Running PHP as a cron job....

From: Date: Mon, 09 Jul 2001 02:00:26 +0000
Subject: Re: Running PHP as a cron job....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-56853@lists.php.net to get a copy of this message
"Michael Hall" <lists@mulga.com.au> wrote: > With all the advice that has been offered so far, has it been assumed that > php is installed in the CGI rather than DSO manner? I haven't found this to be clear from the thread. > Can PHP as a DSO > interpret shell script-like files with a shebang at the top? No. This only works if PHP is compiled in stand-alone (CGI) mode. > Alternatively, I've read somewhere about using lynx to run a .php cron > job. Does this apply to DSO setups? For example, would James put something > like this in his crontab: > > * * * * lynx mail.php Almost. Instead of the filename, the *full* URL is needed. If PHP is compiled as an Apache DSO the only way Apache can parse the PHP script is if the file is accessed via the webserver, not directly off of the filesystem. If anyone goes this route I strongly suggest adding authentication via an .htaccess file and passing the user/pwd to lynx (see "man lynx") so that your script which is probably only intended to be run via cron isn't available for anyone on the web to access. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/

« previous php.general (#56853) next »