Home php教程 php手册 手动安装phpunit

手动安装phpunit

Jun 13, 2016 am 10:53 AM
ca error fatal php phpunit under exist Install Report an error

在ubuntu12.04下面phpunit报错

 

 

PHP Fatal error:  Call to undefined method PHP_CodeCoverage_Filter::getInstance() in /usr/share/php/PHPUnit/Framework.php on line 46[php] view plaincopyprint?  

 

 

 

[plain] 

$ pear config-show  

Which showed this (unlike my config-show):  

  

Configuration (channel pear.php.net):  

=====================================  

Auto-discover new Channels auto_discover   

Default Channel default_channel pear.php.net  

HTTP Proxy Server Address http_proxy   

PEAR server [DEPRECATED] master_server pear.php.net  

Default Channel Mirror preferred_mirror pear.php.net  

Remote Configuration File remote_config   

PEAR executables directory bin_dir /usr/bin  

PEAR documentation directory doc_dir /usr/share/php/doc  

PHP extension directory ext_dir /usr/lib/php5/20090626+lfs  

PEAR directory php_dir /usr/share/php  

PEAR Installer cache directory cache_dir /tmp/pear/cache  

PEAR configuration file cfg_dir /usr/share/php/cfg  

directory  

PEAR data directory data_dir /usr/share/php/data  

PEAR Installer download download_dir /build/buildd/php5-5.3.10/pear-build-download  

directory  

PHP CLI/CGI binary php_bin /usr/bin/php  

php.ini location php_ini   

--program-prefix passed to php_prefix   

PHP’s ./configure  

--program-suffix passed to php_suffix   

PHP’s ./configure  

PEAR Installer temp directory temp_dir /tmp/pear/temp  

PEAR test directory test_dir /usr/share/php/test  

PEAR www files directory www_dir /usr/share/php/htdocs  

Cache TimeToLive cache_ttl 3600  

Preferred Package State preferred_state stable  

Unix file mask umask 2  

Debug Log Level verbose 1  

PEAR password (for password maintainers)  

Signature Handling Program sig_bin /usr/bin/gpg  

Signature Key Directory sig_keydir /etc/pear/pearkeys  

Signature Key Id sig_keyid   

Package Signature Type sig_type gpg  

PEAR username (for username   

maintainers)  

User Configuration File Filename /home/username/.pearrc  

System Configuration File Filename /etc/pear/pear.conf  

You need to set following configurations:  

  

sudo pear config-set bin_dir /usr/bin  

sudo pear config-set doc_dir /usr/share/php/doc  

sudo pear config-set php_dir /usr/share/php  

sudo pear config-set cfg_dir /usr/share/php/cfg (make (sudo mkdir cfg) directory here)  

sudo pear config-set data_dir /usr/share/php/data  

sudo pear config-set test_dir /usr/share/php/test  

 

$ pear config-show

Which showed this (unlike my config-show):

 

Configuration (channel pear.php.net):

=====================================

Auto-discover new Channels auto_discover 

Default Channel default_channel pear.php.net

HTTP Proxy Server Address http_proxy 

PEAR server [DEPRECATED] master_server pear.php.net

Default Channel Mirror preferred_mirror pear.php.net

Remote Configuration File remote_config 

PEAR executables directory bin_dir /usr/bin

PEAR documentation directory doc_dir /usr/share/php/doc

PHP extension directory ext_dir /usr/lib/php5/20090626+lfs

PEAR directory php_dir /usr/share/php

PEAR Installer cache directory cache_dir /tmp/pear/cache

PEAR configuration file cfg_dir /usr/share/php/cfg

directory

PEAR data directory data_dir /usr/share/php/data

PEAR Installer download download_dir /build/buildd/php5-5.3.10/pear-build-download

directory

PHP CLI/CGI binary php_bin /usr/bin/php

php.ini location php_ini 

--program-prefix passed to php_prefix 

PHP’s ./configure

--program-suffix passed to php_suffix 

PHP’s ./configure

PEAR Installer temp directory temp_dir /tmp/pear/temp

PEAR test directory test_dir /usr/share/php/test

PEAR www files directory www_dir /usr/share/php/htdocs

Cache TimeToLive cache_ttl 3600

Preferred Package State preferred_state stable

Unix file mask umask 2

Debug Log Level verbose 1

PEAR password (for password maintainers)

Signature Handling Program sig_bin /usr/bin/gpg

Signature Key Directory sig_keydir /etc/pear/pearkeys

Signature Key Id sig_keyid 

Package Signature Type sig_type gpg

PEAR username (for username 

maintainers)

User Configuration File Filename /home/username/.pearrc

System Configuration File Filename /etc/pear/pear.conf

You need to set following configurations:

 

sudo pear config-set bin_dir /usr/bin

sudo pear config-set doc_dir /usr/share/php/doc

sudo pear config-set php_dir /usr/share/php

sudo pear config-set cfg_dir /usr/share/php/cfg (make (sudo mkdir cfg) directory here)

sudo pear config-set data_dir /usr/share/php/data

sudo pear config-set test_dir /usr/share/php/test

 

 

 

[php] 

sudo apt-get install git  

mkdir phpunit && cd phpunit  

git clone git://github.com/sebastianbergmann/phpunit.git   

git clone git://github.com/sebastianbergmann/dbunit.git   

git clone git://github.com/sebastianbergmann/php-file-iterator.git   

git clone git://github.com/sebastianbergmann/php-text-template.git   

git clone git://github.com/sebastianbergmann/php-code-coverage.git   

git clone git://github.com/sebastianbergmann/php-token-stream.git   

git clone git://github.com/sebastianbergmann/php-timer.git   

git clone git://github.com/sebastianbergmann/phpunit-mock-objects.git   

git clone git://github.com/sebastianbergmann/phpunit-selenium.git   

git clone git://github.com/sebastianbergmann/phpunit-story.git   

git clone git://github.com/sebastianbergmann/php-invoker.git   

sudo cp -r dbunit/PHPUnit /usr/share/php/  

sudo cp -r php-code-coverage/PHP /usr/share/php/  

sudo cp -r php-file-iterator/File /usr/share/php/  

sudo cp -r php-invoker/PHP /usr/share/php/  

sudo cp -r php-text-template/Text /usr/share/php/  

sudo cp -r php-timer/PHP /usr/share/php/  

sudo cp -r php-token-stream/PHP /usr/share/php/  

sudo cp -r phpunit/PHPUnit /usr/share/php/  

sudo cp -r phpunit-mock-objects/PHPUnit /usr/share/php/  

sudo cp -r phpunit-selenium/PHPUnit /usr/share/php/  

sudo cp -r phpunit-story/PHPUnit /usr/share/php/  

sudo cp -r phpunit/phpunit.php /usr/share/php/  

 

sudo apt-get install git

mkdir phpunit && cd phpunit

git clone git://github.com/sebastianbergmann/phpunit.git

git clone git://github.com/sebastianbergmann/dbunit.git

git clone git://github.com/sebastianbergmann/php-file-iterator.git

git clone git://github.com/sebastianbergmann/php-text-template.git

git clone git://github.com/sebastianbergmann/php-code-coverage.git

git clone git://github.com/sebastianbergmann/php-token-stream.git

git clone git://github.com/sebastianbergmann/php-timer.git

git clone git://github.com/sebastianbergmann/phpunit-mock-objects.git

git clone git://github.com/sebastianbergmann/phpunit-selenium.git

git clone git://github.com/sebastianbergmann/phpunit-story.git

git clone git://github.com/sebastianbergmann/php-invoker.git

sudo cp -r dbunit/PHPUnit /usr/share/php/

sudo cp -r php-code-coverage/PHP /usr/share/php/

sudo cp -r php-file-iterator/File /usr/share/php/

sudo cp -r php-invoker/PHP /usr/share/php/

sudo cp -r php-text-template/Text /usr/share/php/

sudo cp -r php-timer/PHP /usr/share/php/

sudo cp -r php-token-stream/PHP /usr/share/php/

sudo cp -r phpunit/PHPUnit /usr/share/php/

sudo cp -r phpunit-mock-objects/PHPUnit /usr/share/php/

sudo cp -r phpunit-selenium/PHPUnit /usr/share/php/

sudo cp -r phpunit-story/PHPUnit /usr/share/php/

sudo cp -r phpunit/phpunit.php /usr/share/php/

 

 

 

 

 

 

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

To work on file upload we are going to use the form helper. Here, is an example for file upload.

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

In this chapter, we are going to learn the following topics related to routing ?

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

Validator can be created by adding the following two lines in the controller.

See all articles