Re: Need to Run a PHP script using CRON or ?
| From: | Pat Lashley | Date: | Mon, 15 Sep 2003 21:12:27 +0000 |
| Subject: | Re: Need to Run a PHP script using CRON or ? | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-30516@lists.php.net to get a copy of this message | ||
--On Monday, September 15, 2003 15:27:45 -0500 Jonathan Villa <jvilla@isdesigndev.com> wrote:
Interesting... how does this fair concerning security? So I'll have to have this file located in my document root, is this a good thing? My current directory structure consists of several files located outside the doc root. I guess I could always include it onto a pageUnfortunately command-line fetch programs seldom provide a clean method for providing authentication info; so you probably can't just restrict access to that script based on a userid/password. (You might be able to do something with SSL and client certificates; but then you need to either buy a client cert or figure out how to set up a private certificate authority...) So, put it in a separate directory under ServerRoot and set up a name based virtual host with an Alias to provide access to that dir. Set the virtual host to reject connections from anything except your local host. Or use the same hostname; but have your VirtualHost listen on a non-standard port. Then your firewall can help block outside access to that port. How much that improves security depends on how you have that machine set up. If you are the only one with shell access; it's probably acceptably good. If untrusted people have shell access; then it's not much better than just sticking it in your datadir and hoping that nobody figures out its URL. -Pat