PhP5 + apache2 + MySQL + eclipse debug full Configuration

Source: Internet
Author: User
Tags php debugger

Introduction: This is a detailed page for full configuration of PhP5 + apache2 + MySQL + eclipse debug. It introduces PHP, PHP PhP5 + apache2 + MySQL + eclipse debug complete configuration related knowledge, skills, experience, and some PHP source code.

Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 344679 'rolling = 'no'>

After sorting out, we can conclude that PHP is configured on Eclipse.

I. preparations:

1. Download eclipse for PHP

Http://www.eclipse.org/downloads/

Download the latest eclipse for PHP.

2. Download Apache

Http://httpd.apache.org/download.cgi

Download Apache here. However, please note that your PHP version must be compatible with Apache. Otherwise, you can only watch the screen.

I use apache2.0.58.

3. Download PHP

Http://www.php.net/downloads.php

Remember to be compatible. I am using php5.1.2. Here, I need to remind you to check out your PHP version. We need to consider the version when we attach xdebug later. I just suffered a loss on it.

2. eclipse for PHP Project Construction

1. decompress the downloaded eclipse package and enter eclipse. It will let you select a working path. If you select the folder you set, eclipse will write some configurations.

2. The project construction is relatively simple. Write your project name in file-New-PHP project and finish it directly.

Iii. Configuration supported by PHP

1. decompress the PHP package and place it in the desired place. We recommend that you do not place it in the Chinese directory.

Myself phproot = D:/PhP5

2. install Apache. It's a silly task to go all the way to next. If you want to change the installation directory, do not use the default path.

In addition, you can add three addresses as needed. Enter the address according to the example.

I write localhost.com www.localhost.com master@localhost.com

3. In terms of databases, I like it. Install it on your own.

4. Find httpd. conf in D: \ apache group \ apache2 \ conf.

Add PHP support

Loadmodule php5_module D:/PhP5/php5apache2. dll

Addtype application/X-httpd-PHP. php

Phpinidir "D:/PhP5"

Change the default project path

Find the DocumentRoot tag and change the value to your own named path (working path ).

DocumentRoot "D:/haohaowo"

<Directory "D:/haohaowo">

If you are using eclipse for development, you need to write it to the work zone.

DocumentRoot "D: \ haohaowo"

<Directory "D: \ haohaowo">

The access address is http: // localhost/www/*. php.

5. Find PHP. ini-Dist in the PHP installation directory D: \ PHP and name it PHP. ini.

Add MySQL support

There are two methods

A. Add Your PHP installation directory D: \ PhP5 to the path variable (it is worth pondering and remember to restart the machine)

B. Copy libmysql. dll from the PHP root directory to system32.

Open MySQL support, find; Extension = php_mysql.dll, and remove the semicolon.

Add an extension = php_mysqli.dll

Find extension_dir and change the value to extension_dir = "D:/PhP5/EXT"

4. debug PHP on Eclipse

1. Download the dynamic link library.

Http://www.xdebug.org/download.php

Search for your PHP version on the page, I use php5.1.2, download php_xdebug-2.0.1-5.1.2.dll.

2. Copy the downloaded dynamic link library to % php_root %/EXT.

3. Open PHP. ini to edit.

Add the following content:

; Onload xdebug

Zend_extension_ts = "d :\ PhP5 \ ext \ php_xdebug-2.0.1-5.1.2.dll"

; Xdebug Configuration

[Xdebug]

Xdebug. auto_trace = on

Xdebug. show_exception_trace = on

Xdebug. remote_autostart = on

Xdebug. remote_enable = on

Xdebug. collect_vars = on

Xdebug. collect_return = on

Xdebug. collect_params = on

Replace the above path.

4. Go to eclipse and open "WINDOW> preferences> PHP" from the main menu ". Select the "php excutables" node and click "add" on the right panel. In the following window, enter "name" as needed. I name it PhP5, "excutable path" to view your php.exe, php ini file to view your php. INI file, PHP debugger select xdebug. If the latest version has an SAPI type, keep the default value.

5. Select the "php servers" node, click "new" on the right panel, and enter "name" in the following window, "url" indicates the URL of your workspace (for example, http: // localhost/PDT ). You don't need to set this in the latest version, because there is a default server that you can use directly.

6. Select the "debug" node. On the right panel, select xdebug for "php Debugger" and "server" and select the PHP server you just added. I select the default one, "php executable" also selects the one you just added, and I select PhP5.

Now, debug is complete.

Test procedure. If you do not understand the procedure, refer to thisArticle, I basically follow this configuration.

Http://ekliu939.blog.163.com/blog/static/131368072201032801359548/

Love J2EE follow Java Michael Jackson video station JSON online tools

Http://biancheng.dnbcw.info/php/344679.html pageno: 4.

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.