Edit report at http://pear.php.net/bugs/bug.php?id=16244&edit=1

ID: 16244
Updated by: daniel.oconnor@gmail.com
Reported By: hoareau dot olivier at gmail dot com
Summary: Provide http_proxy config variable for each channel
-Status: Open
+Status: Duplicate
Type: Feature/Change Request
Package: PEAR
Operating System: windows
Package Version: 1.8.1
PHP Version: 5.2.5
Roadmap Versions:
New Comment:

-Status: Open
+Status: Duplicate

Previous Comments:

[2009-05-20 16:42:27] ohoareau

When using PEAR installer inside a company lan you often
need to use a proxy to download third party channels.
Indeed, when using your own PEAR channel on your local lan,
you need to use proxy for third party packages (on internet,
or for pear.php.net packages for example) BUT no proxy for
your local packages.
Indeed if one of your local package depends on a third party
package (example : your create a "desktop installation
package" that depends on all popular php tools package
available on internet) when you use the command :
$ pear install mychannel/mypackage
the PEAR installer will need to access directly the mychannel
channel BUT to use a proxy to pick up the packages and
channel.xml (REST files) on the dependencies channels.

Currently, it is possible to define channel-based configuration
variable using config-set BUT http_proxy configuration
variable is not activated in this list of channel-based variable
because at least PEAR/Command/Channels.php,
PEAR/Command/Remote.php, PEAR/Downloader.php and
PEAR/REST.php are not compliant with multiple proxies
(channel-based proxies).

I request to have a channel-based http_proxy configuration
variable as a new feature.

Test script:
In PEAR 1.8.1 distribution, I made following patches :

*** PEAR/Command/Channels.php
- Line 243 : $loc = $downloader->downloadHttp($channel, $this->ui,
- Line 545 : $this->ui, $tmpdir, null,
- Line 553 : $this->ui, $tmpdir, null,
- Line 593 : $this->ui, $tmpdir, null,

*** PEAR/Command/Remote.php
- Line 177 : '/channel.xml',

*** PEAR/Downloader.php
- Line 1585 : if ($config->get('http_proxy',null,$channel) &&
- Line 1586 : $proxy =
parse_url($config->get('http_proxy',null,$channel))) {

*** PEAR/REST.php
- Line 315 : if ($this->config->get('http_proxy',null,$channel)&&
- Line 316 : $proxy =

I am not sure this is a complete and bug-free patch but it works fine
for me

Expected result:
Channel-based http_proxy configuration variable

Actual result:
Using proxy defined in http_proxy configuration variable for all
channels and packages


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
postedMay 21, '09 at 1:22p
activeMay 21, '09 at 1:22p

1 user in discussion

Daniel Oconnor: 1 post



site design / logo © 2022 Grokbase