Create a local PEAR

Source: Internet
Author: User

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

Create a pear configuration file under your home. pearrc:
$ Pear config-create $ HOME. pearrc

If everything goes well, proceed to the next step. Otherwise, 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 to install pear, which will be connected to the pear dependency file:
$ Pear install-o PEAR

After this step, pear has been installed. If you want to install other packages, then:
$ Pear install pear/PackageName

In this way, you have a customized pear package. To call these pear packages in your program, you need to thank you for writing some additional code. After all, these codes are not in your shortde_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
);
Author: volcano was published on March 13, 2007 at am.

Copyright information: this information can be reproduced at will. During reprinting, you must mark the original source and author information of the article in the form of hyperlinks and this statement.

Permanent Link-http://www.ooso.net/index.php/archives/327

Related Article

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.