View Issue Details

IDProjectCategoryView StatusLast Update
0001273XdebugInstallationpublic2018-02-01 11:39
Reporterdgoosens Assigned Toderick  
PrioritynormalSeverityblockReproducibilityhave not tried
Status resolvedResolutionno change required 
PlatformUbuntu 14.04 64bit 
Product Version2.4.0rc4 
Summary0001273: impossible to build correct xdebug for PHP5.6 if PHP7.0 also installed
DescriptionWhen PHP5.6 & PHP7.0 are installed, it appears the wrong PHP includes path is used during ./configure

This results in a extension that can not be loaded by PHP 5.6

Failed loading /usr/lib/php/20131226/ /usr/lib/php/20131226/ undefined symbol: zend_sort
Steps To ReproduceFollowed these instructions to install PHP5.6 & PHP7.0:

For PHP7.0 --> WORKING
tar -xvzf xdebug-2.4.0rc4.tgz
cd xdebug-2.4.0RC4
cp modules/ /usr/lib/php/20151012
then create xdebug.ini etc.

For PHP7.0 --> WORKING
tar -xvzf xdebug-2.4.0rc4.tgz
cd xdebug-2.4.0RC4
cp modules/ /usr/lib/php/20131226
then create xdebug.ini etc.
Additional InformationGot it working though...

Noticed that during ./configure (for PHP5.6 version)
console spit out info indicating that it was using /usr/includes/php/20151012 as PHP includes path
this path is for PHP7.0

sudo mv /usr/includes/php/20151012 /usr/includes/php/20151012.BU
sudo cp /usr/includes/php/20131226 /usr/includes/php/20151012

and followed the standard procedure and then it worked

remember to reset include paths back afterwards
sudo rm -R /usr/includes/php/20151012
sudo mv /usr/includes/php/20151012.BU /usr/includes/php/20151012
Tagsmake clean
Operating System
PHP Version5.6.0-5.6.4



2016-02-23 22:49

administrator   ~0003518

I'm not sure what the problem is. As long as you have everything nicely split out and use a path, you can install it with as many versions as you want. I run 13 on my laptop and 14 on my desktop. I wrote about it before too:


2016-04-04 10:01

administrator   ~0003577

You need to make sure that in between compiles for different PHP versions you need to run "make clean". You can also use the "./" script to do this for you.


2017-02-09 11:04

reporter   ~0004211

Last edited: 2017-02-09 11:05

Hi derick, I'm new to compiling xdebug myself. I've experienced above issue but can't seem to make it work by simply using "make clean". Even if I extract the tarball freshly I run into this. I have installed PHP 7 by the package manager (on Debian) and PHP 5.6 (and others) in my opt directory. So system wide paths are adjusted for PHP 7. I use the phpize of PHP 5.6 to build xdebug.

Is there any option I can pass to the configure command to not use the PHP 7 include dir but the PHP 5.6 one? Respectively, which global variables do I have to adjust to make it work? Thank you for any directions.


2017-02-09 11:12

reporter   ~0004212

hi netbrothers-tr

Only way I got it to work with two PHP installs is by using the hack I put in the additional information:

# hack
sudo mv /usr/include/php/20151012 /usr/include/php/20151012.BU
sudo cp -r /usr/include/php/20131226 /usr/include/php/20151012

# standard procedure

# reset hack
sudo rm -R /usr/include/php/20151012
sudo mv /usr/include/php/20151012.BU /usr/include/php/20151012


2017-02-09 12:51

reporter   ~0004213

Thanks, dgoosens!


2017-02-11 22:13

reporter   ~0004216

Last edited: 2017-02-11 22:15

Yet another simple way.
Just set version of php.

- download xdebug
- tar -xvzf xdebug.tar
- cd xdebug
- phpize7.0
- ./configure --with-php-config=/usr/bin/php-config7.0
- make
- copy to /usr/lib/php/20151012/
- config your php.ini
- enjoy


2018-02-01 11:09

reporter   ~0004589

Last edited: 2018-02-01 11:39

I don't think it's a bug. It's expected as both PHP versions are trying to use the same copy of xdebug. What I did was to look for files on the system:

$ sudo find / -iname '' -print

Older versions already existed for me (I'm on AWS Cloud9). The 2017 one was put there by me (I used the excellent ). That's for PHP 7.2 but for PHP 5.6 I chose an older one that worked, from 2013. 2015 and 2016 didn't work. 2012 is likely for Cloud9's 5.5.9.

The way I separated which PHP loads which, is by NOT putting this into php.ini (Cloud9 uses a global php.ini, no matter the version, so I keep version-specific config out of that file):

zend_extension = /usr/lib/php/20170718/


zend_extension =

So NO loading xdebug from a php.ini that could be reached/loaded/used by any version.

DO put the lines for the appropriate version into these files




Now when I check with phpinfo() I can see 2 distinct versions getting loaded for each. Xdebug v2.5.5 for PHP 5.6 and Xdebug v2.6.0 for PHP 7.2 - I don't need to copy or move them around this way. According to the changelog Xdebug v2.5.5 is the last version supporting PHP 5.6, so I have the latest version for every system now.

Issue History

Date Modified Username Field Change
2016-02-18 21:41 dgoosens New Issue
2016-02-23 22:49 derick Note Added: 0003518
2016-02-23 22:49 derick Assigned To => derick
2016-02-23 22:49 derick Status new => feedback
2016-02-27 16:00 derick Status feedback => resolved
2016-02-27 16:00 derick Resolution open => no change required
2016-04-03 23:57 mkungla Tag Attached: make clean
2016-04-04 10:01 derick Note Added: 0003577
2017-02-09 11:04 netbrothers-tr Note Added: 0004211
2017-02-09 11:05 netbrothers-tr Note Edited: 0004211
2017-02-09 11:12 dgoosens Note Added: 0004212
2017-02-09 12:51 netbrothers-tr Note Added: 0004213
2017-02-11 22:13 serikd Note Added: 0004216
2017-02-11 22:15 serikd Note Edited: 0004216
2018-02-01 11:09 Firsh Note Added: 0004589
2018-02-01 11:12 Firsh Note Edited: 0004589
2018-02-01 11:14 Firsh Note Edited: 0004589
2018-02-01 11:39 Firsh Note Edited: 0004589