The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Running PHP Scripts as CRON jobs from a password protected directory

Discussion in 'General Discussion' started by derricks, Dec 11, 2005.

  1. derricks

    derricks Registered

    Joined:
    Dec 11, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I have some PHP scripts that I want to run as CRON jobs. They are all kept in a password protected directory.
    I use the following syntax "GET http://yourdomain.com/path_to_file/file.php > /dev/null " and get in return the following "401 Authorization Required "
    How do I pass the username and password??? :rolleyes:
     
  2. intent-group

    intent-group Member

    Joined:
    Oct 28, 2003
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
  3. fikse

    fikse Well-Known Member

    Joined:
    May 10, 2003
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    16
    acutally, you should run them from cron like this:

    /path/to/php -q /htdocs/www/x.php
     
Loading...

Share This Page