httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bradley Giesbrecht <b...@pixilla.com>
Subject Re: [users@httpd] find out group-membership with php
Date Mon, 15 Sep 2008 18:36:37 GMT
You need to get a little inventive here.

.htaccess:
SetEnv dir_groups "system|managers|sales" # pipe delimited


something.php:
<?php
$dir_groups = explode ( "|" , $_SERVER[ 'dir_groups' ] ) ;
die ( "<pre>" . print_r ( $dir_groups , true ) . "</pre>" ) ;
?>


browser result:
Array
(
     [0] => system
     [1] => managers
     [2] => sales
)

//Brad


On Sep 15, 2008, at 11:18 AM, André Warnier wrote:

> Bradley Giesbrecht wrote:
>> Looks like you could add something like this to your .htaccess:
>> SetEnv dir_group "group_name"
> That would work, but only if "group_name" is the only group that  
> could have access to that directory.  If there are several groups,  
> then it does not work anymore, because you set them all to  
> "group_name", and you lose the distinction.
>
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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


Mime
View raw message