O'Reilly logo

Mastering PHP 7 by Branko Ajzele

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Debugging

The debugging feature of Xdebug can be easily turned on with the xdebug.remote_enable=1 option. With modern PHP, there is usually a special xdebug.ini configuration file; otherwise, we would edit the default php.ini file. With our Ubuntu installation, we add this to the /etc/php/7.0/apache2/conf.d/20-xdebug.ini file as follows:

zend_extension=xdebug.soxdebug.remote_enable=1

Once the file has been modified, we need to make sure the Apache server is restarted:

 service apache2 restart 

While xdebug.remote_enable is the required option to turn on the debugging feature, other related options include the following:

  • xdebug.extended_info
  • xdebug.idekey
  • xdebug.remote_addr_header
  • xdebug.remote_autostart
  • xdebug.remote_connect_back
  • xdebug.remote_cookie_expire_time ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required