publicweb role
| From: | Greg Beaver | Date: | Thu, 04 Sep 2003 22:19:46 +0000 |
| Subject: | publicweb role | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-21083@lists.php.net to get a copy of this message | ||
Hi all,
As it has been 2 months since I first posted the publicweb role patch, and have received no negative feedback (I'm not counting the "wait for feedback" as negative), I'm assuming you all like it. I have taken a peek at the data directory, and it is rarely used for web stuff, so I think it is better to create a specific role. A solution for making sure people have set it is to not provide a default value - and to raise an error with instructions when the user tries to install a package for the first time that uses the publicweb role. In other words, they would see this:
$ pear install PhpDocumentor
Error - this package uses the publicweb role. Please execute this command:
"pear config-set publicweb_dir /path/to/webserver/directory"
to configure a location for web-related files. This should be
a subdirectory of the directory public web files are located in.
$ pear config-set publicweb_dir /usr/share/www/htdocs/pear
$ pear install PhpDOcumentor
Install OK
The code for this is relatively simple, and a few guesses can be made based on standard configuration, and the web interface can make a very educated guess based on its own location.
Otherwise, the change would work as in the patch I provided 2 months ago. This same patch is available at phpdoc.org.
Greg