I added .htaccess and .htpasswd to a dir in order to password protect it. That part works.
AuthType Basic
AuthName "Password Protected Area"
AuthUserFile /path/.htpasswd
Require valid-user
But now, php scripts inside this dir fail to execute.
error.log shows:
failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required
The lines of the script it is complaining about look like this:
$data = file("http://site/script1.php");
$data2 = file("http://site/script2.php");
$data3 = file("http://site/script3.php");
Do I need to add something to the .htaccess file in order to allow php execution in this dir?
EDIT:
ha...well I worked around the problem. I simply password protected the php script in question rather than the whole directory:
<Files "script.php">
require valid-user
</Files>