SBクリエイティブ

正誤情報

【正誤情報】PHP+MySQLであなたもウェブアプリが作れる!

2010.05.06
対象書籍
PHP+MySQLであなたもウェブアプリが作れる!

■第5章でpearコマンドが実行できない(認識されない)場合
第5章p150からpearコマンドを使ったMDB2のインストールについて解説しておりますが、
XAMPPのバージョンによってはpearコマンドを使うためには事前の作業が必要です。
ご自分の環境でpearコマンドが認識されない場合は、以下の手順をお試しください
(バージョン1.6.8で確認しています)。

手順0●コマンドプロンプトを起動します。

手順1●最初にカレントフォルダを移動します。
C:>cd c:xamppphp[Enter]

手順2●go-pear.batを実行します。ここでは途中の質問はすべて[Enter]で進めます。
C:xamppphp>go-pear.bat[Enter]

Are you installing a system-wide PEAR or a local copy?
(system|local) [system] :←[Enter]を押す

Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type ‘all’ to change all of them or simply press Enter to
accept these locations.

1. Installation base ($prefix) : C:xamppphp
2. Temporary directory for processing : C:xamppphptmp
3. Temporary directory for downloads : C:xamppphptmp
4. Binaries directory : C:xamppphp
5. PHP code directory ($php_dir) : C:xamppphppear
6. Documentation directory : C:xamppphpdocs
7. Data directory : C:xamppphpdata
8. User-modifiable configuration files directory : C:xamppphpcfg
9. Public Web Files directory : C:xamppphpwww
10. Tests directory : C:xamppphptests
11. Name of configuration file : C:WINDOWSpear.ini
12. Path to CLI php.exe : C:xamppphp.

1-12, ‘all’ or Enter to continue:←[Enter]を押す
Beginning install…
Configuration written to C:WINDOWSpear.ini…
Initialized registry…
Preparing to install…
installing phar://go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar-1.3.2.tar…
installing phar://go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt-1.2.3.tar…
installing phar://go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.7.1.tar…
installing phar://go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.0.2.tar…
pear/PEAR can optionally use package “pear/XML_RPC” (version >= 1.4.0)
install ok: channel://pear.php.net/Archive_Tar-1.3.2
install ok: channel://pear.php.net/Console_Getopt-1.2.3
install ok: channel://pear.php.net/Structures_Graph-1.0.2
install ok: channel://pear.php.net/PEAR-1.7.1
PEAR: Optional feature webinstaller available (PEAR’s web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR’s PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR’s PHP-GTK2-based installer)
PEAR: To install optional features use “pear install pear/PEAR#featurename”

******************************************************************************
WARNING! The include_path defined in the currently used php.ini does not
contain the PEAR PHP directory you just specified:

If the specified directory is also not in the include_path used by
your scripts, you will have problems getting any PEAR packages working.

Would you like to alter php.ini ? [Y/n] :←[Enter]を押す

php.ini include_path updated.

Current include path : .;C:xamppphppear
Configured directory : C:xamppphppear
Currently used php.ini (guess) : C:xamppphpphp.ini
Press Enter to continue:

** WARNING! Old version found at C:xamppphp, please remove it or be sure to use the new c:xamppphppear.bat comma

The ‘pear’ command is now at your service at c:xamppphppear.bat

** The ‘pear’ command is not currently in your PATH, so you need to
** use ‘c:xamppphppear.bat’ until you have added
** ‘C:xamppphp’ to your PATH environment variable.

Run it without parameters to see the available actions, try ‘pear list’
to see what packages are installed, or ‘pear help’ for help.

For more information about PEAR, see:

http://pear.php.net/faq.php
http://pear.php.net/manual/

Thanks for using go-pear!

* WINDOWS ENVIRONMENT VARIABLES *
For convenience, a REG file is available under C:xamppphpPEAR_ENV.reg .
This file creates ENV variables for the current user.

Double-click this file to add it to the current user registry.

続行するには何かキーを押してください . . .←[Enter]を押す

C:xamppphp>

以上でpearコマンドが使えるようになります。
後は書籍の解説のとおりpearコマンドで作業を進めてください。

この記事をシェアする