You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Sean Conner <se...@conman.org> on 2005/10/23 04:20:46 UTC

Re: [users@httpd] Enable/Disable .htaccess' require valid-user with

It was thus said that the Great Dan Trainor once stated:
> 
> The initial authentication would take place via PHP form.  I understand
> how 'require valid-user' works, and how it's used.
> 
> I figured out a way to do it, I'll re-post later on after I test a bit.
>   I'm using PHP to use apache_setenv(), and then using IfDefine inside
> an .htaccess file here.  It looks to be working....  like I said, I'll
> update you on this a bit later after I test more.

  Is there a reason why the authentication has to be done via PHP and not
through Apache?  This seems very awkard to me.

  -spc


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Enable/Disable .htaccess' require valid-user with

Posted by Dan Trainor <in...@hostinthebox.net>.
Sean Conner wrote:
> It was thus said that the Great Dan Trainor once stated:
> 
>>The initial authentication would take place via PHP form.  I understand
>>how 'require valid-user' works, and how it's used.
>>
>>I figured out a way to do it, I'll re-post later on after I test a bit.
>>  I'm using PHP to use apache_setenv(), and then using IfDefine inside
>>an .htaccess file here.  It looks to be working....  like I said, I'll
>>update you on this a bit later after I test more.
> 
> 
>   Is there a reason why the authentication has to be done via PHP and not
> through Apache?  This seems very awkard to me.
> 
>   -spc

It's for a secondary authentication implemeneted by PHP, instead of 
.htaccess.  The hope is, that I can set an env var in Apache that would 
make it so that Apache did not require a valid user using 'AuthType 
Basic'.  I'd liek to use this PHP script in conjunction with existing 
authentication systems, such as those using htaccess as we know it today.

Would something like this be totally outrageous?  Am I completely out of 
my mind?  Can I even use IfDefine in this context?

<IfDefine !SKIPHTTPAUTH>
         require valid-user
</IfDefine>

...if I were to define an Apache env var named SKIPHTTPAUTH from within 
a PHP script?

Thanks
-dant

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org