Pear installed on Windows, PHPUnit succeeded

Source: Internet
Author: User
Tags channel pear pear
Pear installed under Windows, PHPUnit succeeded

Environmental requirements:

Windows + apmserv5.2.6/php5 above

Installation steps:

1. Start of Windows, run->cmd

2. Installation command

D:
CD D:\APMServ5.2.6\PHP
D:\apmserv5.2.6\php>go-pear.bat

? Is you installing a system-wide PEAR or a local copy?
(system|local) [System]:? Strike Enter (enter)

Below is a suggested the 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)?????????????????? : 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
Ten. Tests Directory?????????????????????????????? : D:\APMServ5.2.6\PHP\tests
Name of the configuration file??????????????????? : D:\APMServ5.2.6\PHP\pear.ini

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\.]:

always return to the car and you

At this point D:\APMServ5.2.6\PHP will be more than one 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, there are upgrades ... Otherwise, you cannot install subsequent phpunit!

?

Installing PHPUnit

D:\apmserv5.2.6\php>pear List

Installed PACKAGES, CHANNEL PEAR. Php.net:
=========================================
Package????????? VERSION State
Archive_tar????? 1.3.3?? Stable
Console_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 above installation package installed, such as you do not install Image_graphviz and log, please enter the following instructions:

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

Would upgrade Channel://pear.php.net/archive_tar
would upgrade Channel://pear.php.net/structures_graph
would 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 av Ailable (PEAR ' s php-gtk2-based installer)

Pear:to Install optional features use "PEAR Install Pear/pear#featurename"

Well, if you get to this step, congratulations on your success is not far away from you.

D:\apmserv5.2.6\php>pear Channel-discover pear.phpunit.de
D:\apmserv5.2.6\php>pear Install Phpunit/phpunit

I'm doing the second sentence above. Installation failed:

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 not available, and the Xdebug version is too low, so add the following code

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 still to the Ext folder, restart Apache, complete the Xdebug upgrade.

After performing the installation PHPUnit, Success ~

?

?

?

If neither of these errors occur, the following four files will appear under the D:\APMServ5.2.6\PHP directory:

Phpunit.bat
PHPUnit
Dbunit.bat
Dbunit

OK, check that the installation is successful.

Verifying the 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 this is not successful, please use

D:
CD D:\APMServ5.2.6\PHP
D:\apmserv5.2.6\php>phpunit.bat

In addition, in order to avoid this starting every time, it is recommended that you say D:\APMServ5.2.6\PHP\phpunit.bat add environment variable Path,dbunit also.

?

?

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.