I am reading up about php-unit testing and the writer of "Modern PHP" suggests installing php-xdebug, since i am using lsphp70 all the time, how can i work with php-xdebug then?

Is it easy for you to add lsphp70-xdebug to repo ?



Hi enthess,

We do not have an xdebug package for any lsphp versions. That said, I've read that there are issues with installing xdebug via package managers, so if you're willing to try, you could try installing xdebug from source.

The few things to note when using lsphp vs regular php:
1. Check your site's phpinfo for the ini location. This may be a non-standard location.
2. The phpize and php commands will have to use /usr/local/lsws/lsphp7/bin/phpize, etc. instead of just 'phpize'.
Referring to the compiling and the configuration steps here.
I wanted to set up Xdebug for my development VM and came here looking for the same information. I've worked through the process and seem to have figured out the main issues so I thought I'd post my findings to help out anyone else who comes after me. My VM is using CentOS 7, you will need to adjust the commands for whatever package manager your version of Linux uses.

The steps I took are based upon the tailored instructions to install Xdebug available at (Requires HTML output of phpinfo() command).

Compiling Xdebug requires the "phpize" and "php-config" tools (and a compiler). While a standard install of OpenLiteSpeed includes phpize, it is missing the PHP headers and the php-config command. The php-devel package can be used for standard PHP installs so I took a guess that there might be an equivalent lsphp70-devel package provided for OpenLiteSpeed and found I was right.

Install the required dependencies (will be located in /usr/local/lsws/lsphp70/bin)

sudo yum install lsphp70-devel make gcc
Download source tar and unzip (or clone the git project from git://

tar -xvzf xdebug-2.5.4.tgz
Change to source directory

cd xdebug-2.5.4
Run phpize (will need to use full path)

Run ./configure (will need to provide full path to php-config)

./configure --with-php-config=/usr/local/lsws/lsphp70/bin/php-config
Run make

Copy the compiled module somewhere (e.g. The LiteSpeed PHP modules directory)

sudo cp modules/ /usr/local/lsws/lsphp70/lib64/php/modules
Edit the php.ini file to enable the compiled module in PHP (all available settings are documented at

sudo nano /usr/local/lsws/lsphp70/etc/php.ini
Add the following at the end of the file.

zend_extension = /usr/local/lsws/lsphp70/lib64/php/modules/
Restart OpenLiteSpeed

sudo /usr/local/lsws/bin/lswsctrl restart
If you run phpinfo() again xdebug should be now listed under the configuration section.