Re: [g-pear] The new ways for installing PEAR
| From: | Jesus M. Castagnetto | Date: | Sat, 15 Jun 2002 02:45:44 +0000 |
| Subject: | Re: [g-pear] The new ways for installing PEAR | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7042@lists.php.net to get a copy of this message | ||
BTW, after the 'go-pear' install (in which I answered 'Y' to let it install
PEAR, DB, etc.), the following commands are fubared (perliminary analysis and
patch later in the msg):
% pear remote-list
Available packages:
===================
+---------+---------+
| Package | Version |
| 0 | |
| 1 | |
(...)
| 45 | |
| 46 | |
| 47 | |
| 48 | |
+---------+---------+
% pear list-updates
[Error during execution of script]
Warning: Invalid argument supplied for foreach() in
/export/dredox1/devel_server/php/lib/php/PEAR/Frontend/CLI.php on line 424
AVAILABLE UPGRADES (STABLE):
============================
+---------+---------+------+
| PACKAGE | VERSION | SIZE |
+---------+---------+------+
And I think that the problem is that the script installs 'pear' in $prefix/bin
which not always is the same as /usr/local/bin (as in my case).
Even though it says at the end:
(...)
The 'pear' command is now at your service at /usr/local/bin/pear
Run it without parameters to see the available actions, try 'pear list'
to see what packages are installed, or 'pear help' for help
(...)
Even after copying manually (or w/ the patch below) pear to
/usr/local/bin/pear, it still fubars the list with a bucnh of:
"Notice: Undefined index: stable in Remote.php on line 158"
when I do "pear remote-list"
--- BEGIN PATCH ---
% gdiff -u go-pear.php-new go-pear.php-orig
--- go-pear.php-new Fri Jun 14 19:39:00 2002
+++ go-pear.php-orig Fri Jun 14 19:15:45 2002
@@ -50,8 +50,6 @@
#
# Rev1 2002-03-24: Initial
-ob_implicit_flush();
-
if (!function_exists("version_compare")) {
die(
"Sorry! Your PHP version is too old. PEAR and this script requires at
@@ -402,21 +400,6 @@
$pear_cmd = "$bin_dir/pear";
}
-// check that the installed pear and the the one in tha path are the same
-if ($pear_cmd != "$bin_dir/pear") {
- // check if it is a link or symlink and
- $islink = is_link($pear_cmd);
- if ($islink && readlink($pear_cmd) != "$bin_dir/pear") {
- print "Warning: The link $pear_cmd does not point to the
installed $bin_dir/pear\n";
- } elseif (is_writable($pear_cmd) && is_writable(dirname($pear_cmd))) {
- rename($pear_cmd, "{$pear_cmd}_old");
- copy("$bin_dir/pear", $pear_cmd);
- print "Warning: backed up old pear to {$pear_cmd}_old, copied
new $bin_dir/pear to $pear_cmd\n";
- } else {
- print "Warning: You need to copy $bin_dir/pear to $pear_cmd\n";
- }
-}
-
print "The 'pear' command is now at your service at $pear_cmd\n";
if (!$in_path) {
print "
@@ -631,4 +614,4 @@
return getenv($var);
}
-// }}}
+// }}}
\ No newline at end of file
--- END PATCH ---
FYI, here is my system info:
% php -v
PHP 4.3.0-dev (cli), Copyright (c) 1997-2002 The PHP Group
Zend Engine v1.2.1, Copyright (c) 1998-2002 Zend Technologies
with pcntl v1.0, 2001, by Jason Greene
% uname -a
SunOS redox 5.8 Generic_108528-07 sun4u sparc SUNW,Sun-Blade-100
% pear listInstalled packages:
===================
+-------------------+---------+--------+
| Package | Version | State |
| Archive_Tar | 0.9 | stable |
| Benchmark | 1.1 | stable |
| Console_Getopt | 0.11 | beta |
| DB | 1.2 | stable |
| DB_Pager | 0.7 | stable |
| HTML_QuickForm | 2.1 | stable |
| Mail | 1.0 | stable |
| Mail_Mime | 1.1 | stable |
| Math_Histogram | 0.9.0 | beta |
| Math_Stats | 0.8.3 | beta |
| Math_Vector | 0.6.0 | beta |
| Net_DIME | 0.1 | |
| PEAR | 0.90 | beta |
| Pager | 1.0.1 | stable |
| Science_Chemistry | 1.0.2 | stable |
| System_Command | 1.0 | stable |
| XML_Parser | 1.0 | stable |
| XML_RPC | 1.0.3 | stable |
| XML_RSS | 0.9.1 | stable |
| XML_Transformer | 0.3 | stable |
| XML_Tree | 1.1 | stable |
+-------------------+---------+--------+
% pear config-show
Configuration:
==============
PEAR executables directory bin_dir
/export/dredox1/devel_server/php/bin
PEAR documentation directory doc_dir
/export/dredox1/devel_server/php/share/pear/docs
PHP extension directory ext_dir
/export/dredox1/devel_server/php/lib/php/extensions/no-debug-non-zts-20010901
PEAR directory php_dir
/export/dredox1/devel_server/php/lib/php
PEAR data directory data_dir
/export/dredox1/devel_server/php/share/pear/data
PEAR test directory test_dir
/export/dredox1/devel_server/php/lib/php/tests
HTTP Proxy Server Address http_proxy
PEAR server master_server pear.php.net
PEAR password (for maintainers) password
PEAR username (for maintainers) username
Preferred Package State preferred_state stable
Unix file mask umask 2
Debug Log Level verbose 1
Compiled PHP (CLI) yesterday w/ the latest sources from CVS.
On another note, the following also works:
% php -d output_buffering=off -r "include 'http://pear.php.net/go-pear';"
--- "Jesus M. Castagnetto" <jcastagnetto@yahoo.com> wrote:
> Just need to remember that you *must* have
>
> output_buffering = off
>
> Otherwise, PHP will sit just there (the CGI and the CLI versions) waiting
> for input w/o displaying anything.
>
> A solution would be to add:
>
> ob_implicit_flush();
>
> at the top of the new "go-pear" script
>
> I made a copy of my usual php.ini and call it w/
>
> php -c nob_php.ini -r "include
> 'http://pear.php.net/go-pear';"
>
> --- "Tomas V.V.Cox" <cox@idecnet.com> wrote:
> > Hi,
> >
> > After the Stig's rewrite of go-pear to PHP we have now new ways for
> > installing PEAR:
> >
> > // The *nix cool way
> > # php -r "include
> > 'http://pear.php.net/go-pear';"
> > // Windows & CLI
> > # php -r
> > "readfile('http://pear.php.net/go-pear');" | php
> > // Tradicional Unix
> > # lynx -source http://pear.php.net/go-pear | php
> > // Modern Unix
> > # wget -qO- pear.php.net/go-pear | php -q
> > // CGI version hax0r
> > # php -d auto_prepend_file=http://pear.php.net/go-pear
> > // Tradicional Windows
> > Start->Applications->Internet Explorer
> > Type in the URL box: http://pear.php.net/go-pear
> > Menu bar: File->Save As->c:\go-pear
> > Start->Run Command
> > Type: command
> > In the console type: php -f c:\go-pear
> >
> > Feel free to test it and report any problem.
> >
> > Tomas V.V.Cox
> >
> > --
> > PEAR Development Mailing List (http://pear.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> =====
> --- Jesus M. Castagnetto (jcastagnetto@yahoo.com)
>
> Research:
> http://metallo.scripps.edu/
> Personal: http://www.castagnetto.org/
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
=====
--- Jesus M. Castagnetto (jcastagnetto@yahoo.com)
Research:
http://metallo.scripps.edu/
Personal: http://www.castagnetto.org/
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com