Re: HTTP PHP Authentication in a Function
| From: | anthony at cosmic dot net dot au | Date: | Fri, 22 Sep 2000 17:44:57 +0000 |
| Subject: | Re: HTTP PHP Authentication in a Function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-17431@lists.php.net to get a copy of this message | ||
Hello,
I have been trying to place the http Authentication in a Function so I can
include a config in any php script I like to check that the user has been
validated.
However,
As soon as I add the authentication code to a function it will bring up
the login window asking for username and passwd but will not work as it
would if the code was in the php script calling this function.
Is there something vital Im missing about the workings of php
authentication, Do i need to pass anything back from the function to the
main script . I tried passing $PHP_AUTH_USER and PW back to the script but
made no difference.
As a side note :.. If someone authenticates by this method, is it safe to
assume on a SSL connection that the remote_user varible is difficult if
not impossible to fake and pretend you are another user by somehow
creating your own remote_user varible?
Thanks For your Time.
Regards
Anthony.