semi-RFC: new file role needed: docroot
| From: | Greg Beaver | Date: | Fri, 25 Jul 2003 22:33:57 +0000 |
| Subject: | semi-RFC: new file role needed: docroot | ||
| Groups: | php.pear.dev php.pear.general | ||
| Request: | Send a blank email to pear-dev+get-18720@lists.php.net to get a copy of this message | ||
Hi,
I've been investigating the sources for PEAR, and an initial scan says it won't be easy to do, but that it will be possible to add a new configuration option, web document root. This will allow a new file role="web" to install into the document root, and therefore make available at a known URL all necessary files needed. This will also eliminate the problem of releasing a package with image files having role="php"
This affects many packages in PEAR, including PEAR_Frontend_Web, HTML_TreeMenu, and phpDocumentor. Basically, any package that has a need to access files through html instead of PHP, whether javascript, css, or images needs this file role.
If there is no objection, I would like to start working on implementing this so that at install-time, pear requests a document root directory for web install. I think that default behavior if the document root is not found should be to raise a warning, and then install into the data directory.
After this is working, then a script can be written that will be executed upon pear upgrade PEAR which requests the new configuration value. This will also require the addition of a new file role, post-install or post-install-script, which specifies that the script should be run after installation. The zzoss installer has something like this, I believe, perhaps Sandro can comment.
Greg