RE: [PHP-DB] running PHP from the cron
| From: | Nicholas W. Miller | Date: | Mon, 19 Feb 2001 17:43:11 +0000 |
| Subject: | RE: [PHP-DB] running PHP from the cron | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-6747@lists.php.net to get a copy of this message | ||
Hello,
I run my PHP crons like this:
0 6 * * * /usr/local/bin/lynx -source "http://www.domain.com/file.php"
This is not the most secure of course, as the file is below the root and could be hit by any user. But works for my particular case ...
Anyone know of a method to make this more secure ... password protecting the directory it's in? chnaging the permissions of the file???
Nick
I have PHP installed as an Apache module and I can't have it as CGI.. nowI'm looking into ways to run PHP scripts off the cron, and I sawRebuilt php again and don't specify the apache configuration option. This will build php as a CGI program which you can then use in cron. Does anyone else do this? I'd love it if the default php build still built the CGI when building the apache plugin.thanks for the reply Dave, my point is that I do not have access to certain root stuff on Apache (it's a virtual server) so I am forced to only use PHP as a module, which to be honest I prefer to do since as far as I'm aware that makes it faster and it's only for some cron job stuff where the CGI option becomes more useful (to me at least). So I'm wondering if anyone has any experience of using fetch to parse PHP scripts off the cron. An example (from PHPAds) is below.. 59 23 * * * fetch -o - http://www.profi.it/phpAds/mail.php3>>/var/log/messages I'm wondering if there are any pros/cons to this approach, and whether there are any better ways of running PHP off the cron bar resorting to CGI. best wishes, simon -------------------------------------------Studio 24 Ltd | tel. 01223 501 89230 Hopkins Close | fax. 0870 063 1216Cambridge | mob. 07974 074 547 CB4 1FD | www.studio24.net-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net