Home » PEAR » PEAR » Bug #1153
PEAR 1.3.1's pear command can't get argv
Details
| Submitted | 2004-04-07 09:04 UTC |
|---|---|
| From | nhoizey at phpheaven dot net |
| Assigned | cellog |
| Status | Closed |
| Package | PEAR |
| PHP Version | 4.2.0 |
| OS | Windows XP Pro |
| Roadmaps | (Not assigned) |
Comments
[2004-04-07 09:04 UTC] nhoizey at phpheaven dot net
Description:
------------
After upgrading PEAR to 1.3.1, pear command can't run anymore as it can't get argv
The error message is the following:
Warning: The argument needs to be an array in pearcmd.php on line 54
Console_Getopt: Could not read cmd args (register_argc_argv=Off?)
My register_argc_argv is set to On, as shown by:
echo ini_get('register_argc_argv');
just before the
$argv = Console_Getopt::readPHPArgv();
Reproduce code:
---------------
pearcmd.php & Getopt.php
Actual result:
--------------
C:\Documents and Settings\Nicolas>pear list-upgrades
Warning: The argument needs to be an array in pearcmd.php on line 53
Console_Getopt: Could not read cmd args (register_argc_argv=Off?)
Usage: pear [options] command [command-options] <parameters>
[...]
[2004-04-07 15:00 UTC] nhoizey at phpheaven dot net
> the line in pear.bat where it calls PHP
lines 66 and 67 :
:RUN
"%PHP_PEAR_PHP_BIN%" -C -d output_buffering=1 -d register_argc_argv=On -d include_path="%PHP_PEAR_INSTALL_DIR%" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
> the version of Console_Getopt
$Id: Getopt.php,v 1.21.4.7 2003/12/05 21:57:01 andrei Exp $
> PHP version
4.2.0
> anything else you can think of
I can send you my phpinfo() output by mail if you want
[2004-04-07 15:46 UTC] nhoizey at phpheaven dot net
I did it and tried again, but it still doesn't work.
The error message is the same.
[2004-04-07 16:15 UTC] nhoizey at phpheaven dot net
1.3
[2004-04-07 17:25 UTC] nhoizey at phpheaven dot net
Bravo! It works now!!!
[2004-05-19 16:49 UTC] huttonb at charter dot net
I think I'm experiencing the same problem on Linux.
Slackware 9.1 full install
PHP 4.3.3 (from distro)
Upgraded PEAR by running http://go-pear.org/ | php -q
Downloaded and manually installed Console_Getopt 1.2
If I type "pear list" I get the following error:
Warning: array_shift(): The argument should be an array in pearcmd.php on line 53
Console_Getopt: Could not read cmd args (register_argc_argv=Off?)
Help! :)