HatanakaThiago
HatanakaThiago

Reputation: 1

PEAR binary directory is empty

I'm setting up my php setup, and I decided to install PEAR but even following the official installation I couldn't install. I downloaded PEAR manually through https://pear.php.net/go-pear.phar followed the installation, added the path '/home/Thiago/pear/bin' to the environment variable, I tried to access the binary through the path '/home/Thiago/pear/bin/pear' but the directory is empty, I'm currently using arch Linux and these are the installation paths, could you help me.

  1. Installation base ($prefix) : /home/Thiago/pear
  2. Temporary directory for processing : /tmp/pear/install
  3. Temporary directory for downloads : /tmp/pear/install
  4. Binaries directory : /home/Thiago/pear/bin
  5. PHP code directory ($php_dir) : /home/Thiago/pear/share/pear
  6. Documentation directory : /home/Thiago/pear/docs
  7. Data directory : /home/Thiago/pear/data
  8. User-modifiable configuration files directory : /home/Thiago/pear/cfg
  9. Public Web Files directory : /home/Thiago/pear/www
  10. System manual pages directory : /home/Thiago/pear/man
  11. Tests directory : /home/Thiago/pear/tests
  12. Name of configuration file : /home/Thiago/.pearrc

echo $PATH
/home/Thiago/pear/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/Thiago/pear/bin:/home/Thiago/pear/bin/pear

uname -srm Linux 6.9.8-arch1-1 x86_64

I've already tried to add the path in Zsh either by "path+='/.../' I also changed the ~/.zshrc and I also tried to look for the binary that was missing but I didn't find it in the system using "whereis"

Upvotes: 0

Views: 92

Answers (2)

A. Wilcox
A. Wilcox

Reputation: 1832

This was fixed upstream in versions 8.2.22 and 8.3.10. To make it work on older versions (I've tested 7.3 and 7.4 series), apply the patch from the issue to PHP:

diff --git a/ext/xml/compat.c b/ext/xml/compat.c
index 7b463ebb5112e..7ca015acc5421 100644
--- a/ext/xml/compat.c
+++ b/ext/xml/compat.c
@@ -375,7 +375,7 @@ _get_entity(void *user, const xmlChar *name)
        if (ret == NULL)
            ret = xmlGetDocEntity(parser->parser->myDoc, name);
 
-       if (ret == NULL || (parser->parser->instate != XML_PARSER_ENTITY_VALUE && parser->parser->instate != XML_PARSER_ATTRIBUTE_VALUE)) {
+       if (ret == NULL || parser->parser->instate == XML_PARSER_CONTENT) {
            if (ret == NULL || ret->etype == XML_INTERNAL_GENERAL_ENTITY || ret->etype == XML_INTERNAL_PARAMETER_ENTITY || ret->etype == XML_INTERNAL_PREDEFINED_ENTITY) {
                /* Predefined entities will expand unless no cdata handler is present */
                if (parser->h_default && ! (ret && ret->etype == XML_INTERNAL_PREDEFINED_ENTITY && parser->h_cdata)) {

Upvotes: 0

mohachi
mohachi

Reputation: 1

i have the exactly same problem, and also i tried to install it from AUR (php-pear package) and didn't work either (neither pear nor pecl commands are found).

Upvotes: -1

Related Questions