zoukankan      html  css  js  c++  java
  • 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


  • 相关阅读:
    php数据类型
    php输出语句
    php学习知识点框架
    php变量
    php语法
    php 的开发工具
    搭建php环境的几种方法
    redis 的单机安装
    三、其他主机安装zabbix-agent加入到zabbix
    内核参数优化
  • 原文地址:https://www.cnblogs.com/zsw-1993/p/4879312.html
Copyright © 2011-2022 走看看