Phpdocumentor: pear install not working

Created on 19 Sep 2016  路  59Comments  路  Source: phpDocumentor/phpDocumentor

Hi,
pear channel-discover pear.phpdoc.org is not working for me -- here is the failure message:

Discovering channel pear.phpdoc.org over http:// failed with message: channel-add: Cannot open "http://pear.phpdoc.org/channel.xml" (Connection to pear.phpdoc.org:443' failed: ) Trying to discover channel pear.phpdoc.org over https:// instead Discovery of channel "pear.phpdoc.org" failed (channel-add: Cannot open "https://pear.phpdoc.org/channel.xml" (Connection topear.phpdoc.org:443' failed: ))
Roberts-MBP:~ rcrooks$ pear channel-discover pear.phpdoc.org
Discovering channel pear.phpdoc.org over http:// failed with message: channel-add: Cannot open "http://pear.phpdoc.org/channel.xml" (Connection to pear.phpdoc.org:443' failed: ) Trying to discover channel pear.phpdoc.org over https:// instead Discovery of channel "pear.phpdoc.org" failed (channel-add: Cannot open "https://pear.phpdoc.org/channel.xml" (Connection topear.phpdoc.org:443' failed: ))

I'm not a PHP pro by any means, so not sure where to go from here.

question

Most helpful comment

After some more experimentation, I found that the following workaround works:

wget https://pear.phpdoc.org/channel.xml
pear channel-add ./channel.xml
pear install https://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz

My current conclusion would be that the PEAR installer does not seem to like redirects from http to https?

All 59 comments

Are you running it using sudo? pretty sure you need root privs on most distros.

@jaapio Thanks, tried with sudo but still get Cannot open "http://pear.phpdoc.org/channel.xml" (Connection to `pear.phpdoc.org:443' failed: )

If I try to ping that address, it also fails.

Same issue here.

Running the command using sudo didn't solve my problem and the ping also fails.

hi,
Even if is an old question and just for future reference hoping that this can help someone else that has same problem, i solved using an update version of Pear following instructions on this page: https://pear.php.net/manual/en/installation.getting.php

I am also having this exact issue. I've tried updating my pear version, but I am using the latest version.

I have tried to reproduce this issue using Docker but weren't able to. The only thing I can imagine is either some sort of PEAR weirdness, that at that time the server was unavailable or gremlins. Because we cannot reproduce the issue and it seems not to be related to phpDocumentor (or the server which is currently working) I am going to close the issue. If more information becomes available, including PHP version or something, that may help us to reproduce or investigate the issue I will reopen the issue or create a new one.

For your information, I took the following steps:

host$ docker run -it php:7 bash
guest$ pear channel-add http://pear.phpdoc.org/channel.xml
guest$ pear install phpdoc/phpDocumentor

These commands resulted in a running phpDocumentor.

same here (win7 x64):

C:\>pear upgrade PEAR
Nothing to upgrade


C:\>pear channel-discover pear.phpdoc.org
Discovering channel pear.phpdoc.org over http:// failed with message: channel-add: Cannot open "http://pear.phpdoc.org/channel.xml" (Connection to `ssl://pear.p
hpdoc.org:443' failed: )
Trying to discover channel pear.phpdoc.org over https:// instead
Discovery of channel "pear.phpdoc.org" failed (channel-add: Cannot open "https://pear.phpdoc.org/channel.xml" (Connection to `ssl://pear.phpdoc.org:443' failed:
 ))

Any ideas?

The only thing I can imagine is that your PEAR installation has issues with the certificate; I just checked it and the certificate's root domain is that of one of my other domains. We are in the process of migrating the domain to another host and using let's encrypt; perhaps after that it will be better. Either that or a local issue such as a corrupted pear cache

@mvriel
any updates on this issue?

Nope, migrating the PEAR channel takes time, which I am in limited supply of :)

The same question. Why http redirect to `https?

Discovering channel pear.phpdoc.org over http:// failed with message: channel-add: Cannot open "http://pear.phpdoc.org/channel.xml" (Connection to ssl://pear.phpdoc.org:443' failed: ) Trying to discover channel pear.phpdoc.org over https:// instead Discovery of channel "pear.phpdoc.org" failed (channel-add: Cannot open "https://pear.phpdoc.org/channel.xml" (Connection tossl://pear.phpdoc.org:443' failed: ))

What versions of PEAR are the folks running that are seeing the channel error?

I am using this ->
https://pkgs.alpinelinux.org/package/v3.3/main/x86/php-pear

Package php-pear
Version 5.6.30-r0

@papriwal-prateek that page doesn't show me what version of PEAR itself is included in that php-pear package. Can you run pear -V to see? Note that's a capital -V.

@ashnazg
pear -V

PEAR Version: 1.10.1
PHP Version: 5.6.30
Zend Engine Version: 2.6.0

Hi All,
I attempted to use the bundled version of pear (1.10.4) for Mamp 4.1.1 with PHP 7.1.1 but got the error above.

Here's the workaround I tried.

I attempted to directly browse to the xml file in question to see if it is possible to access it manually, in Chrome it throws an error that the Time/Date for the certificate is invalid, as pear.phpdoc.org uses HSTS, to view the file you need to click anywhere on the error message and type badidea. This will bypass the HSTS warning until your sessions ends (Good idea to restart your session after doing this.) and allow you to view the XML document, copy and past that into a new file and save it. I saved mine into the directory pear is installed in for Mamp:

/Applications/MAMP/bin/php/php7.1.1/bin

I saved it as php-doc.xml

Then in terminal (From that directory) I run the command:

./pear channel-add php-doc.xml

That allowed me to add the channel manually, however, as the server isn't reachable by Pear (Due to it having a bad certificate time/date) you can't actually install as it fails to see the available packages with the error:

Connection to 'ssl://pear.phpdoc.org:443' failed:

when attempting to list the packages and when attempting to install it fails with the error:

No releases available for package "pear.phpdoc.org/phpDocumentor" install failed

So for now I'm out of ideas, for the sake of completeness, I have also attempted Upgrading PEAR and clearing the cache, each of which yielded no better results. Just have to wait for the Cert transfer to finish and try again.

Ok, so after a little bit of sleep, It is possible to manually install the package with Pear.

So to begin, you need to add the channel as detailed above. Then, navigate to pear.phpdoc.org and download the latest tar of the package. Finally run the command:

./pear install /Path/To/The/Downloaded/Tar.tar

This will manually install the package using Pear. Hopefully when the Cert is sorted Pear should be able to upgrade and such as usual.

We moved our pear channel and updated the ssl certificates. Everything should be operating as expected. Let us know if you experience any issues.

Hi @jaapio just tried installing phpdoc on my local machine (Mac running MAMP, with php version 5.5.38 and php version 7.1.1) and on my remote machine running a LAMP stack with php version 5.5.9, all of these fail to add the channel with an error stating the channel.xml file is invalid.

I can reproduce this using docker:

docker run php:7 pear channel-discover pear.phpdoc.org

It doesn't make sense for me since I see that https://pear.phpdoc.org/channel.xml is a valid XML document

Hi, we also encounter the problem since few days.

In our case this workaround works to add / register the channel.

wget https://pear.phpdoc.org/channel.xml
pear channel-add ./channel.xml

But now the following does not work.

pear install phpdoc/phpDocumentor
No releases available for package "pear.phpdoc.org/phpDocumentor"
install failed
The command '/bin/sh -c pear install phpdoc/phpDocumentor' returned a non-zero code: 1

Then I tried to install a specific version with this command and it worked (the warning could help).

pear install http://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz
downloading phpDocumentor-2.9.0.tgz ...
Starting to download phpDocumentor-2.9.0.tgz (16,175,113 bytes)
......................................................................................................................................................................................................................................................................done: 16,175,113 bytes
WARNING: channel "pear.phpdoc.org" has updated its protocols, use "pear channel-update pear.phpdoc.org" to update
install ok: channel://pear.phpdoc.org/phpDocumentor-2.9.0

Also, I did not try it but perhaps a good solution to install PhpDocumentor globally would be to use the PHAR as PhpUnit does it, for example.

wget https://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
mv phpunit.phar /usr/local/bin/phpunit

Hope this helps.

@bgaillard do you still have those issues? We updated our pear channel yesterday. So I think it should work as before.
You might follow the instructions of pear as described in the warning. Since things can be slightly different.
As @mvriel said it works for a fresh install. I don't have an environment where I can test with the old setup.

If switching to a global installed phar is a solution for you. Is ok. Both installations will work the same way in fact.

I am getting this error:

> pear channel-discover pear.phpdoc.org
Error: Unable to create XML parser
Discovering channel pear.phpdoc.org over http:// failed with message: channel-add: invalid channel.xml file
Trying to discover channel pear.phpdoc.org over https:// instead
Error: Unable to create XML parser
Discovery of channel "pear.phpdoc.org" failed (channel-add: invalid channel.xml file)

Did you try to install it over https like pear suggested?

yes it worked over https. Thanks.

@bgaillard do you still have those issues? We updated our pear channel yesterday. So I think it should work as before.

@jaapio I tried the install today so it seems I executed it after your update. Perhaps the error we have is Docker specific because we encounter this error while building our Jenkins Docker container and @mvriel reproduce it with Docker too.

Also, because we encounter this problem while building a Docker container the install is normally done on a "very fresh" system without any previous PEAR install.

Thanks for the update, we will have a look!

Other interesting info from the PEAR documentation https://pear.php.net/manual/en/pyrus.commands.channeldiscover.php.

This command searches for a channel.xml first at a secure https and then unsecured http address.

php pyrus.phar channel-discover pear.example.com

This tries to locate https://pear.example.com/channel.xml and if that fails, http://pear.example.com/channel.xml, then adds the channel to the registry.

So I suspect that the HTTPS il always requested and trying to "force" PEAR to requests the HTTPS endpoint has the same effect.

Thanks !

@bgaillard we are always redirecting you to https. Https is not available in your build platform?

We were able to reproduce your issue. And we also resolved it. because some dns changes where required it might take some time for you to have the actual solution.

It seems that CDN functionality of cloudfare was causing issues for pear to work correctly. beside that we removed the redirect to https. We would like to hear from you as well when the issues are resolved on your side to.

Thanks!

Hi again @jaapio and thanks a lot for this fix and your reactivity on this case 馃憤 馃憤 馃憤

I just tested it again and it works like a charm now 馃槃.

So I think you can close this case.

Thanks for the heads up. And all feedback!

Hi, we also encounter the problem since few days.

In our case this workaround works to add / register the channel.

wget https://pear.phpdoc.org/channel.xml
pear channel-add ./channel.xml

But now the following does not work.

pear install phpdoc/phpDocumentor
No releases available for package "pear.phpdoc.org/phpDocumentor"
install failed
The command '/bin/sh -c pear install phpdoc/phpDocumentor' returned a non-zero code: 1

Then I tried to install a specific version with this command and it worked (the warning could help).

pear install http://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz
downloading phpDocumentor-2.9.0.tgz ...
Starting to download phpDocumentor-2.9.0.tgz (16,175,113 bytes)
......................................................................................................................................................................................................................................................................done: 16,175,113 bytes
WARNING: channel "pear.phpdoc.org" has updated its protocols, use "pear channel-update pear.phpdoc.org" to update
install ok: channel://pear.phpdoc.org/phpDocumentor-2.9.0

Also, I did not try it but perhaps a good solution to install PhpDocumentor globally would be to use the PHAR as PhpUnit does it, for example.

wget https://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
mv phpunit.phar /usr/local/bin/phpunit

Hope this helps.

This fails for me.

Could not download from "http://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz" (File http://pear.phpdoc.org:80/get/phpDocumentor-2.9.0.tgz not valid (received: HTTP/1.1 308 Permanent Redirect))
Invalid or missing remote package file
install failed

using https://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz instead worked.

downloading phpDocumentor-2.9.0.tgz ...
Starting to download phpDocumentor-2.9.0.tgz (16,175,113 bytes)
.......done: 16,175,113 bytes
WARNING: channel "pear.phpdoc.org" has updated its protocols, use "pear channel-update pear.phpdoc.org" to update
install ok: channel://pear.phpdoc.org/phpDocumentor-2.9.0

I'm trying to do the same Christian does but doesn't work for me
pear install https://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz

But I get this error message:
downloading phpDocumentor-2.9.0.tgz ... Starting to download phpDocumentor-2.9.0.tgz (16,175,113 bytes) .......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................done: 16,175,113 bytes Validation Error: Unknown channel "pear.phpdoc.org" Parsing of package.xml from file "C:\Users\User\AppData\Local\Temp\pear\temp\peaC379.tmp/package.xml" failed Download of "https://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz" succeeded, but it is not a valid package archive Invalid or missing remote package file install failed

Before try this I was following the installing steps I saw here https://www.phpdoc.org/ but doesn't work for me

Hi there,

None of the above methods are working for me at all for installing through Pear (I am testing this with an existing application and rather not pollute my workspace via composer to test this):

pear channel-discover https://pear.phpdoc.org

Discovering channel https://pear.phpdoc.org over http:// failed with message: channel-add: Cannot open "http://https://pear.phpdoc.org/channel.xml" (Connection to `https:80' failed: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known)
Trying to discover channel https://pear.phpdoc.org over https:// instead
Discovery of channel "https://pear.phpdoc.org" failed (channel-add: Cannot open "https://https://pear.phpdoc.org/channel.xml" (Connection to `ssl://https:443' failed: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known))

and

pear install https://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz

downloading phpDocumentor-2.9.0.tgz ...
Starting to download phpDocumentor-2.9.0.tgz (16,175,113 bytes)
.........done: 16,175,113 bytes
Validation Error: Unknown channel "pear.phpdoc.org"
Parsing of package.xml from file "/private/tmp/pear/temp/pearjcdlK4/package.xml" failed
Download of "https://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz" succeeded, but it is not a valid package archive
Invalid or missing remote package file
install failed

PHP version (docs say it needs 5, maybe reason but seems weird?):

PHP 7.2.25 (cli) (built: Nov 22 2019 10:27:28) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Xdebug v2.7.2, Copyright (c) 2002-2019, by Derick Rethans
    with Zend OPcache v7.2.25, Copyright (c) 1999-2018, by Zend Technologies

Pear version:

PEAR Version: 1.10.9
PHP Version: 7.2.25
Zend Engine Version: 3.2.0
Running on: Darwin Link2Feeds-MacBook-Pro.local 19.2.0 Darwin Kernel Version 19.2.0: Sat Nov  9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64 x86_64

Hi there,

Please open new issues on Github instead of resurrecting a closed thread; we do monitor replies to Github issues but it can happen that we miss replies to old closed issues.

I have been able to reproduce an issue with the PEAR installation by running:

docker run -it --rm php:7 /bin/bash
pear channel-discover pear.phpdoc.org

Where I get the following output:

root@a784c3a8fd00:/# pear channel-discover pear.phpdoc.org
Discovering channel pear.phpdoc.org over http:// failed with message: channel-add: Cannot open "http://pear.phpdoc.org/channel.xml" (File http://pear.phpdoc.org:80/channel.xml not valid (received: HTTP/1.1 308 Permanent Redirect
))
Trying to discover channel pear.phpdoc.org over https:// instead
Error: Unable to create XML parser
Discovery of channel "pear.phpdoc.org" failed (channel-add: invalid channel.xml file)

But doing a cURL request to https://pear.phpdoc.org/channel.xml yields a valid XML valid (I used an online XML validator to verify this).

The only thing I noticed was that the XML file refers to an http and not an https version of the XSD; perhaps this triggers an issue in PEAR?

So far, it eludes me why this would fail now.

@ashnazg you are more familiar with PEAR, could you figure out what is going on?

After some more experimentation, I found that the following workaround works:

wget https://pear.phpdoc.org/channel.xml
pear channel-add ./channel.xml
pear install https://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz

My current conclusion would be that the PEAR installer does not seem to like redirects from http to https?

After some more experimentation, I found that the following workaround works:

wget https://pear.phpdoc.org/channel.xml
pear channel-add ./channel.xml
pear install https://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz

My current conclusion would be that the PEAR installer does not seem to like redirects from http to https?

First of all, I'm new with github sorry for that. I thought that if we used this thread we had more information.

I tried to make the same you did and that's what I get:

C:\>wget https://pear.phpdoc.org/channel.xml
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files (x86)\GnuWin32/etc/wgetrc
--2020-01-09 09:46:16--  https://pear.phpdoc.org/channel.xml
Resolviendo pear.phpdoc.org... 104.27.134.137, 104.27.135.137
Connecting to pear.phpdoc.org|104.27.134.137|:443... conectado.
OpenSSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
No se pudo establecer la conexi贸n SSL.

I connect but the SSL connection fails.

Thanks in advance @mvriel

In my case, I'm working with:

PEAR Version: 1.10.1
PHP Version: 5.6.31
Zend Engine Version: 2.6.0
Running on: Windows NT DESKTOP-U5ECV9K 10.0 build 18362 (Windows 10) i586

So by adding the channel via the downloaded XML it seems fine at first:

pear channel-add ./channel.xml.1

Adding Channel "pear.phpdoc.org" succeeded

but when trying to install phpDocumentor it fails like so:

pear install https://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz

downloading phpDocumentor-2.9.0.tgz ...
Starting to download phpDocumentor-2.9.0.tgz (16,175,113 bytes)
....done: 16,175,113 bytes
WARNING: channel "pear.phpdoc.org" has updated its protocols, use "pear channel-update pear.phpdoc.org" to update
ERROR: failed to create /usr/local/opt/[email protected]/bin/.tmpphpdoc: fopen(/usr/local/opt/[email protected]/bin/.tmpphpdoc): failed to open stream: Permission denied

When trying to run the update command it gives me it returns the same error as channel-discover more or less:

pear channel-update pear.phpdoc.org

Updating channel "pear.phpdoc.org"
Channel "pear.phpdoc.org" is not responding over http://, failed with message: File http://pear.phpdoc.org:80/channel.xml not valid (received: HTTP/1.1 308 Permanent Redirect
)
Trying channel "pear.phpdoc.org" over https:// instead
XML Error: 'Not well-formed (invalid token)' on line '1'

@mvriel sorry for reviving, I should have known, I was just in a rush to get home at the end of the day yesterday that I just went with the first thread Google served up.

@firrae Looks like you have a permission problem, you can try as root

I tried to do the other commands but sadly it fails

C:\>pear channel-add ./channel.xml
channel-add: cannot open "./channel.xml"
C:\>pear install https://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz
downloading phpDocumentor-2.9.0.tgz ...
Starting to download phpDocumentor-2.9.0.tgz (16,175,113 bytes)
.....done: 16,175,113 bytes
Validation Error: Unknown channel "pear.phpdoc.org"
Parsing of package.xml from file "C:\Users\User\AppData\Local\Temp\pear\temp\peaF891.tmp/package.xml" failed
Download of "https://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz" succeeded, but it is not a valid package archive
Invalid or missing remote package file
install failed

@Hector-Aguilar-STD weird, you are right, but that folder is writeable by most other things. Interesting. Well it's mostly installed now I guess, I'll just need to play with things to get the permissions right.

I'm glad to know that works for you.

Now I'm the only one who cannot install it, send me help

@Hector-Aguilar-STD I wouldn't say it "works" yet, it simply says it installed. I'm getting other errors now but I can't identify yet if they are due to the install, or my weird apparent environment issues.

@mvriel I wonder if my issues stem from PHP being installed through Brew on my Mac?

@ZerooCool In the first link,those command are here, we tried, and in my case aren't the solution unfortunately.
In the second link, the first command works if I add --no-check-certificate but the second command enters in a loop when I try to assign locations for the files, changing the options by default or not.

@Hector-Aguilar-STD
I am not a regular and informed user of this project. I tested quickly. Do you have more information, error message, or, logs to share, to allow better understanding?

@ZerooCool I added the error responses I get on older comments, right now I'm not focusing on this sorry for my poor response

@Hector-Aguilar-STD
What is the 2nd link you indicate that runs in a loop?

Can you indicate again, your operating system, your php version? Can you indicate your complete method again?

Did you uninstall Pear completely before trying to reinstall?

If you use the tutorial here, which I tested on Linux mint, what's going on? ( This tuto is for PHP 7.2 )

https://wiki.visionduweb.fr/index.php?title=Sommaire_des_tutoriels_pour_developpeur#D.C3.A9sinstaller_Pear

@ZerooCool on this comment you added an other thread and a link to a tutorial. I see it's the same thread, I was wrong.

I use this method : #2113

From : https://wiki.visionduweb.fr/index.php?title=Sommaire_des_tutoriels_pour_developpeur#PHPDocumentor

I followed the tutorial and I had some issues reinstalling pear, finally I have pear again. Anyway I'm having the same errors trying to install phpDocumentor.
I see on the tutorial they use wget https://pear.phpdoc.org/channel.xml and pear channel-add ./channel.xml, does commands don't work properly on my case.

C:\>wget https://pear.phpdoc.org/channel.xml
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files (x86)\GnuWin32/etc/wgetrc
--2020-01-21 12:53:57--  https://pear.phpdoc.org/channel.xml
Resolviendo pear.phpdoc.org... 104.27.134.137, 104.27.135.137
Connecting to pear.phpdoc.org|104.27.134.137|:443... conectado.
OpenSSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
No se pudo establecer la conexi贸n SSL.

C:\>pear channel-add ./channel.xml
channel-add: cannot open "./channel.xml"

C:\>pear install phpdoc/phpDocumentor
Attempting to discover channel "phpdoc"...
Attempting fallback to https instead of http on channel "phpdoc"...
unknown channel "phpdoc" in "phpdoc/phpDocumentor"
invalid package name/package file "phpdoc/phpDocumentor"
install failed

I cannot get this channel and obviusly I cannot follow the tutorial, if I'm not wrong these are the steps I have to follow.

Alternative solution, use http and not https ?

wget http://pear.phpdoc.org/channel.xml
pear channel-add ./channel.xml
pear install phpdoc/phpDocumentor

Or, you can copy past, from your browser ?
https://pear.phpdoc.org/channel.xml

I read, you can test with install ca-certificates, i don't know ?

sudo apt-get update && sudo apt-get install ca-certificates

Just update your wget ?

sudo apt-get install wget

Or if it is already supporting another secure protocol, just add it as argument :

wget https://example.com --secure-protocol=PROTOCOL_v1

I read, for Windows !
I suggest installing wget using Chocolatey, the package manager for Windows. This should give you a more recent version (if not the latest).
Run this command after having installed Chocolatey (as Administrator):

choco install wget

For HTTP I get this message

C:\>wget http://pear.phpdoc.org/channel.xml
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files (x86)\GnuWin32/etc/wgetrc
--2020-01-21 16:16:58--  http://pear.phpdoc.org/channel.xml
Resolviendo pear.phpdoc.org... 104.27.134.137, 104.27.135.137
Connecting to pear.phpdoc.org|104.27.134.137|:80... conectado.
Petici贸n HTTP enviada, esperando respuesta... 308 Permanent Redirect
2020-01-21 16:16:58 ERROR 308: Permanent Redirect.

I downloaded the XML file with the browser. The commands I did after:

C:\wgetdown>pear channel-add ./channel.xml
Adding Channel "pear.phpdoc.org" succeeded

C:\wgetdown>pear install phpdoc/phpDocumentor
No releases available for package "pear.phpdoc.org/phpDocumentor"
install failed

Hum, it's not my way !
You use the first solution, don't work for me !
After you add ./channel.xml, use the link for the v2.9.0 version.

wget https://pear.phpdoc.org/channel.xml
pear channel-add ./channel.xml

# ------>
pear install http://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz
wget https://github.com/phpDocumentor/phpDocumentor2/releases/download/v2.9.0/phpDocumentor.phar
sudo mv phpDocumentor.phar /usr/local/bin/phpdoc
sudo chmod +x /usr/local/bin/phpdoc

If you want use your way, test with that :
Can you test : https://github.com/phpDocumentor/phpDocumentor/issues/1076

Hi,

I am facing same issue...
pear channel-discover pear.phpdoc.org is not working for me -- here is the failure message:

Discovering channel pear.phpdoc.org over http:// failed with message: channel-add: Cannot open "http://pear.phpdoc.org/channel.xml" (Connection to pear.phpdoc.org:443' failed: ) Trying to discover channel pear.phpdoc.org over https:// instead Discovery of channel "pear.phpdoc.org" failed (channel-add: Cannot open "https://pear.phpdoc.org/channel.xml" (Connection topear.phpdoc.org:443' failed: ))
Roberts-MBP:~ rcrooks$ pear channel-discover pear.phpdoc.org
Discovering channel pear.phpdoc.org over http:// failed with message: channel-add: Cannot open "http://pear.phpdoc.org/channel.xml" (Connection to pear.phpdoc.org:443' failed: ) Trying to discover channel pear.phpdoc.org over https:// instead Discovery of channel "pear.phpdoc.org" failed (channel-add: Cannot open "https://pear.phpdoc.org/channel.xml" (Connection topear.phpdoc.org:443' failed: ))

I'm not a PHP pro by any means, so not sure where to go from here.

@shraddha2v9kulkarni Have you test my last proposition ?

I have not tried your last proposition, because mine is windows system. I am not able to run wget command here. Can you suggest me suitable solution?

( wget for Windows )
Use PowerShell.

$clnt=new-object System.Net.WebClient;
$clnt.DownloadFile('http://pear.phpdoc.org/channel.xml','C:\path_to_save\channel.xml')

Source : https://dyrk.org/2016/02/26/windows-faire-un-wget-nativement-sur-windows/

After some more experimentation, I found that the following workaround works:

wget https://pear.phpdoc.org/channel.xml
pear channel-add ./channel.xml
pear install https://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz

My current conclusion would be that the PEAR installer does not seem to like redirects from http to https?

this worked for me. Thank you!

The pear install still doesn't work correctly. When manually adding the channel.xml to pear as described by @mvriel and you check the remote-list phpDoc isn't available due to an invalid XML:

pear remote-list -c PHPDoc
File http://pear.phpdoc.org:80/rest/c/categories.xml not valid (received: HTTP/1.1 308 Permanent Redirect)
pear install phpdoc/phpDocumentor
No releases available for package "pear.phpdoc.org/phpDocumentor"
install failed
Was this page helpful?
0 / 5 - 0 ratings

Related issues

neooblaster picture neooblaster  路  4Comments

adjenks picture adjenks  路  5Comments

zackkatz picture zackkatz  路  6Comments

niden picture niden  路  4Comments

h0gar picture h0gar  路  4Comments