Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to call a php script via cron. The cron entry will use wget. When I attempt to call the script from a command line, I get "Authorization Required", which is obviously coming from my htaccess file.

Does anyone know how I can override the htaccess file for a single directory?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You can use the Satisfy directive inside a Directory container or in your .htaccess file to override the authentication requirement.

If your PHP script doesn't need the environment of a full web server, it would be far easier, more secure and would produce less overhead to just execute the script with the PHP command-line interpreter.

share|improve this answer
    
Joschi, thanks for the help and the point in the right direction. Because of the framework of the site, the path to the script isn't really an option. I'd agree with you about the security though. I'll see what I can learn from the links you gave. –  user55999 Oct 3 '10 at 7:07
    
You're a life saver, Joschi. It worked. Thanks a bunch! –  user55999 Oct 3 '10 at 7:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.