Re: Detecting Pear....
| From: | bertrand Gugger | Date: | Sat, 10 Sep 2005 05:54:23 +0000 |
| Subject: | Re: Detecting Pear.... | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20894@lists.php.net to get a copy of this message | ||
Bonjour,
Michael J. Pawlowsky wrote:
I would like to use Pear for a project I am making for someone else, but it will be distributed in a way where people might not be able to install Pear on their machines. So I was thinking of simply including the classes I need with the archive I will give them.The license enables it. If you intend to distribute it for hosted people, no, they normally have no access to the pear install.
So somehow I need to be able to detect if Pear is in their inlcude path and if not then include it with the one that I will have in my distriubution.As said Justin, you risk to include old stuff this way. That's perhaps not so correct, but a common practice is to put all the needed pear in your distributed archive as a local installation [1], and then to prepend (dynamically) the path where they are installed to the customer include path. In this case, though it's not obligatory, it could be good to indicate the people which pear package and whiche version you bundle in, and where it lands in the installed directories. So sites with a right pear install could handle it themselves, then perhaps make this path prepend optional. Also users have a way to eventually upgrade these packages.
What would be the best way to detect if pear is installed and in the persons include path already?From command line/bash : pear -V [1] http://pear.php.net/manual/en/installation.shared.php à+ -- bertrand "toggg" Gugger