Install pear and phpunit under Windows (Note configured PHP command line environment) _win Server

Source: Internet
Author: User
Tags ini soap pack pear
Installation Environment
You need to configure the PHP environment before installing pear, if you don't have your own pear

(Direct access to http://go-pear.org and save its homepage for go-pear.php)

Pear Installation Preparation

If the PHP run environment does not own pear, you will need to download the go-pear.php file and save it in the same directory as the Php.exe.

Pear Installation Steps

1, I use here is the WAMP integrated environment, D:\wamp\bin\php\php5.2.5>go-pear, starts to install automatically.

With this pear installation screenshot, you can see that you first need to confirm Pear's installation directory structure, which is usually automatically recognized by the system.

2, confirmed pear in Windows installation directory structure, enter, start downloading and installing Pear's default expansion pack, you can also choose whether to install the PEAR_FRONTEND_WEB-BETA,PEAR_FRONTEND_GTK2,MDB2 expansion pack.

3, Pear Default expansion pack installed, prompted whether you need to configure the php.ini file in the Include_path option to point to Pear's installation directory, of course, you need to configure, otherwise can not use, Y and enter, the installation package will automatically modify the Include_path option.

Pear installation Complete, double-click Pear_env.reg to import relevant information into the registry, and restart Apache.


Other installation methods for pear

If the PHP running environment is brought pear, you can find the PEAR.DAT file in the PHP directory, double-click the file can be installed in pear, the way should be similar to the installation method above. Also note that you can modify the Include_path option in php.ini.

Pear command

At the command line, you can install the Pear installation package that you want with the related commands of pear.

Pear help lists all of pear's commands, similar to that of Pear's command assistance command.

Pear Help <command> list specific information for a pear command

Pear Help shortcuts lists the abbreviations for all pear commands

Pear List-all Lists all installable packages, many of which can access the Pear Expansion Pack list to find the packages you need, and then install package using the Pear Install command.

(When you install pear, you can have it use the default value and go straight to the end.) )

 

Then install the Unit Test Framework PHPUnit:

D:\wamp\bin\php\php5.2.5>pear Channel-discover pear.phpunit.de
Adding Channel "Pear.phpunit.de" succeeded
Discovery of channel "Pear.phpunit.de" succeeded

d:\wamp\bin\php\php5.2.5>pear Install Phpunit/phpunit
Did not download optional Dependencies:pear/image_graphviz, Pear/log, channel:/
/pear.symfony-project.com/yaml, use--alldeps to download automatically
Phpunit/phpunit requires PEAR Installer (version >= 1.8.1), installed version is
1.6.1
Phpunit/phpunit can optionally use package "Pear/image_graphviz" (Version >= 1.2
.1)
Phpunit/phpunit can optionally use package "Pear/log"
Phpunit/phpunit can optionally use package "channel://pear.symfony-project.com/y
AML "(Version >= 1.0.2)
Phpunit/phpunit can optionally use PHP extension "Pdo_sqlite"
Phpunit/phpunit can optionally use PHP extension "soap"
Phpunit/phpunit can optionally use PHP extension "Xdebug" (Version >= 2.0.5)
No Valid packages found
Install failed
(Installation PHPUnit failed, then continue installation after Pear upgrade Pear is updated )

d:\wamp\bin\php\php5.2.5>pear Upgrade Pear
Downloading pear-1.9.0.tgz ...
Starting to download pear-1.9.0.tgz (291,634 bytes)
......

d:\wamp\bin\php\php5.2.5>pear Info Pear
About pear.php.net/pear-1.9.0
......

d:\wamp\bin\php\php5.2.5>pear channel-discover pear.phpunit.de
Channel "Pear.phpunit.de" is already initialized

d:\wamp\bin\php\php5.2.5>pear Install Phpunit/phpunit
Unknown Remote channel:pear.symfony-project.com
Did not download optional Dependencies:pear/image_graphviz, Pear/log, channel:/
/pear.symfony-project.com/yaml, use--alldeps to download automatically
Phpunit/phpunit can optionally use package "Pear/image_graphviz" (Version >= 1.2
.1)
Phpunit/phpunit can optionally use package "Pear/log"
Phpunit/phpunit can optionally use package "channel://pear.symfony-project.com/y
AML "(Version >= 1.0.2)
Phpunit/phpunit can optionally use PHP extension "Pdo_sqlite"
Phpunit/phpunit can optionally use PHP extension "soap"
Phpunit/phpunit can optionally use PHP extension "Xdebug" (Version >= 2.0.5)
Downloading phpunit-3.4.13.tgz ...
Starting to download phpunit-3.4.13.tgz (254,903 bytes)
... done:254,903 bytes--------------------------------------
Install ok:channel://pear.phpunit.de/phpunit-3.4.13

PHPUnit installation completed, you can enter PHPUnit test

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.