PECL/PEAR behind Proxy How-To

Setting the proxy systemwide

These exports can be applied to set a systemwide proxy to your console in Linux and Mac OSX.


Make PECL / PEAR use the Proxy

PEAR / PECL won’t use the system proxy, instead you have to set it manually.

Due to a bug in those tools, PECL throws an error whenever you try to set something. Setting a value for PEAR also does it to PECL then:

Both are set now.

Manually compiling a Module

If you don’t want to rely on PECL / PEAR, you can manually do what they do.

Example using the Mongo extension:

This is useful when you setup a virtual machine (with vagrant for example), work behind a proxy in your company or school, or your serverfarm using a proxy.

Leave a Reply

Your email address will not be published. Required fields are marked *