If I use pear from comandline i get strange output "IS_VAR" (whatever pear comands, php unit test's)
example "pear list"
IS_VAR
IS_VAR
IS_VAR
IS_VAR
IS_VAR
IS_VAR
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.7 stable
Console_Getopt 1.3.0 stable
PEAR 1.9.1 stable
PHP_CodeSniffer 1.2.2 stable
PhpDocumentor 1.4.3 stable
Structures_Graph 1.0.4 stable
Any ideas to fix?
== update ==
I debugged pear script a bit. And I founded strange behavior
class PEAR_PackageFile, method factory
$version = $version{0};
and this line throws this error. I replaced to similar functionality
$version = substr($version,0,1);
and this output disappeared. Of course i hava same issue with some other places, like UnitTests. So question why this strange output is same mystery.
Disabling traces is NOT the answer as stack traces are one of the major useful features of xdebug. It was a problem with the xdebug package itself which has been fixed (see http://bugs.xdebug.org/view.php?id=756).
If you have a distribution copy of xdebug, you can install it from PECL (may require sudo/privilege escalation):
pecl install xdebug
Otherwise, you can upgrade it from PECL:
pecl upgrade xdebug
Set xdebug.auto_trace = 0 in your php.ini file. See bug #18173.
I think you have some debug output in your pear code, or maybe even some global php prepend file. The IS_VAR is NOT part of PEAR; you somehow added that yourself to the code.
Related
I am working on a mac and trying to install http_request2 and mail_mime via the pear package manager.
When I use the pear install command I see this:
$ pear install http_request2
downloading HTTP_Request2-2.2.1.tgz ...
Starting to download HTTP_Request2-2.2.1.tgz (107,339 bytes)
.........................done: 107,339 bytes
downloading Net_URL2-2.0.5.tgz ...
Starting to download Net_URL2-2.0.5.tgz (17,456 bytes)
...done: 17,456 bytes
install ok: channel://pear.php.net/Net_URL2-2.0.5
install ok: channel://pear.php.net/HTTP_Request2-2.2.1
Which leads me to believe that this is installed correctly. However, if I then run pear list -a I get the following output:
$ pear list -a
Installed packages, channel __uri:
==================================
(no packages installed)
Installed packages, channel doc.php.net:
========================================
(no packages installed)
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.11 stable
Console_Getopt 1.3.1 stable
PEAR 1.9.4 stable
Structures_Graph 1.0.4 stable
XML_Util 1.2.1 stable
Installed packages, channel pecl.php.net:
=========================================
(no packages installed)
http_request2 is not included among the installed packages, despite just being told that it was installed.
I can also run the pear install http_request2 command again and it will not give me the
ignoring installed package pear/http_request2
like it's supposed to, instead it just proceeds with the install.
I ran
pear config-get php_dir
and found http_request2 in that directory.
I tried changing the include_path variable in my php.ini file as suggested in this post: Pear Packages not working but it didn't change anything.
I would prefer not to reinstall pear if possible because I'm not experienced with this and don't want to accidentally end up with two pears, as suggested can happen here: https://stackoverflow.com/a/6596669/2718779. Any suggestions?
You probably stumble across the issue I solved in https://stackoverflow.com/a/19177767/282601 - two versions of pear installed.
I m trying to set up phpuml to generate xmi files which I intent to import using umbrello.
I have managed to get PHP_UML installed using XSL alpha package which is a dependency for PHP_UML.
Here is the output of the list command
vihaan#cd:~$ pear list
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.11 stable
Console_CommandLine 1.2.0 stable
Console_Getopt 1.3.1 stable
PEAR 1.9.4 stable
PHP_UML 1.6.1 stable
Structures_Graph 1.0.4 stable
XML_Util 1.2.1 stable
XML_XSLT_Wrapper 0.2.2 alpha
It seems like PHP_UML is installed but on trying to execute the phpuml command I get
vihaan#cd:~$ phpuml
phpuml: command not found
I cant figure out whats wrong?
To see where the phpuml script for installed to, use the command
$ pear list php_uml | grep phpuml
I am trying to integrate Netbeans 6.9 or 7 into my development environment (Mac OS X 10.6.7 native PHP no stacks) but no matter what I try I am not getting Netbeans to recognize my PHP interpreter (/usr/bin/php) or my PHPUnit script (/usr/local/bin/phpunit).
Anybody got some less than obvious ideas, although I may have missed one of those. I have exhausted search terms on the web trying to find someone who went through the same problems but nothing has come of it.
EDIT
Well for the past day I have been using phpunit --version to verify my phpunit version (3.5.13) and pear list to verify my PEAR 1.9.2 install. Well I just discovered the pear list-all which shows phpunit as 1.3.2. Upon entering pear upgrade phpunit/PHPUnit the response I get is Nothing to upgrade
This may explain the PHPUnit script problem since apparently there are 2 versions of PHPUnit installed and the one I am trying to point to must not be tied into PEAR.
which php /usr/bin/php
which pear /usr/local/bin/pear
which phpunit /usr/local/bin/phpunit
Any ideas? Thanks
Wrong phpunit versions
$ pear list-all
shows the packages from the default channel, which is "pear.php.net" unless you configured it otherwise. You did install phpunit from pear.phpunit.de, which is a different channel.
PHPUnit previously (version 1) was hosted on pear.php.net but moved to its own channel.
Running
$ pear list-all -c pear.phpunit.de
shows phpunit 3.5.13.
$ pear install phpunit/phpunit
is actually the same as
$ pear install pear.phpunit.de/phpunit
because phpunit is the short name/alias for the pear.phpunit.de channel.
Two phpunits installed
You probably do not have two phpunit versions installed. "list-all" lists all available packages on a channel, not only local/installed ones.
Well I finally gave up on netbeans and went over to PhpStorm 2. I am not having any problems there and it does what I need. cweiske I apprecaite the info provided as that was of great help for things I did not realize.
phpinfo() function shows that my PHP version (5.1.6) is installed --without-pear in the configure command section.
How do I install pear?
The Getting and installing the PEAR package manager page should help you : it gives informations on how to install the PEAR package manager, on both windows, Linux, and Mac.
Basically, if your Linux distribution comes with a PEAP package, you should install it.
For instance, on Ubuntu1, there is a php-pear package ; so, you'd use :
apt-get install php-pear
Else, if it doesn't, with a version of PHP >= 5.3, you should be able to use this :
$ wget http://pear.php.net/go-pear.phar
$ php go-pear.phar
With PHP 5.1, though, this is not going to work, as phar support has been added in PHP 5.3...
As a sidenote : PHP 5.1 is really outdated !
PHP 5.3 is more than one year and a half old ; even PHP 5.2 is not maintained anymore... maybe you should consider upgrading ?
1It seems you are running some kind of Redhat-based distribution, but I don't have one of those, so I cannot say if there is a PEAR package for it -- there is probably one, though.
--without-pear only means that the PEAR bits were not immediately created when PHP was compiled.
This usually happens when an operating system vendor that provides packages and wants to split off bits and pieces into their own individually installable parts.
Given the age of the PHP you're talking about, you're probably on RHEL or a derivative like CentOS. Check the package manager for a php-pear package.
I saw this thread which is exactly what I've done as well, Downgraded PHP to version 5.2 on Ubuntu 10.4
When running as root I just get the download, no install message, any thoughts?
pear install Mail_Mime-1.8.0.tgz
downloading Mail_Mime-1.8.0.tgz ...
Starting to download Mail_Mime-1.8.0.tgz (31,292 bytes)
.........done: 31,292 bytes
I've looked in the phpinfo() and see nothing except the pear path
include_path .:/usr/share/php:/usr/share/pear .:/usr/share/php:/usr/share/pear
running pear list I get this
pear list
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.3 stable
Console_Getopt 1.2.3 stable
PEAR 1.9.0 stable
Structures_Graph 1.0.2 stable
XML_Util 1.2.1 stable
please manual download Mail_Mime files and extract to /usr/share/pear/
Found a work around, not the best solution but it works. Using the Ubuntu Download Center, search for pear and install the needed packages. Most are listing with a prepending php-
php-mail