简体   繁体   English

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

[英]PHP Warning: Xdebug MUST be loaded as a Zend extension

Here's the error I'm getting: 这是我得到的错误:

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

This is from my php.ini file: 这是我的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"

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

I haven't made any changes and my server has a fresh install of cPanel. 我没有做任何更改,我的服务器有一个全新的cPanel安装。 Anyone know what would be causing this to happen or see any issues with the information above? 任何人都知道会导致这种情况发生的原因或者上述信息有任何问题吗?

For anyone else who is having this issue, I updated this in my php.ini file and it fixed the error: 对于遇到此问题的其他任何人,我在我的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"

只需在您的活动php.ini文件中切换到zend_extension extension即可。

The problem is the way IIS adds the extension related configuration to the php.ini file. 问题是IIS将扩展相关配置添加到php.ini文件的方式。 To solve the problem simple replace in php.ini file, 要解决这个问题,请简单替换php.ini文件,

extension=php_xdebug-2.5.0rc1-7.0-vc14-nts-x86_64.dll

with

zend_extension=php_xdebug-2.5.0rc1-7.0-vc14-nts-x86_64.dll

Although now IIS might not recognize xdebug extension as enabled, it is enabled and can be verified by checking the phpinfo() results. 虽然现在IIS可能无法将xdebug扩展识别为已启用,但它已启用并可通过检查phpinfo()结果进行验证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM