Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    151
    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:
    151
  3. fikse

    fikse Well-Known Member

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

    /path/to/php -q /htdocs/www/x.php
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice