PEAR is installed on Windows, and PHPUnit is successfully installed.

Source: Internet
Author: User
Tags channel pear
If PEAR is installed in Windows and PHPUnit is successful, the following installation steps are required: Windows + APMServ5.2.6PHP5 and above: 1. start Windows-& gt; run-& gt; cmd2 and install command d: cdD: APMServ5.2.6PHPD: APMServ5.2.6PHP & gt; go-pear.bat? Areyouinstall install PEAR in Windows. PHPUnit is successfully installed.
Environment requirements:

Windows + APMServ5.2.6/PHP5 or above

Installation steps:

1. start Windows-> Run-> cmd

2. Installation Command

D:
Cd D: \ APMServ5.2.6 \ PHP
D: \ APMServ5.2.6> go-pear.bat

? Are you installing a system-wide PEAR or a local copy?
(System | local) [system]:?Press Enter)

Below is a suggested file layout for your new PEAR installation .? To
Change inpidual locations, type the number in front of
Directory .? Type 'all' to change all of them or simply press Enter
Accept these locations.

? 1. Installation base ($ prefix )?????????????????? : D: \ APMServ5.2.6 \ PHP
? 2. Temporary directory for processing ??????????? : D: \ APMServ5.2.6 \ PHP \ tmp
? 3. Temporary directory for downloads ???????????? : D: \ APMServ5.2.6 \ PHP \ tmp
? 4. Binaries directory ??????????????????????????? : D: \ APMServ5.2.6 \ PHP
? 5. PHP code directory ($ php_dir )???????????????? : D: \ APMServ5.2.6 \ PHP \ pear
? 6. Documentation directory ?????????????????????? : D: \ APMServ5.2.6 \ PHP \ docs
? 7. Data directory ??????????????????????????????? : D: \ APMServ5.2.6 \ PHP \ data
? 8. User-modifiable configuration files directory: D: \ APMServ5.2.6 \ PHP \ cfg
? 9. Public Web Files directory ??????????????????? : D: \ APMServ5.2.6 \ PHP \ www
10. Tests directory ?????????????????????????????? : D: \ APMServ5.2.6 \ PHP \ tests
11. Name of configuration file ??????????????????? : D: \ APMServ5.2.6 \ PHP \ pear. ini

12. Path to CLI php.exe ?????????????????????????? : D: \ APMServ5.2.6 \ PHP \.

1-12, 'all' or Enter to continue :??Enter all

Installation base ($ prefix) [D: \ APMServ5.2.6 \ PHP]:
Temporary directory for processing [$ prefix \ tmp]:
Temporary directory for downloads [$ prefix \ tmp]:
Binaries directory [$ prefix]:
PHP code directory ($ php_dir) [$ prefix \ pear]:
Documentation directory [$ prefix \ docs]:
Data directory [$ prefix \ data]:
User-modifiable configuration files directory [$ prefix \ cfg]:
Public Web Files directory [$ prefix \ www]:
Tests directory [$ prefix \ tests]:
Name of configuration file [D: \ APMServ5.2.6 \ PHP \ pear. ini]:
Path to CLI php.exe [D: \ APMServ5.2.6 \ PHP \.]:

Press Enter.

At this point D: \ APMServ5.2.6 \ PHP will have an extra file pws-php5isapi.reg, double-click, OK, close the console window, open a new cmd.

D: \ APMServ5.2.6 \ PHP> pear-V
PEAR Version: 1.7.1
PHP Version: 5.2.6
Zend Engine Version: 2.2.0
Running on: Windows NT 5EC44E99C71645F 5.1 build 2600

OK. the installation is successful, but don't be happy too early. what about the upgrade... Otherwise, the subsequent PHPUnit cannot be installed!

?

Install PHPUnit

D: \ APMServ5.2.6 \ PHP> pear list

Installed packages, channel pear. PHP. NET:
========================================================== =
PACKAGE ????????? VERSION STATE
Archive_Tar ????? 1.3.3 ?? Stable
Lele_getopt ?? 1.2.3 ?? Stable
Image_GraphViz ?? 1.2.1 ?? Stable
Log ????????????? 1.11.5? Stable
PEAR ???????????? 1.9.0 ?? Stable
Structures_Graph 1.0.3 ?? Stable
XML_Util ???????? 1.2.1 ?? Stable

If you do not have the preceding installation packages, first install them. for example, if you have not installed Image_GraphViz and Log, enter the following command:

D: \ APMServ5.2.6 \ PHP> pear install Image_GraphViz
D: \ APMServ5.2.6 \ PHP> pear install Log

After the installation is successful, enter the following command:

D: \ APMServ5.2.6 \ PHP> pear upgrade-all

Will upgrade channel: // pear.php.net/archive_tar
Will upgrade channel: // pear.php.net/structures_graph
Will upgrade channel: // pear.php.net/pear
Downloading Archive_Tar-1.3.3.tgz...
Starting to download Archive_Tar-1.3.3.tgz (18,119 bytes)
...... Done: 18,119 bytes
Downloading Structures_Graph-1.0.3.tgz...
Starting to download Structures_Graph-1.0.3.tgz (30,191 bytes)
... Done: 30,191 bytes
Downloading PEAR-1.9.0.tgz...
Starting to download PEAR-1.9.0.tgz (291,634 bytes)
... Done: 291,634 bytes
Upgrade-all OK: channel: // pear.php.net/Archive_Tar-1.3.3
Upgrade-all OK: channel: // pear.php.net/Structures_Graph-1.0.3
Upgrade-all 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"

Okay. if you get to this step, congratulations, your success is coming soon.

D: \ APMServ5.2.6 \ PHP> pear channel-discover pear.phpunit.de
D: \ APMServ5.2.6 \ PHP> pear install phpunit/PHPUnit

The installation failed in the second sentence above:

Unknown remote channel: pear.symfony-project.com
Did not download optional dependencies: channel: // pear.symfony-project.com/YAML,
? Use -- alldeps to download automatically
Phpunit/PHPUnit can optionally use package "channel: // pear.symfony-project.com/Y
AML "(version> = 1.0.2)
Phpunit/PHPUnit can optionally use PHP extension "soap"
Phpunit/PHPUnit requires PHP extension "xdebug" (version> = 2.0.5), installed ve
Rsion is 2.0.4
No valid packages found
Install failed

?

The reason is that the channel is disconnected, and the xdebug version is too low, so the following code is added:

D: \ xx \ PHP> pear channel-discover pear.symfony-project.com
Adding Channel "pear.symfony-project.com" succeeded
Discovery of channel "pear.symfony-project.com" succeeded

?

D: \ xx \ PHP> pear channel-discover components. ez. no
Adding Channel "components. ez. no" succeeded
Discovery of channel "components. ez. no" succeeded

To http://xdebug.org/download.php? Download the latest xdebug file to the ext folder, restart apache, and complete the xdebug upgrade.

Then install phpunit ~

?

?

?

If neither of the two has an error, the following four files will appear in the D: \ APMServ5.2.6 \ PHP Directory:

Phpunit. bat
Phpunit
Dbunit. bat
Dbunit

OK. check whether the installation is successful.

Verify installation

D: \ APMServ5.2.6 \ PHP> pear-V

PEAR Version: 1.9.0
PHP Version: 5.2.6
Zend Engine Version: 2.2.0
Running on: Windows NT 5EC44E99C71645F 5.1 build 2600

D: \ APMServ5.2.6 \ PHP> phpunit-version

PHPUnit 3.4.5 by Sebastian Bergmann.

Note: If it fails, use

D:
Cd D: \ APMServ5.2.6 \ PHP
D: \ APMServ5.2.6 \ PHP> phpunit. bat

In addition, to avoid such startup, we recommend that you add D: \ APMServ5.2.6 \ PHP \ phpunit. bat to the environment variable PATH, as does dbunit.

?

?

Reprinted from LixiPHP

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.