PHP Debug Installation Tips

Source: Internet
Author: User
Tags php debug php debugger
This plan to configure Zenddebugger for debugging, configuration of the old long time not configured successfully, in phpinfo see Zenddebugger effective, after the discovery is php5.3 problem, must first uninstall, this article introduced the use of Xdebug.
The software installation is too simple, the following commands are executed separately:
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install php5-cli
sudo apt-get install Php5-xdebug
Configuration of PHP:
PHP.ini in a few folders under/etc/php5/, there should be three folders: Apache2, CLI, CONF.D, we should modify apache2 and the CLI under PHP.ini. Under CONF.D, there is a Xdebug.ini file that records the path of the Xdebug file.
sudo vi/etc/php5/apache2/php.ini
sudo vi/etc/php5/cli/php.ini
Open the above mentioned two php.ini with Superuser privileges, 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
Configuring the Debug and run environment for Eclipse
Open Eclipse's Menu-[windows]->[preferences]
Select Php-debug in the right window of PHP debugger select Xdebug, the following character set selection is consistent with the code character set developed, and then applied.
Select PHP Executables window to the right of the new, name: Php5;excute Phth:/usr/bin/php5;ini file:/etc/php5/apache2/ Php.ini;type:cli;debugger:xdebug.
OK, now that everything goes well, you can start the breakpoint debugging program.

The above describes the PHP debug installation skills, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

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