Re: what is the meaning of the following construct

From: Date: Mon, 19 Apr 2004 08:31:47 +0000
Subject: Re: what is the meaning of the following construct
References: 1 2 3 4 5 6  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-27982@lists.php.net to get a copy of this message
If I understand the pearcmd.php, pear shell script clearly passing the -d include_path to php cli is of no use as it is never used inside the pearcmd.php. At the beginning of pearcmd.php itself include_path is set to the 'pearinsalldir'. I tested the same by not passing -d include_path to php cli in the pearinsalldir pear shell script and making use of the environment variable PHP_PEAR_INSTALL_DIR to <someotherpearinstalldir> It works absolutely fine. Correct me if I am wrong. With regards Kamesh Jayachandran On Sun, 2004-04-18 at 00:22, Greg Beaver wrote: > Kamesh Jayachandran wrote: > > > Hi, > > I could not see pear.in anymore in the CVS Tree.(I persume it has been > > renamed as pearcmd.php) > > "don't set include path if running 'pear.in' without substitutions > > made by the installer" > > -is the comment given to the corresponding commit. > > > > > > if ('@include_path@' != '@'.'include_path'.'@') { > > > > ini_set('include_path', '@include_path@'); > > } > > I am not knowledgable about which program replaces these @include_path@ > > with '/usr/local/lib/php'. > > > > Any way finally the installed code looks like the following > > > > if ('/usr/local/lib/php' != > > '@'.'include_path'.'@') { > > ini_set('include_path', '/usr/local/lib/php'); > > } > > > > So the if condition is absolutely not necessary. > > > > Please correct me if I am wrong > > I'll try :) > > The program that does the replacements is the PEAR installer. See [1] > for a brief description of how replacements work. They are defined in > the package.xml, so take a look at the package.xml that ships with the > PEAR package, and you will see that in fact @include_path@ is replaced > with the value. > > If someone were to simply download PEAR-1.3.1.tgz and attempt to run it, > for instance, then without this check, it would simply set the > include_path to a completely borked value and fail for no apparent > reason. Then, we would get people complaining all of the time about the > stupid code that sets include_path to '@include_path@' when php.ini had > set it to the correct value just fine. > > pear.in was renamed to "pear" as in the shell script named "pear" > > Greg > > [1] > Øäÿ > ISINÞ+é http://pear.php.net/manual/en/package.pear.pear-packagefilemanager.pear-packagefilemanager.addreplacement.php

« previous php.pear.dev (#27982) next »