[Phpwm] PHP with Cron
David Goodwin
david at codepoets.co.uk
Thu May 18 16:30:46 BST 2006
pete graham wrote:
> I am setting up some PHP scripts that will be called by cron. Since I
> have PHP installed as an apache module I was planning to use lynx to
> load the PHP file.
>
Do you have a $http_proxy set?
> I am testing this on my dev server first, however I have found that Lynx
> seems to ignore the Virtual Hosts that I have specified in /etc/hosts
> file, and therefore cannot connect to any of the sites on my Dev server.
It's always respected ip/hostname mapping from /etc/hosts before for me.
> Does anyone know how this can be fixed or an alternative method that I
> can use?
I think you're probably using a http proxy somewhere, which is doing the
dns lookup, instead of your local machine.
>
> In case anyone is interested I am checking that the client IP is the
> same as the server IP in the files for security reasons, so only the
> server itself can call the cron pages.
You could just use a .htaccess (or similar) in Apache to restrict access
to a cron.php file based on IP address etc.
David.
--
David Goodwin
[ david at codepoets dot co dot uk ]
[ http://www.codepoets.co.uk ]
More information about the Phpwm
mailing list