Limit PHP access by user/directory in access.conf with php_admin_flag?

From: Date: Wed, 24 May 2000 13:40:59 +0000
Subject: Limit PHP access by user/directory in access.conf with php_admin_flag?
Groups: php.general 
Request: Send a blank email to php-general+get-429@lists.php.net to get a copy of this message
I'm trying to control PHP usage by directory via my Apache access.conf file. I've got Apache 1.3.12 with PHP 4.0.0 compiled in as a module. I have all the appropriate AddType, AddModule, etc lines in the other Apache config files, and I can run .php files just fine. Things getting confusing when I start mucking with the access.conf file to do directory-based restrictions. I have set DocumentRoot to "/home/webmaster/Web" and my individual user directories are in "/home/*/Web". My access.conf looks like this: <Directory /home/webmaster/Web> Options Includes Indexes FollowSymLinks AllowOverride All php_admin_flag engine On php_admin_flag safe_mode On order allow,deny allow from all </Directory> <Directory /home/webmaster/Web/cgi> AllowOverride None Options ExecCGI Includes FollowSymLinks </Directory> <Directory /home/*/Web> AllowOverride All Options Includes Indexes FollowSymLinks php_admin_flag engine Off php_admin_flag safe_mode On </Directory> <Directory /home/*/Web/cgi> AllowOverride None Options ExecCGI Includes FollowSymLinks </Directory> My problem is that I cannot seem to separate PHP-usage in /home/webmaster/Web from /home/*/Web -- whatever setting I put for all users is the setting that webmaster gets. I tried using a separate <Location...> directive for both, at the bottom of the file, but that did not help. Neither did making /home/www be a symlink to /home/webmaster/Web and reconfiguring the directives for /home/webmaster/Web to be /home/www instead. I have not been able to find any documentation that explains how this is supposed to work. Are these php_admin_flag directives across the board, thus the last one I set is going to be the one in effect? Or is having my DocumentRoot within the /home/*/Web hierarchy messing things up? (Then why didn't changing it to /home/www solve the problem?) What is the correct way to do this? TIA. --JR

« previous php.general (#429) next »