Phpdebug installation tips _ PHP Tutorial

Source: Internet
Author: User
Tags php debugger superuser permission
Phpdebug installation skills. I plan to configure ZendDebugger for debugging. after the configuration is completed for a long time, the configuration is not successful and the ZendDebugger takes effect in phpinfo. I found it is a problem with php5.3 and must be uninstalled first, this article describes how to configure ZendDebugger for debugging. if the configuration fails for a long time and ZendDebugger is unavailable in phpinfo, it is found that it is a problem with php5.3 and must be uninstalled first, this article describes how to use xdebug.

The software installation is too simple. execute the following commands:

Sudo apt-get install apache2
Sudo apt-get install php5
Sudo apt-get install php5-cli
Sudo apt-get install php5-xdebug

Php configuration:

Php. ini contains three folders in/etc/php5/: apache2, cli, and conf. d. we should modify php under apache2 and cli. ini. in conf. d. there is an xdebug. the INI file records the xdebug file path.

Sudo vi/etc/php5/apache2/php. ini

Sudo vi/etc/php5/cli/php. ini
Use the superuser permission to open the above two php. ini, and add the following code:

[Xdebug]
Xdebug. remote_enable = 1
Xdebug_remote_host = "localhost"
Xdebug. remote_port = 9000
Xdebug. remote_handler = "dbgp"
Zend_extension =/usr/lib/php5/20090626 + lfs/xdebug. so

Restart apache: sudo/etc/init. d/apache2 restart

Configure the debugging and running environment of eclipse

Open the eclipse Menu-[windows]-> [preferences]

Select php-debug and select xdebug from php debugger in the right window. The character set below is the same as the developed code character set and then applied.

Select "php executables" in the upper-right corner of the window. name: php5; excute phth:/usr/bin/php5; ini file:/etc/php5/apache2/php. ini; type: cli; debugger: xdebug.

Now everything goes well, you can start the breakpoint debugging program.

Pipeline was debugged. after the configuration was completed for a long time, the configuration was not successful. in phpinfo, ZendDebugger was not found to take effect. it was found that it was a php5.3 problem and must be uninstalled first. This article introduces...

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.