php-pear problem behind proxy

For setting proxy in php-pear
pear config-set http_proxy http://yourproxy:yourportnumber

 
for example form my setting 

pear config-set http_proxy http://192.168.1.15.:8080

 
If you have user name and password then do the following
pear config-set http_proxy http://username:password@yourproxy:80 

Set correct path for pear 
 
First, check where PEAR installs .php files: 
$ pear config-get php_dir
 
Now it's time to find which configuration file is used by
your PHP installation. On command line, execute:
$ php --ini
 
Now check PHP's include_path setting on command line:

$ php -c /path/to/php.ini -r 'echo get_include_path()."\n";'
 
 

Modifying php.ini

To get PEAR working properly, you need to adjust PHP’s include_path. After you found php.ini, open it in an editor.
Search for the line include_path.
Now that you found it, you probably will see a semicolon ; at the beginning. This means the line is a comment. Add a new line below it.
In this line, write: 
include_path="."
 
The result should look like that:
; Unix
include_path=".:/usr/local/php/pear/"
or
; Windows
include_path=".;C:\php\pear\"
 
 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s