PHP 警告:Xdebug 必须作为 Zend 扩展加载

2022-08-30 18:09:44

这是我遇到的错误:

PHP Warning:  Xdebug MUST be loaded as a Zend extension in Unknown on line 0
PHP Warning:  Module 'xdebug' already loaded in Unknown on line 0

这是来自我的php.ini文件:

; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626"
zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.3.so"
extension=xdebug.so
zend_extension="xdebug.so"

文件确实存在于xdebug.so/usr/local/lib/php/extensions/no-debug-non-zts-20090626

我没有进行任何更改,我的服务器有全新安装的cPanel。有谁知道是什么原因导致这种情况发生,或者看到上述信息的任何问题?


答案 1

只需切换到活动的 php.ini 文件中即可。extensionzend_extension


答案 2

对于遇到此问题的其他任何人,我在我的php.ini文件中更新了它,并修复了错误:

; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626"
zend_extension = "/usr/local/IonCube/ioncube_loader_lin_5.3.so"
zend_extension = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
extension = "pdo.so"
extension = "pdo_sqlite.so"
extension = "pdo_mysql.so"
extension = "sqlite.so"

推荐