PHP Installation xdebug/php Installation Pear/phpunit detailed steps (figure) _php tutorial

Source: Internet
Author: User
Tags pear vc9
First of all, this article is based on the WAMP environment, so if you see here has not set up a good wamp environment, I would mind you first build the environment, because here are some practical content.

1. Preparation

In the WAMP environment, the versions of each software I use are as follows

Windows 2003 Standard Edition SP2 Apache HTTP Server 2.3 mysql 5.1.49 php 5.4.5

The above environment of the construction I will not repeat, the online data a lot, usually there will be no error, but if you use Windows 7 deploy, pay attention to the issue of permissions, all operations using administrator rights, the next content is I want to focus on writing, Because there are often unexpected headaches and problems that are not easy to solve.

First, you need to prepare the following:

Pear package, open this URL (click here), save the downloaded file to the root directory of PHP, Go-pear.phar

2. Installation 2.1 Installing Pear

First open the cmd command, if you use Windows 7 installation, then all the cmd command line would mind to open with administrator privileges, of course, you can get administrator privileges.

CD to PHP installation directory (CD will?). Not @ Baidu Bar),

Execute command: PHP Go-pear.phar

Enter "Local" here, carriage return

The next step is to let you enter "yes" to confirm the operation, then go straight to the carriage.

No need to choose what 1-12

Finally, the following prompt appears

Here you enter pear in the command line, the result, prove Pear installation success,

Note that at the end of the installation you will be prompted to write the relevant configuration of pear to php.ini, if you do not have sufficient permissions, the command line will help you open the php.ini (which, of course, is confirmed by you at the command line) waiting for you to enter the configuration information manually, and the specific configuration is given at the command You just have to copy and paste.

At this point, we'd better update the pear to make sure you're installing the latest version of the

Using the command pear Upgrade-all

Here, you need to ensure that the network unblocked, if you see the update process to see the error message, try several times

At this point, pear has been installed and updated to the latest version

2.2 Installing PHPUnit

First add the channel in the pear, and then execute the following command in the PHP directory:

Pear Channel-discover pear.phpunit.de

Pear Channel-discover components.ez.no

Pear Channel-discover pear.symfony-project.com

Next install PHPUnit, execute the following command

Pear Install Phpunit/phpunit

If your network speed is not good, may need to wait a few minutes, need to download some tgz package online, finally if you see the following similar information, prove that you have installed successfully

At this point in the PHP root directory, you can see phpunit.bat this file, and on the command line input phpunit, you can see the corresponding help information to prove that the installation was successful.

But, but!!! At this point, if you need to use selenium to test, there is a very important thing to install, such as in Yii test, many are using selenium.

Continue with the following command in the root directory of PHP:

Pear Install Phpunit/phpunit_selenium

If the network is unblocked, this should be the result

2.3 Installing Xdebug

First, identify the following things in your environment

PHP Version number PHP is a thread-safe version of PHP environment is 32-bit or 64-bit

Then download the appropriate XDEBUG application extensions (DLLs) to the http://xdebug.org/download.php

This is all version of xdebug2.2.1, take the first example, it is for PHP version 5.2 , using VC9 to compile to a non-thread-safe xdebug in a 32-bit environment, The TS here is the meaning of the thread safe, so no this mark is the meaning of no thread safe

Place the downloaded file in the PHP root directory/ext, and then open the System directory/windows/php.ini add the following:

zend_extension= "F:\php_dev\php\ext\php_xdebug-2.2.1-5.4-vc9.dll"
[Xdebug]
Xdebug.auto_trace=on
Xdebug.collect_params=on
Xdebug.collect_return=on

Xdebug.profiler_enable=on
Xdebug.trace_output_dir= "F:\php_dev\temp"
Xdebug.profiler_output_dir= "F:\php_dev\temp"
Xdebug.remote_enable=on
Xdebug.remote_handler=dbgp
Xdebug.remote_host=localhost

xdebug.remote_port=8888

Here is a lot of specific configuration, I will not repeat, specific configuration content you can view here

When you open phpinfo, you can see the concrete xdebug.

!!!!!!

http://www.bkjia.com/PHPjc/621675.html www.bkjia.com true http://www.bkjia.com/PHPjc/621675.html techarticle first of all, this article is based on the WAMP environment, so if you see here has not set up a good wamp environment, I would mind you first build the environment, because here are some practice ...

  • 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.