Copy and install the local Pear on the virtual host. read the copy and install the local Pear on the virtual host. on the virtual host rented in China, some hosts provide the pear class library, but you don't need to expect them to upgrade or install the pear package you need. in this case, you can try to install a pear under your own virtual host. install pear over ssh for the vast majority "> <LINKhref =" http: // w
On virtual hosts rented in China, some hosts provide pear class libraries, but you don't have to expect them to upgrade or install the pear packages you need. in this case, you can try to install a pear under your own virtual host.
Install pear through ssh
Most of the domestic virtual hosts do not provide ssh, but if it is a friend's server, it may be a little more relaxed for you. Next let's take a look at the steps to install pear on the virtual host through ssh:
PEAR 1.3.5 or below:
$ Pear-s-c ~ /. Pearrc-d doc_dir = ~ /Pear/docs \
-D ext_dir = ~ /Pear/ext-d php_dir = ~ /Pear/lib \
-D data_dir = ~ /Pear/data-d test_dir = ~ /Pear/tests \
-D cache_dir = ~ /Pear/cache-d bin_dir = ~ /Pear/bin
PEAR 1.4 or above:
$ Pear config-create/home/user/pear. pearrc
In this way, A. pearrc file is created under the user's home.
Add the. bashrc file
PEAR 1.3.2 or below:
$ Pear-c ~ /. Pearrc install Archive_Tar PEAR Console_Getopt XML_RPC
PEAR 1.3.3 or above
$ Pear install-o PEAR
In this way, a pear directory is added under the user's home directory, which completely copies the pear on the host.
To use the installed pear package, you must specify include_path in the php code.
PLAIN TEXT
PHP:
Ini_set ('include _ path ','~ /Pear/lib '. PATH_SEPARATOR
. Ini_get ('include _ path '));
// From PHP 4.3.0 onward, you can use the following,
// Which especially useful on shared hosts:
Set_include_path ('~ /Pear/lib '. PATH_SEPARATOR
. Get_include_path ());
?>
Install pear through ftp/ftps/sftp
It is undoubtedly a good idea to install pear on a remote virtual host through ftp. This function is mainly accomplished through the pear package PEAR_RemoteInstaller. There are several points to be determined:
Php 5.0 or above
If you need to use ftps for installation, you need to add openssl extension for php on the local machine.
If you need to install it using ssh, the local php needs to add ssh2 extension.
The pear command line in the php directory can be executed.
Ftp has write permission
Because of the time relationship, do not write specific steps for the moment. if you need it, you can refer to the following link.
Reference:
Pear manual
Published by volcano on September 10, 2006 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/241