Re: PHP on IIS with basic authentication



Joff wrote:
I'm running PHP on IIS and need to set basic authentication on a
particular folder, e.g http://domain.com/private/
I've set the user on the server and assigned permissions to the
folder.

When requesting files within the folder, I get the login/password
prompt and entering the correct credentials gives me the file, except
for .php files.

The .php file is as basic as they come with just <?php echo "Hello
world"; ?> as the contents.

http://domain.com/private/test.txt works perfectly, however
http://domain.com/private/test.php denies access, giving only:
"Unauthorized
Access is denied due to invalid credentials."

I've tried giving the user full permissions; I've ensured that
Application Settings configuration within IIS Manager properties >
Home Directory, allows PHP files.


Any other suggestions?

What you describe sounds like windows integrated authentication not like
basic authentication. In this cases the user login on needs access to
the file on the server. If it is what you mean, the user may even need
the rights to execute that .php file as well as the right to execute php
itself.

Heiko
.



Relevant Pages

  • PHP on IIS with basic authentication
    ... particular folder, e.g http://domain.com/private/ ... I've set the user on the server and assigned permissions to the ... for .php files. ... Home Directory, allows PHP files. ...
    (comp.lang.php)
  • Re: fgets($fp) question
    ... I was thus able to look at the source code for the page ... Recently the page has changed and I find that now $thisLine no longer ... It looks like the server you were getting the file from was not configured ... In general the server SHOULD interprete PHP files as PHP files and ...
    (alt.php)
  • Re: fgets($fp) question
    ... >> contains the source code for the page but rather the text as it is ... It means that the server ... > In general the server SHOULD interprete PHP files as PHP files and ... I do not want to see PHP script source. ...
    (alt.php)
  • Linker file redirection problem. Help!
    ... I'm having some problems here with a web server displaying .php files ... I have software I'm attempting to install on the server. ... we attempted doing this by setting a linker file. ... httpsdocs dir. we have a linker named support which redirects to ...
    (comp.os.linux.networking)
  • reference to files 2 directories below not working
    ... I've upgraded my Apache and php files on my home server. ... reference to a file more then 1 directory below the server root ...
    (php.general)