0
(0)

■ Windows でも PHP pear 使いたいよね。

<前提条件>
php は、C:php にあるものとする。

php.ini は、C:php にあるものとし最終行に「extension=php_extname.dll
」が追加されていること。

また、php.ini で使用することがないエクステンションDLLはコメントアウトしておくこと。

これから、pear.ini を作成するのは C:phppear.ini とする。

PECL入れたい環境も、まず基本確認から。

<動作確認環境>

Windows 7 x64 + PHP 5.3.8 (cli) / Zend v2.3.0 / IIS with WebMatrix

1.go-pear.bat を叩く

c:PHP>go-pear.bat 

2. すなわち前提条件を次のように指定する。

1. Installation base ($prefix) : C:PHP

2. Temporary directory for processing : C:PHPtmp

3. Temporary directory for downloads : C:PHPtmp

4. Binaries directory : C:PHP

5. PHP code directory ($php_dir) : C:PHPpear

6. Documentation directory : C:PHPdocs

7. Data directory : C:PHPdata

8. User-modifiable configuration files directory : C:PHPcfg

9. Public Web Files directory : C:PHPwww

10. Tests directory : C:PHPtests

11. Name of configuration file : C:PHPpear.ini

12. Path to CLI php.exe : C:PHP

3. インストール・フロー

Beginning install…

Configuration written to C:PHPpear.ini…

Initialized registry…

Preparing to install…

installing phar://C:/PHP/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar-1.3.3.tar…

installing phar://C:/PHP/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt-1.2.3.tar…

installing phar://C:/PHP/PEAR/go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.9.0.tar…

installing phar://C:/PHP/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.0.2.tar…

installing phar://C:/PHP/PEAR/go-pear.phar/PEAR/go-pear-tarballs/XML_Util-1.2.1.tar…

install ok: channel://pear.php.net/Archive_Tar-1.3.3

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/XML_Util-1.2.1

install ok: channel://pear.php.net/PEAR-1.9.0

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! Old version found at C:PHP, please remove it or be sure to use the new c:phppear.bat command

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

* WINDOWS ENVIRONMENT VARIABLES *

For convenience, a REG file is available under C:PHPPEAR_ENV.reg .

This file creates ENV variables for the current user.

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

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

4.環境変数をレジストリ一発登録するための PEAR_ENV.reg を叩く

(↓ 中身)

REGEDIT4

[HKEY_CURRENT_USEREnvironment]

“PHP_PEAR_SYSCONF_DIR”=”C:\PHP”

“PHP_PEAR_INSTALL_DIR”=”C:\PHP\pear”

“PHP_PEAR_DOC_DIR”=”C:\PHP\docs”

“PHP_PEAR_BIN_DIR”=”C:\PHP”

“PHP_PEAR_DATA_DIR”=”C:\PHP\data”

“PHP_PEAR_PHP_BIN”=”C:\PHP\php.exe”

“PHP_PEAR_TEST_DIR”=”C:\PHP\tests”

これで使用可能。

以上

 

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

投稿者 斉藤之雄 (Yukio Saito)

Global Information and Communication Technology OTAKU / Sports volunteer / Social Services / Master of Technology in Innovation for Design and Engineering, AIIT / BA, Social Welfare, NFU / twitter@yukio_saitoh