Problem
After installing Xdebug, when configured in Phpstorm, a warning appears that prevents breakpoint debugging from being implemented with the following warning message:
Xdebug requires Zend Engine API version xxxxxxxx. The Zend Engine API version 2xxxxxxxx which is installed, is newer.
Reason:
Native automatic php files and we use XAMPP or Mamp integrated PHP environment conflicts, during the installation process,
Executes the phpize, automatically executes the native PHP environment, the specific address is the PHP file in/usr/bin
Execute./configure is also configured to/usr/bin
Causes the configuration file for Xdebug to not be found when configured in Phpstorm.
Note that: 1, using Php-v and using phpinfo () to get PHP information completely inconsistent (my native PHP version is less than the XAMPP integrated PHP version); 2, two PHP versions of the file location is not the same
Solution:
In accordance with the official installation steps, the 4th and 5th steps need to be changed, the following information is changed:
Proceed to step 4th ( do not use Phpize directly), but use the path as follows:
phpize Change to/applications/xampp/xamppfiles/bin/phpize (see where everyone puts XAMPP)
Perform step 5th, as follows:
./configure instead ./configure--with-php-config=/applications/xampp/xamppfiles/bin/php-config
The next steps can be followed by the official.
Workaround Reference article:
Official documents
MAC Xdebug Installation encountered Zend Engine API inconsistency