Re: PEAR2 standards: anything good at all?
| From: | Christian Weiske | Date: | Mon, 16 Jul 2007 06:04:06 +0000 |
| Subject: | Re: PEAR2 standards: anything good at all? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47508@lists.php.net to get a copy of this message | ||
Alexey,
> Now another "problem" is that PEAR installation is not relocatable.
> Since we already covered unzip-and go, let's presume that we are
> talking a real installation here. The proposed solution is to have a
> data_dir.txt file in the installation root that'll contain the name
> of data directory. Nice.
>
> But if I relocate the installation, will the file automagically
> contain the name of the dir I relocated to? No? So, is there a huge
> difference between editing this file by hand and doing a mass
> search-and replace that's required now?
You misunderstood the concept of the new data_dir:
There is not a single file containing its name. It is assumed by the
packages that you can reach it via dirname^x(__FILE__) calls directly
above the current root php files location.
Currently, you can set php files path to /usr/share/pear/php/ and
data_dir to /home/tmp/some/weird/setting/ and thus need PEAR_Config to
retrieve data_dir.
In PEAR2, it is proposed that php and data_dir are children of the same
directory, tied together, making it unneccessary to use PEAR_Config at
all.
If you care about not having another PEAR_Error, you probably want to
get rid of PEAR_Config for standard tasks, too.
--
Regards/Mit freundlichen Grüßen
Christian Weiske