Reputation: 1
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.
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
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
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