NYCPHP Meetup

NYPHP.org

[nycphp-talk] php authentication and .htaccess protection

David Yun dyun at blue-iceberg.com
Fri Apr 2 14:05:31 EST 2004


Thanks, Chris. A couple questions:

Chris Snyder wrote:

> Lately I've been using an Apache SetHandler directive to run all
> requests through a PHP script that sets up the session, handles
> authentication, and wraps the requested resource in a dynamic header and
> footer before sending it to the client (with appropriate Content-type
> and other headers).

Okay, so everything in a given directory gets sent through a script that you
specify in the SetHandler, right?
 
> This works even if the resource is a Perl or Python or whatever script--
> as long as the PHP handler knows (1) that it's a script and (2) how to
> execute the script, it can deliver the output back to the client. You
> can use a $_GET var to request the source instead.
>

Sorry, I don't follow - what is the "resource" you are referring to? Would
this work even if the beta site or page is a web application with
authentication scripts of its own?


 
>> Does anyone know a solution to this problem, or know of a way to pass a
>> userid and password from php to the .htaccess protection?
>> 
> There is support in PHP for working with Basic Auth, but I find
> .htaccess/.htpasswd files tedious to maintain.
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk




More information about the talk mailing list