Apache Xdebug
Documentation - all settings. This section describes all available configuration settings available in Xdebug. Unless specifically mentioneds, each setting can be set in php.ini, files like 90-xdebug.ini, but also in Apache's.htaccess and PHP-FPM's.user.ini files. A select set of settings can be set through an XDEBUGCONFIG environment variable. In this situation, the xdebug. About Apache Friends. Apache Friends is a non-profit project to promote the Apache web server and is home to the XAMPP project. XAMPP is an easy to install Apache.
Introduction
Apache Debug
Xdebug is a powerfull tool for debugging PHP. It can display formated errors and embed the usefull var_dump
function.This page explains how to install and configure Xdebug.
The following has been tested on a Cloud9 server with the following versions:
- Linux 4.9.120-c9 (How to check my Linux version?)
- Ubuntu 14.04.5 LTS Trusty (How to check my Linux version?)
- PHP 7.2.9 (How to check my PHP version?)
Check you configuration
Sometime, Xdebug is not configure, and the var_dump
function is not displayed properly.Create a PHP file on your server with the following content:
Check if the display is formated. On the following illustration, var_dump
is not displayed properly:
Check if the Xdebug module is installed. The following command displays the listof PHP modules instaled:
If Xdebug is already installed (Xdebug is in the list of instaled module), skip the next step.
Install Xdebug
Install the following package:
Restart Apache2 manualy or with the following command:
Xdebug Apache Phpstorm
Configure Xdebug
Check if var_dump
is now formated properly. If not, add or update the html_errors
parameter in your php.ini file:
Apache Xdebug Enable
Display should now be formated:
Optional configuration
Apache Debug Level
I also strongly recommand to set the following parameters only on your local environment in your php.ini. Thiswill display PHP errors and warning in the page: