Home > Article > Backend Development > PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
andy@AndyMacBookPro:~$ php -v
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
PHP 5.4.30 (cli) (built: Jul 29 2014 23:43:29)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
Edit php.ini
sudo vim /private/php.ini
Change:
extension=/usr/local/Cellar/php54-xdebug/2.2.5/xdebug.so
to:
zend_extension=/usr/local/Cellar + ) (built: Jul 29 2014 23:43:29)
Copyright (c) 1997-2014 The PHP GroupZend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
zend_extension needs to use the full path when loading the php extension, and the path relative to extension_dir can be used when loading extension.
The above introduces PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.