ググったらけっこう情報古くて使えなかったので、自分用メモです。
デフォルトの設定で説明しています。
PEARの使い方とかセキュリティに関してはググってくださいw
環境
- さくらスタンダードプラン
- PHP:5.3.9
WinXP.SP3でTera Term(ターミナルシュミレーター)を使いました。
PEARのインストール
// ダウンロード %wget http://pear.php.net/go-pear.phar // ファイル名変更 %mv go-pear.phar go-pear.php // 実行 %php go-pear.php 1. Installation base ($prefix) : /home/あなたのアカウント/pear 2. Temporary directory for processing : /tmp/pear/install 3. Temporary directory for downloads : /tmp/pear/install 4. Binaries directory : /home/あなたのアカウント/pear/bin 5. PHP code directory ($php_dir) : /home/あなたのアカウント/pear/share/pear 6. Documentation directory : /home/あなたのアカウント/pear/docs 7. Data directory : /home/あなたのアカウント/pear/data 8. User-modifiable configuration files directory : /home/あなたのアカウント/pear/cfg 9. Public Web Files directory : /home/あなたのアカウント/pear/www 10. Tests directory : /home/あなたのアカウント/pear/tests 11. Name of configuration file : /home/あなたのアカウント/.pearrc
「9.Public Web Files directory」を「/home/あなたのアカウント/www」に変更(pear/をトル)
あとは「Y」と「Enter」を押すところが1箇所づつありました。
// PEARのリスト表示 %pear list Installed packages, channel pear.php.net: ========================================= Package Version State Archive_Tar 1.3.7 stable Console_Getopt 1.3.0 stable PEAR 1.9.4 stable Structures_Graph 1.0.4 stable XML_Util 1.2.1 stable
さくらコンパネの「php.ini」の設定
以下を設定
language = "Japanese" mbstring.internal_encoding = "UTF8" mbstring.encoding_translation = Off allow_url_fopen = On allow_url_include = On file_uploads = On include_path=".:/home/あなたのアカウント/pear/share/pear"
で、動きました。