go-pear. Was:Re[2]: [PEAR-DEV] XML_RPC

From: Date: Tue, 07 Dec 2004 14:48:06 +0000
Subject: go-pear. Was:Re[2]: [PEAR-DEV] XML_RPC
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-34877@lists.php.net to get a copy of this message
Hello Greg, >>%PHP_PEAR_BIN_DIR%\cli\php.exe -r "exit((version_compare(phpversion(), '4.2', >>'>'))?1:0);" >> >>IF ERRORLEVEL 1 ( >>SET PHP_PEAR_ARGC=register_argc_argv=On >>) ELSE ( >>SET PHP_PEAR_ARGC= >>) >> >> >>I'm not sure about exit(code) syntax. Seems, that it has been added >>from 4.2 version. This need to be tested on 4.2 >>What is the lowest PHP version supported by PEAR? GB> Nice work, GB> 4.2.0 Tnx. The only problem is that PHP execution command should invoke CLI version, because CGI don't have an ability to run code with -r syntax That's why %PHP_PEAR_BIN_DIR%\cli\php.exe This can be a kind of problem with PHP 5, where I've heard, that CLI version is located in different place. CLI detection routine can be added to the .bat file, but I can't see the reason why this should be in PEAR.BAT and not in GO-PEAR After some investigations I've found, that windows installer is borken to find a CLI PHP.EXE correctly and always finds php.exe from root of PHP installation. I've attached a patch where also made PEAR re-detect PHP binary even if there is %PHP_PEAR_PHP_BIN% already set up. That will allow to fix previous PEAR installations and also adds an ability to setup PEAR just for given PHP installation. Useful, when you have default version 4 of PHP for your system, but want to test some PEAR features on PHP 5 or other PHP 4 branch from time to time. Additional usability/maintenance patch: - $php_dir is a bit misleading, because it points to %PHP_DIR%/PEAR replaced with $pear_dir - global variables took some time to find where they were changed and that they are global and for me it was hard to understand those single-quoted strings with variables in them. Like webfrontend_file' => '$prefix'.$sep.'index.php' Seems, that there is no other solution. - some coding style and WS fixes (I fixed ereg, because it doesn't matter which format of quoted string it will have, but for my colorer engine "' construction at the end of regexp is vital). - mentioned version 4.2.0 as minimum requirement and increased go-pear version to 0.2.3 Other bugs while testing: >The following PEAR packages are bundled with PHP: DB, Net_Socket, Net_SMTP, >Mail, XML_Parser, PHPUnit-0.6.2. PHPUnit-0.6.2 is not in distro for PHP 4.3.9 For 5.0.0 even DB is absent (don't know if it fixed in newer 5.x.x series) t --

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