Jump to content

Xdebug installation


Recommended Posts

Hi Guys,

On a fresh debian 9 install, php7.2 all working nicely. Then I try to install xdebug. I followed the instructions here https://xdebug.org/docs/install

Basically I ran

```

sudo pecl install xdebug

```

and added  zend_extension=/usr/lib/php/20180731/xdebug.so to my /etc/php/7.2/fpm/php.ini file

I've checked in /usr/lib/php/20180731 and xdebug.so is there. When i view my phpinfo() there is no mention of xdebug, pretty sure that aint right.

How to go about checking my installation

Link to comment
Share on other sites

How is PHP integrated into the browser?  Is it Apache with mod_php, nginx with php-fpm?  

Also did you run command line php (php -i) and see if the module is showing there? 

What xdebug configuration do you have?  Is there an xdebug.ini, and if so where, and what are the contents? 

Link to comment
Share on other sites

Hi gizmola,

 

I have nginx and php-fpm,

php -i does not show xdebug as being installed.

I added 

```

zend_extension = /usr/lib/php/20180731/xdebug.so

```

to the bottom of /etc/php/7.2/fpm/php.ini and restarted nginx

AFAIK i don't have a xdebug.ini.

Edited by ludo1960
Link to comment
Share on other sites

After much fiddling around I see that the make test command seems to want to use php 7.3, but php -v returns 

```

ludo@aegir:/usr/lib/php$ php -v
Failed loading /usr/lib/php/20180731/xdebug.so:  /usr/lib/php/20180731/xdebug.so: undefined symbol: zend_hash_add
PHP 7.2.18-1+0~20190503103213.21+stretch~1.gbp101320 (cli) (built: May  3 2019 10:32:13) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.18-1+0~20190503103213.21+stretch~1.gbp101320, Copyright (c) 1999-2018, by Zend Technologies
```

How can I make xdebug use php 7.2, I did use php 7.2 in the xdebug configuration tool

```

ludo@aegir:~/Downloads/xdebug-2.7.2$ make test

Build complete.
Don't forget to run 'make test'.


=====================================================================
PHP         : /usr/bin/php7.3 
PHP_SAPI    : cli
PHP_VERSION : 7.3.5-1+0~20190503093827.38+stretch~1.gbp60a41b
ZEND_VERSION: 3.3.5
PHP_OS      : Linux - Linux aegir.local.com 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1 (2019-04-12) x86_64
INI actual  : /home/ludo/Downloads/xdebug-2.7.2/tmp-php.ini
More .INIs  :   
CWD         : /home/ludo/Downloads/xdebug-2.7.2
Extra dirs  : 
VALGRIND    : Not used
=====================================================================
TIME START 2019-05-09 02:47:18
=====================================================================
No tests were run.
```

Any ideas guys?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.