Installing pear under windows

Source: Internet
Author: User
Tags pear

First, download Go-pear.phar file from official website, address Http://pear.php.net/go-pear.phar

Put the downloaded files Go-pear.phar in the PHP installation directory, DOS command into the PHP installation directory run php go-pear.phar , encountered the question option, all enter by default selection. If the ENTER key is not pressed within a minute, an error is prompted and then exited. Then just re-execute the go-pear.bat .

If it runs successfully, it will:

After installation, a pear_env.arg registry file is generated in the PHP installation directory, double-click the file, and add the information to the registry.

Install the Mail plugin:d:\mvam\php5> pear install mail

Installing the MDB2 plug-in:d:\mvam\php5> pear install MDB2

To install the phpunit plugin:

d:\mvam\php5> Pear config-set auto_discover 1

D:\mvam\php5>pear Install Pear.phpunit.de/phpunit

Add PHPUnit to the environment variable and then PHPUnit--help to see the full usage, as follows:
D:\mvam\php5>phpunit--help
PHPUnit 4.0.17 by Sebastian Bergmann.

You have installed PHPUnit via PEAR. This installation method is no longer
Supported and Http://pear.phpunit.de/will be shut down no later than
December, 31 2014.

Please read http://phpunit.de/manual/current/en/installation.html and
Learn. PHPUnit from a PHAR or install it via Composer.

usage:phpunit [Options] unittest [unittest.php]
phpunit [Options] <directory>

Code Coverage Options:

--coverage-clover <file> Generate Code Coverage report in Clover XML format.
--COVERAGE-CRAP4J <file> Generate Code Coverage report in crap4j XML format.
--coverage-html <dir> Generate Code Coverage report in HTML format.
--coverage-php <file> Export php_codecoverage object to file.
--coverage-text=<file> Generate Code Coverage report in text format.
Default:standard output.
--coverage-xml <dir> Generate Code Coverage report in PHPUNIT XML format.


Logging Options:

--log-junit <file> log test execution in JUnit XML format to file.
--log-tap <file> log test execution in tap format to file.
--log-json <file> log test execution in JSON format.
--testdox-html <file> Write Agile Documentation in HTML format to file.
--testdox-text <file> Write Agile Documentation in text format to file.

Test Selection Options:

--filter <pattern> Filter which tests to run.
--testsuite <pattern> Filter which testsuite to run.
--group ... Only runs tests from the specified group (s).
--exclude-group ... Exclude tests from the specified group (s).
--list-groups list available test groups.
--test-suffix ... Only search for test in files with specified
Suffix (es). Default:test.php,.phpt

Test Execution Options:

--report-useless-tests is strict about tests that does not test anything.
--strict-coverage is strict about unintentionally covered code.
--disallow-test-output is strict about output during tests.
--enforce-time-limit enforce time limit based on test size.
--strict Run tests in strict mode (enables all of the above).


--process-isolation Run each test in a separate PHP process.
--no-globals-backup does not backup and restore $GLOBALS for each test.
--static-backup backup and restore static attributes for each test.

--colors use colors in output.
--stderr Write to stderr instead of STDOUT.
--stop-on-error Stop execution upon first error.
--stop-on-failure Stop execution upon first error or failure.
--stop-on-risky stop execution upon first risky test.
--stop-on-skipped stop execution upon first skipped test.
--stop-on-incomplete stop execution upon first incomplete test.
-v|--verbose Output more verbose information.
--debug Display debugging information during test execution.


--loader <loader> Testsuiteloader implementation to use.
--repeat <times> Runs the test (s) repeatedly.
--tap report test execution progress in tap format.
--testdox report test execution progress in testdox format.
--printer <printer> Testsuitelistener implementation to use.

Configuration Options:

--bootstrap <file> A "Bootstrap" PHP file is run before the tests.

-c|--configuration <file> Read configuration from XML file.
--no-configuration Ignore Default configuration file (Phpunit.xml).
--include-path <path (s) > prepend PHP ' s include_path with given path (s).
-D Key[=value] Sets a php.ini value.

Miscellaneous Options:

-h|--help Prints This usage information.
--version Prints the version and exits.

--self-update update PHPUnit to the latest version. Configuring the php.ini File

Tell PHP your Pear installation directory

Modify the include_path in php.ini to pear installation directory include_path = ".;D:/ Mvam/php5/pear "

Second, the installation package method:

in the PHP directory, use the command-line method to execute Pear install–a Auth will create a Auth directory in the Php\pear directory that contains the package. The-a option indicates that all other packages that the Auth package relies on are installed.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.