Create a local Pear

Source: Internet
Author: User
Tags config pear

On some hosts, you may not have permission to modify the system's default installation of pear, but you will want to install your own pear package. In this case there are also simple ways to achieve:

First create a pear profile in your own home. PEARRC:

$ pear config-create $HOME. PEARRC

If all goes well, go directly to the next step, or run the following command:

$ pear config-set download_dir /home/(username)/tmp/pear/cache
$ pear config-set cache_dir /home/(username)/tmp/pear/cache
$ pear config-set temp_dir /home/(username)/tmp/pear/temp

Then you can start installing pear, which will be installed with pear's dependent file:

$ Pear Install-o Pear

After this step, pear has been installed, if you also want to install other package, then:

$ pear Install Pear/packagename

So you have a custom pear package, and you need to thank you for writing some extra code to call these pear in the program, which is not in your include_path.

PhP4

PLAIN TEXT
CODE:
ini_set(
'include_path',
 ini_get('include_path').PATH_SEPARATOR."/home/(youruser)/pear/php"
);
php5
PLAIN TEXT
CODE:
set_include_path(
  get_include_path().
  PATH_SEPARATOR.'/home/(youruser)/pear/php'
);

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.