Reputation: 91
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?
Upvotes: 6
Views: 6938
Reputation: 1820
You can use, https://xdebug.org/wizard.php.
For Windows,
php -i
.-> Uncomment these, (remove the leading ; only for the extension_dir),
; On windows:
; extension_dir = "ext"
-> Add following line,
zend_extension = xdebug
Rerun the xdebug wizard to confirm,
Xdebug installed: 3.1.1
Upvotes: 0
Reputation: 1164
The xdebug site currently only has 64-bit
versions for PHP 7.3
; the PECL site has the 32-bit
versions needed for XAMPP.
this will be corrected once xdebug 2.7
is production, but in the meanwhile the PECL site is the work around.
Upvotes: 1
Reputation: 91
After quite a bit more research I found the following tool.
I followed the instructions with some minor changes required for the path and Xdebug is now working.
Upvotes: 3