问题
I define the xdebug.so path on php.ini.
but I can't see xdebug info in phpinfo() function.
and error comps up like below.
Failed loading /usr/lib64/php/modules/xdebug.so: /usr/lib64/php/modules/xdebug.so: undefined symbol: compiler_globals
How can I resolve this issue?
Using php 7.1.4 version.
回答1:
Make sure that Xdebug is compiled using right php-config
.
Manually download xdebug.tgz
from https://xdebug.org/download.php and then follow the instructions on https://xdebug.org/wizard.php.
Just make sure that:
- When you do the
phpize
step - you use the rightphpize
binary for your PHP installation. If it is a custom installation it will usually be something like/usr/local/php/bin/phpize
- Same goes for running the
./configure
step. Provide the path to correctphp-config
binary like this:./configure --with-php-config=/usr/local/php/bin/php-config
Only then you can complie the extension and copy the xdebug.so
file to extension directory. Also remember to make clean
first if u compiled that directory at least once before.
来源:https://stackoverflow.com/questions/44365425/installing-xdebug-on-centos7-i-get-error-undefined-symbol-compiler-globals