Windows向けXAMPP v5.6.15で pear installがエラーになる
Windows7にXAMPP v5.6.15をインストール。
pearコマンドでHTTP_Clientを追加しようとしたらエラーになった。
サンプルを格納するフォルダが作成できない?
c:\xampp\php>pear install HTTP_Client WARNING: "pear/HTTP_Client" is deprecated in favor of "pear/HTTP_Request2" WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-upd ate pear.php.net" to update WARNING: "pear/HTTP_Request" is deprecated in favor of "pear/HTTP_Request2" downloading HTTP_Client-1.2.1.tgz ... Starting to download HTTP_Client-1.2.1.tgz (10,269 bytes) .....done: 10,269 bytes ERROR: failed to mkdir C:\php\pear\docs\HTTP_Client\examples
pearの設定を確認。確かにドキュメントの格納先が C:\php\pear\docs となっているが、
そんなフォルダはない。
c:\xampp\php>pear config-show CONFIGURATION (CHANNEL PEAR.PHP.NET): ===================================== Auto-discover new Channels auto_discover <not set> Default Channel default_channel pear.php.net ... PEAR documentation directory doc_dir C:\php\pear\docs ... User Configuration File Filename C:\Windows\pear.ini System Configuration File Filename C:\Windows\pearsys.ini
フォルダを作成する。
c:\xampp\php>mkdir c:\php c:\xampp\php>mkdir c:\php\pear c:\xampp\php>mkdir c:\php\pear\docs
今度はインストールに成功。
c:\xampp\php>pear install HTTP_Client WARNING: "pear/HTTP_Client" is deprecated in favor of "pear/HTTP_Request2" WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-upd ate pear.php.net" to update WARNING: "pear/HTTP_Request" is deprecated in favor of "pear/HTTP_Request2" downloading HTTP_Client-1.2.1.tgz ... Starting to download HTTP_Client-1.2.1.tgz (10,269 bytes) .....done: 10,269 bytes install ok: channel://pear.php.net/HTTP_Client-1.2.1
XAMPPの入手はこちら。
XAMPP Installers and Downloads for Apache Friends
https://www.apachefriends.org/jp/index.html