• Xdebug bad Zend API Version Number


    I am having trouble upgrading xdebug for MAMP. I was running version 2.2.0 and there was a known issue that I ran into: PhpStorm and Xdebug not breaking in Symfony2 Controller

    I tried to upgrade to version 2.2.3 by following the instructions from http://xdebug.org/wizard.php

    After downloading and extracting the xdebug tar I ran /Applications/MAMP/bin/php/php5.4.4/bin/phpize

    Here is the output:

    Configuring for:
    PHP Api Version:         20100412
    Zend Module Api No:      20100525
    Zend Extension Api No:   220100525
    

    I then copied the modules/xdebug.so file into the mamp php5.4.4 extensions dir: `/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/xdebug.

    If I run /Applications/MAMP/bin/php/php5.4.4/bin/php -v I get the following:

    Xdebug requires Zend Engine API version 220090626.
    The Zend Engine API version 220100525 which is installed, is newer.
    Contact Derick Rethans at http://xdebug.org/docs/faq#api for a later version of Xdebug.
    
    PHP 5.4.4 (cli) (built: Jul  4 2012 17:28:56)
    Copyright (c) 1997-2012 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
    

    I have restarted MAMP and Apache and tried loading a page with phpinfo() and I do not see Xdebug listed. If I moved the old xdebug.so file back in place the error is removed and phpinfo() show xdebug as enabled



    1
    down voteaccepted

    I managed to solve this issue by running

    /Applications/MAMP/bin/php/php5.4.4/bin/pecl install xdebug At first I was seeing issues with the Zend API number using pecl. I followed this post: pecl installs for previous php version and set the following:

    sudo /Applications/MAMP/bin/php/php5.4.4/bin/pear config-set php_ini /Applications/MAMP/bin/php/php5.4.4/conf/php.ini
    sudo /Applications/MAMP/bin/php/php5.4.4/bin/pecl config-set bin_dir /Applications/MAMP/bin/php/php5.4.4/bin/
    

    Not sure if these configs had something to do with it failing before


  • 相关阅读:
    JVM精进之路
    Java8-java.time-常用API
    Java代码精进
    Java8——jdk——java.time包
    Java8——Optional
    Java8——Stream
    Java8——Lambda表达式
    Java高级-反射
    重新学习SpringMVC——补充
    LeetCode677. 键值映射(相关话题:Trie前缀树)
  • 原文地址:https://www.cnblogs.com/zsw-1993/p/4879312.html
Copyright © 2020-2023  润新知