The use of PHP plug-in installation and Xdebug configuration in Eclipse _php tips

Source: Internet
Author: User
Tags phpinfo vc9 zend

Thanks to the Android development team and the Android Automation test, all the time using eclipse as a development tool. Using Zend Studio 9.0.1 as a development tool for PHP, you are now abandoning the use of Zend Studio 9.0.1, with Eclipse's PHP development plug-in, so plan to use Eclipse development later. So convenient. Installing PHP plug-ins on Eclipse is very simple and can be downloaded to the http://sourceforge.net/project/showfiles.php?group_id=57621 plugin. Unzip the downloaded plugin. And put the files in the unpacked features folder in the Eclipse's features folder. The files in the extracted plugins are placed in the plugins folder of Eclipse.

Configure eclipse's debugging capabilities for PHP

The following is the detailed process.

Download and install the appropriate software

JDK is absolutely necessary, it is the most basic requirement to run eclipse, to download here.

Eclipse has consolidated the PHP development plug-in version here to download, select the version of your operating system and download it locally.

Xdebug to download here, please choose the appropriate file download according to your version of PHP.

episode: How to choose the PHP 5.2.17.17 version of Xdebug

1, open http://www.xdebug.org/find-binary.php, will you phpinfo when the display of information source copy into the input box, and then submit, Xdebug will tell you which version should be downloaded.

2, enter the http://www.xdebug.org/download.php page, you will see many versions and the same version of different versions. Here's a wonder, VC9, VC6, ts What do you mean? If you have doubts, please visit: the difference between TS and NTS versions in PHP-VC6 and VC9 compiled versions
3, learned that the PHP 5.2.17.17 version of the xdebug should download Xdebug 2.1.2 version of the PHP 5.2 VC6 TS. As for a 32-bit system or a 64-bit system, it depends on your machine.

Because

Server arbitrary, recommend the use of Apache+php module installation method.

Installing software

After you install the JDK first, follow these steps to configure the system variables

followed by the installation of Eclipse,eclipse do not have to set, as long as the jdk,eclipse placed in any location can be directly run

Xdebug Installation

Put the file under the Php/ext folder

Xdebug Configuration

Open php.ini

Add the following configuration code on the last line and the configuration instructions are commented

Copy Code code as follows:

; Xdebug Configuration
[Xdebug]

; loading into Xdebug
Extension=php_xdebug-2.1.2-5.2-vc6.dll
; Turn on automatic tracking
Xdebug.auto_trace = On
; Turn on exception tracking
Xdebug.show_exception_trace = On
; Turn on remote debugging to start automatically
Xdebug.remote_autostart = On
; Turn on remote debugging
Xdebug.remote_enable = On
; Collect variables
Xdebug.collect_vars = On
; Collect return values
Xdebug.collect_return = On
; Collect parameters
Xdebug.collect_params = On


Restart the server after saving.

At this point, use Phpinfo () to view the PHP configuration, if the installation is successful, you should be able to see the following information:

Let's say that the Eclipse configuration

1. Starting, stopping, and restarting the Apache service through Eclipse failed.

Reason:

A, the configuration is incorrect, and the correct configuration is as shown in the following illustration:

2, because of my own based on the phpstudy2011b package of the PHP integrated environment, Apache service name is apache2, but eclipse by default is apache2.2, so I changed the name of the registered Apache service to apache2.2 after normal.

Eclipse opens CI, n multiple warnings appear

Information similar to the following:

Description Resource Path Location Type The local variable $_ci_path I not have been initialized loader.php/ci/system/c Ore Line 752 PHP Problem

As shown in the following illustration:


It probably means that the local variable is not initialized, or that the initial value is not assigned. This is very common in PHP. So there are so many warnings, it is a little uncomfortable to look at. Then get rid of it.

The solution is:


Change the above red selection from the original warning to ignore.

Related Article

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.