大网数据广告活动
服务器运维问答

Unable to install xdebug - undefined symbol: zend_post_startup_cb

· 52CE 我爱测

I uninstalled php7 with apt-get purge php and installed it again with zypper in php7 php7-mysql . Then I followed the install instructions of xdebug and restarted apache with systemctl restart apache2 , but there is no xdebug in …

问题原文

原帖链接 · Black · CC BY-SA 4.0

I uninstalled php7 with apt-get purge php and installed it again with zypper in php7 php7-mysql.

Then I followed the install instructions of xdebug and restarted apache with systemctl restart apache2, but there is no xdebug in my phpinfo(), only some occurences in HTTP_HEADER e.g. (XDEBUG_SESSION=netbeans-xdebug;)

This is my configuration in php.ini:

[xdebug]
zend_extension = /usr/lib64/php7/extensions/xdebug.so
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_handler="dbgp"
xdebug.remote_host="192.168.40.161"
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
xdebug.renite_enable = 1
xdebug.max_nesting_level = 1000
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = '/var/log/xdebug'

The file /usr/lib64/php7/extensions/xdebug.so does exist, I just installed xdebug from source and copied xdebug.so from modules/xdebug.so to /usr/lib64/php7/extensions/

I even restarted the whole server.

How can I fix this?

Update:

I checked the apache2 error log /var/log/apache2/error_log and noticed that this is getting logged just right after restarting the apache2 service:

[Tue Jul 30 14:25:08.674685 2019] [mpm_prefork:notice] [pid 4862] AH00170: caught SIGWINCH, shutting down gracefully
AH00558: httpd-prefork: Could not reliably determine the server's fully qualified domain name, using 192.168.40.44. Set the 'ServerName' directive globally to suppress this message
[Tue Jul 30 14:25:08.758551 2019] [ssl:warn] [pid 5060] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
Failed loading /usr/lib64/php7/extensions/xdebug.so:  /usr/lib64/php7/extensions/xdebug.so: undefined symbol: zend_post_startup_cb
[Tue Jul 30 14:25:08.765786 2019] [mpm_prefork:notice] [pid 5060] AH00163: Apache/2.4.33 (Linux/SUSE) OpenSSL/1.1.0i-fips PHP/7.2.5 configured -- resuming normal operations
[Tue Jul 30 14:25:08.765815 2019] [core:notice] [pid 5060] AH00094: Command line: '/usr/sbin/httpd-prefork -D SYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apache2/sysconfig.d//global.conf -f /etc/apache2/httpd.conf -c Include /etc/apache2/sysconfig.d//include.conf -D SYSTEMD -D FOREGROUND'

=> Failed loading /usr/lib64/php7/extensions/xdebug.so: /usr/lib64/php7/extensions/xdebug.so: undefined symbol: zend_post_startup_cb

已采纳解答

原帖链接 · Black · CC BY-SA 4.0

I was able to install it by executing sudo apt-get install php-xdebug. I wonder why it does not work if I try to install it manually by going the official way and installing it via source...??

However, I get "Waiting for Connection" in NetBeans and nothing happens, but this is another problem...

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-07-30)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。