I'm trying to get Xdebug (I installed 2.7 with pecl) working for php but getting the following error.
php -v
Xdebug requires Zend Engine API version 320160303.
The Zend Engine API version 320180731 which is installed, is newer.
Contact Derick Rethans at http://xdebug.org/docs/faq#api for a later version of Xdebug.
PHP 7.3.3 (cli) (built: Mar 8 2019 16:40:07) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.3, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.3, Copyright (c) 1999-2018, by Zend Technologies
I've installed the latest version of PHP 7.3 with Homebrew, but Apache is using PHP Version 7.1.23 . I think I'm having an issue because I'm using wrong Zend API version.
php config in httpd.conf is
LoadModule php7_module libexec/apache2/libphp7.so
phpize gives the following.
/usr/local/bin/phpize -v
Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
I've added the following to php.ini
zend_extension=/usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
Which exists here :
/usr/lib/php/extensions/no-debug-non-zts-20160303 ls
opcache.a opcache.so xdebug.so
My questions
how do I get apache to use php 7.3?
will this solve my Xdebug issue?
In general, at any point when an Xdebug version is released, it will support the currently supported PHP versions. On Windows you need at least PHP 7.4. 20 or PHP 8.0.
For Windows, this is normally "c:\xampp\apache\bin\php. ini". Important note for Windows 7 & Vista users: As of August 2013 (XAMPP version 1.8. 2), the file "php_xdebug.
After quite a bit more research I found the following tool.
https://xdebug.org/wizard.php
I followed the instructions with some minor changes required for the path and Xdebug is now working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With