Php eclipse Environment Construction

Source: Internet
Author: User
Php development generally uses common integrated development environments such as xampp and wamp, but in some environments such as this, it is obviously not enough, because it does not return error messages even if an error occurs. After a long time of trouble, I decided to start with eclipse, which I am most familiar with, and build a local debugging environment. Preparation: 1. Download eclipseforphttp:

Php development generally uses common integrated development environments such as xampp and wamp, but in some environments such as this, it is obviously not enough, because it does not return error messages even if an error occurs. After a long time of trouble, I decided to start with eclipse, which I am most familiar with, and build a local debugging environment. Preparations: 1. Download Eclipse for PHP http:

Php development generally uses common integrated development environments such as xampp and wamp, but in some environments such as this, it is obviously not enough, because it does not return error messages even if an error occurs.

After a long time of trouble, I decided to start with eclipse, which I am most familiar with, and build a local debugging environment.

Preparations:
1. Download Eclipse for PHP http://www.eclipse.org/downloads/
2. Download Apache http://httpd.apache.org/download.cgi (coming to the http://www.apachelounge.com/download/ for windows)
3. Download php http://www.php.net/downloads.php
4. Download xdebug http://www.xdebug.org/download.php
5. mysql database is a standard
Because a local integrated development environment wamp already exists, I directly paste apache and php and put them under the APM directory of my d disk. Configure it as follows.

If you download apache, the installation is relatively simple. You can select d:/APM as the installation directory. Next step, you can add three addresses in one of them. Complete the steps as shown in the example.
I write localhost.com www.localhost.com master@localhost.com. Paste it directly, as I said later.
Find http. conf in d: \ AMP \ Apache2 \ conf and add support for php.

LoadModule php5_module D:/APM/php5/php5apache2.dllAddType application/x-httpd-php .phpPHPIniDir "D:/APM/php5"

Change the default project path


DocumentRoot "D:/www"

If you are using Eclipse for development, you need to write it to the work zone.
DocumentRoot "D: \ www"

The access address is http: // localhost/www/*. php.
Find PHP. ini-dist in the php installation directory D: \ php and name it php. ini.

Configure eclpse as follows,
Copy the xdebug. dll downloaded above to d:/APM/php/ext/, and then open php. ini to edit it.

;onload Xdebugzend_extension_ts="D:\APM\php5.4.16\ext\php_xdebug-2.2.5-5.5-vc11.dll";xdebug configuration[Xdebug]xdebug.auto_trace = Onxdebug.show_exception_trace = Onxdebug.remote_autostart = Onxdebug.remote_enable = Onxdebug.collect_vars = Onxdebug.collect_return = Onxdebug.collect_params = On
Replace the above path.

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.

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.


Since then, the configuration has been basically completed.

Test procedure. If you do not understand the procedure, refer to this article.
Http://ekliu939.blog.163.com/blog/static/131368072201032801359548/

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.