Re: what is the meaning of the following construct
| From: | Greg Beaver | Date: | Sat, 17 Apr 2004 18:52:21 +0000 |
| Subject: | Re: what is the meaning of the following construct | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-27876@lists.php.net to get a copy of this message | ||
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.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] http://pear.php.net/manual/en/package.pear.pear-packagefilemanager.pear-packagefilemanager.addreplacement.phpif ('@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