コマンドラインからPEARのローカルコピーをインストールする

PEARのオンラインドキュメント中の
Manual :: 共有ホストでの PEAR のローカルコピーのインストール
の「SSHを使ったインストール」という部分の記載について2箇所、ツッコミを入れてみます。

PEARのインストール

$ pear config-create /home/user/pear .pearrc
とコマンドを打ち込んだ場合、PEARのインストールディレクトリは、〜/pear/pearになり、階層が不必要に深くなってしまいます。
そこで、
$ pear config-create /home/user .pearrc
とコマンドを打って、PEARのインストールディレクトリを〜/pearにしたほうがいいと思いました。
以下は比較です。

$ pear config-create /home/user/pear .pearrc とした場合

CONFIGURATION (CHANNEL PEAR.PHP.NET):
=====================================
Auto-discover new Channels auto_discover
Default Channel default_channel pear.php.net
HTTP Proxy Server Address http_proxy
PEAR server [DEPRECATED] master_server
Default Channel Mirror preferred_mirror
Remote Configuration File remote_config
PEAR executables directory bin_dir /home/user/pear/pear
PEAR documentation directory doc_dir /home/user/pear/pear/docs
PHP extension directory ext_dir /home/user/pear/pear/ext
PEAR directory php_dir /home/user/pear/pear/php
PEAR Installer cache directory cache_dir /home/user/pear/pear/cache
PEAR configuration file cfg_dir /home/user/pear/pear/cfg
directory
PEAR data directory data_dir /home/user/pear/pear/data
PEAR Installer download download_dir /home/user/pear/pear/download
directory
PHP CLI/CGI binary php_bin
php.ini location php_ini
PEAR Installer temp directory temp_dir /home/user/pear/pear/temp
PEAR test directory test_dir /home/user/pear/pear/tests
PEAR www files directory www_dir /home/user/pear/pear/www
Cache TimeToLive cache_ttl
Preferred Package State preferred_state
Unix file mask umask
Debug Log Level verbose
PEAR password (for password
maintainers)
Signature Handling Program sig_bin
Signature Key Directory sig_keydir
Signature Key Id sig_keyid
Package Signature Type sig_type
PEAR username (for username
maintainers)
User Configuration File Filename /home/user/.pearrc
System Configuration File Filename #no#system#config#
Successfully created default configuration file "/home/user/.pearrc"

$ pear config-create /home/user .pearrc とした場合

CONFIGURATION (CHANNEL PEAR.PHP.NET):
=====================================
Auto-discover new Channels auto_discover
Default Channel default_channel pear.php.net
HTTP Proxy Server Address http_proxy
PEAR server [DEPRECATED] master_server
Default Channel Mirror preferred_mirror
Remote Configuration File remote_config
PEAR executables directory bin_dir /home/user/pear
PEAR documentation directory doc_dir /home/user/pear/docs
PHP extension directory ext_dir /home/user/pear/ext
PEAR directory php_dir /home/user/pear/php
PEAR Installer cache directory cache_dir /home/user/pear/cache
PEAR configuration file cfg_dir /home/user/pear/cfg
directory
PEAR data directory data_dir /home/user/pear/data
PEAR Installer download download_dir /home/user/pear/download
directory
PHP CLI/CGI binary php_bin
php.ini location php_ini
PEAR Installer temp directory temp_dir /home/user/pear/temp
PEAR test directory test_dir /home/user/pear/tests
PEAR www files directory www_dir /home/user/pear/www
Cache TimeToLive cache_ttl
Preferred Package State preferred_state
Unix file mask umask
Debug Log Level verbose
PEAR password (for password
maintainers)
Signature Handling Program sig_bin
Signature Key Directory sig_keydir
Signature Key Id sig_keyid
Package Signature Type sig_type
PEAR username (for username
maintainers)
User Configuration File Filename /home/user/.pearrc
System Configuration File Filename #no#system#config#
Successfully created default configuration file "/home/user/.pearrc"

PEARライブラリを使うためのインクルード・パスの設定

PEARのドキュメントの記載通りにインストール作業を進めても、PEARのインストールディレクトリにはlibフォルダは作られかったので、以下の記載はおかしいと思いました。

<?php
ini_set('include_path', '~/pear/lib' . PATH_SEPARATOR
        . ini_get('include_path'));

// PHP 4.3.0 以降ではこの方法も使用できます。
// これは、特に共有ホストなどで有用です。
set_include_path('~/pear/lib' . PATH_SEPARATOR
                 . get_include_path());
?>

そんなわけで、以下のようにしました。

<?php
ini_set('include_path', '~/pear/php' . PATH_SEPARATOR
        . ini_get('include_path'));

// PHP 4.3.0 以降ではこの方法も使用できます。
// これは、特に共有ホストなどで有用です。
set_include_path('~/pear/php' . PATH_SEPARATOR
                 . get_include_path());
?>

~/pear/lib を ~/pear/php に変更しています。