PEAR インストール



PEAR - PHP Extension and Application Repositoryからgo-pear.pharをダウンロード。




cd C:\php-5.4.5 php go-pear.phar Are you installing a system-wide PEAR or a local copy? (system|local) [system] :


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:\php-5.4.5 2. Temporary directory for processing : C:\php-5.4.5\tmp 3. Temporary directory for downloads : C:\php-5.4.5\tmp 4. Binaries directory : C:\php-5.4.5 5. PHP code directory ($php_dir) : C:\php-5.4.5\pear 6. Documentation directory : C:\php-5.4.5\docs 7. Data directory : C:\php-5.4.5\data 8. User-modifiable configuration files directory : C:\php-5.4.5\cfg 9. Public Web Files directory : C:\php-5.4.5\www 10. Tests directory : C:\php-5.4.5\tests 11. Name of configuration file : C:\WINDOWS\pear.ini 12. Path to CLI php.exe : C:\php-5.4.5 1-12, 'all' or Enter to continue:


Beginning install... Configuration written to C:\WINDOWS\pear.ini... Initialized registry... Preparing to install... installing phar://C:/php-5.4.5/go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar-1.3.11.tar... installing phar://C:/php-5.4.5/go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt-1.3.1.tar... installing phar://C:/php-5.4.5/go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.9.4.tar... installing phar://C:/php-5.4.5/go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.0.4.tar... installing phar://C:/php-5.4.5/go-pear.phar/PEAR/go-pear-tarballs/XML_Util-1.2.1.tar... install ok: channel:// install ok: channel:// install ok: channel:// install ok: channel:// install ok: channel:// 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: <C:\php-5.4.5\pear> 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 <C:\php-5.4.5\php.ini>? [Y/n] :


php.ini <C:\php-5.4.5\php.ini> include_path updated. Current include path : .;c:\php-5.4.5\includes Configured directory : C:\php-5.4.5\pear Currently used php.ini (guess) : C:\php-5.4.5\php.ini Press Enter to continue:


** WARNING! Old version found at C:\php-5.4.5, please remove it or be sure to use the new c:\php-5.4.5\pear.bat command The 'pear' command is now at your service at c:\php-5.4.5\pear.bat * WINDOWS ENVIRONMENT VARIABLES * For convenience, a REG file is available under C:\php-5.4.5PEAR_ENV.reg . This file creates ENV variables for the current user. Double-click this file to add it to the current user registry.


pear help Commands: build Build an Extension From C Source bundle Unpacks a Pecl Package channel-add Add a Channel (略) Type "pear help options" to list all options. Type "pear help shortcuts" to list all command shortcuts. Type "pear help " to get the help for the specified command.


1-12, 'all' or Enter to continue: の後、Enterを押すと権限の関係で、pear.iniをWINDOWS下に作成することができず、以下のエラーが発生することがある。

Beginning install... PEAR_Config::writeConfigFile fopen('C:\WINDOWS\pear.ini','w') failed (fopen(C:\WINDOWS\pear.ini): failed to open stream: Permission denied)

1-12, 'all' or Enter to continue: の後、11を入力しpear.iniの位置を変更する。

1-12, 'all' or Enter to continue: 11 (Use as a shortcut for 'C:\php-5.4.5', etc.) Name of configuration file [C:\WINDOWS\pear.ini] : C:\php-5.4.5\pear.ini