• vagrant 中 php 7.2 升级到 php 7.3


    在本地用 vagrant 给 php 7.2 升级到 7.3 的时候,直接修改了 box/config.yml里面 php 版本 然后就 vagrant reload --provision 进行重新启动,然后 php 升级成功,但是在build xdebug的时候报错了。

    TASK [geerlingguy.php-xdebug : Build Xdebug.] **********************************
    failed: [项目名称] (item=make) => {"changed": true, "cmd": ["make"], "delta": "0:00:00.149477", "end": "2020-07-17 06:59:21.346123", "item": "make", "msg": "non-zero return code", "rc": 2, "start": "2020-07-17 06:59:21.196646", "stderr": "/root/php7.3/xdebug-2.6.1/xdebug_compat.c: In function 'xdebug_zval_ptr':
    /root/php7.3/xdebug-2.6.1/xdebug_compat.c:56:27: warning: passing argument 1 of 'zend_get_zval_ptr' makes pointer from integer without a cast [-Wint-conversion]
      return zend_get_zval_ptr(op_type, node, zdata, &should_free, BP_VAR_R);
                               ^
    In file included from /usr/include/php/20180731/Zend/zend_API.h:29:0,
                     from /usr/include/php/20180731/main/php.h:38,
                     from /root/php7.3/xdebug-2.6.1/xdebug_compat.c:43:
    /usr/include/php/20180731/Zend/zend_execute.h:331:16: note: expected 'const zend_op * {aka const struct _zend_op *}' but argument is of type 'int'
     ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type);
                    ^
    /root/php7.3/xdebug-2.6.1/xdebug_compat.c:56:36: warning: passing argument 2 of 'zend_get_zval_ptr' makes integer from pointer without a cast [-Wint-conversion]
      return zend_get_zval_ptr(op_type, node, zdata, &should_free, BP_VAR_R);
                                        ^
    In file included from /usr/include/php/20180731/Zend/zend_API.h:29:0,
                     from /usr/include/php/20180731/main/php.h:38,
                     from /root/php7.3/xdebug-2.6.1/xdebug_compat.c:43:
    /usr/include/php/20180731/Zend/zend_execute.h:331:16: note: expected 'int' but argument is of type 'const znode_op * {aka const union _znode_op *}'
     ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type);
                    ^
    /root/php7.3/xdebug-2.6.1/xdebug_compat.c:56:42: warning: passing argument 3 of 'zend_get_zval_ptr' from incompatible pointer type [-Wincompatible-pointer-types]
      return zend_get_zval_ptr(op_type, node, zdata, &should_free, BP_VAR_R);
                                              ^
    In file included from /usr/include/php/20180731/Zend/zend_API.h:29:0,
                     from /usr/include/php/20180731/main/php.h:38,
                     from /root/php7.3/xdebug-2.6.1/xdebug_compat.c:43:
    /usr/include/php/20180731/Zend/zend_execute.h:331:16: note: expected 'const znode_op * {aka const union _znode_op *}' but argument is of type 'zend_execute_data * {aka struct _zend_execute_data *}'
     ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type);
                    ^
    /root/php7.3/xdebug-2.6.1/xdebug_compat.c:56:49: warning: passing argument 4 of 'zend_get_zval_ptr' from incompatible pointer type [-Wincompatible-pointer-types]
      return zend_get_zval_ptr(op_type, node, zdata, &should_free, BP_VAR_R);
                                                     ^
    In file included from /usr/include/php/20180731/Zend/zend_API.h:29:0,
                     from /usr/include/php/20180731/main/php.h:38,
                     from /root/php7.3/xdebug-2.6.1/xdebug_compat.c:43:
    /usr/include/php/20180731/Zend/zend_execute.h:331:16: note: expected 'const zend_execute_data * {aka const struct _zend_execute_data *}' but argument is of type 'zval ** {aka struct _zval_struct **}'
     ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type);
                    ^
    /root/php7.3/xdebug-2.6.1/xdebug_compat.c:56:9: error: too few arguments to function 'zend_get_zval_ptr'
      return zend_get_zval_ptr(op_type, node, zdata, &should_free, BP_VAR_R);
             ^
    In file included from /usr/include/php/20180731/Zend/zend_API.h:29:0,
                     from /usr/include/php/20180731/main/php.h:38,
                     from /root/php7.3/xdebug-2.6.1/xdebug_compat.c:43:
    /usr/include/php/20180731/Zend/zend_execute.h:331:16: note: declared here
     ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type);
                    ^
    /root/php7.3/xdebug-2.6.1/xdebug_compat.c: In function 'xdebug_setcookie':
    /root/php7.3/xdebug-2.6.1/xdebug_compat.c:194:80: warning: passing argument 8 of 'php_setcookie' makes pointer from integer without a cast [-Wint-conversion]
      php_setcookie(name_s, value_s, expires, path_s, domain_s, secure, url_encode, httponly);
                                                                                    ^
    In file included from /root/php7.3/xdebug-2.6.1/xdebug_compat.h:25:0,
                     from /root/php7.3/xdebug-2.6.1/xdebug_compat.c:45:
    /usr/include/php/20180731/ext/standard/head.h:40:12: note: expected 'zend_string * {aka struct _zend_string *}' but argument is of type 'int'
     PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires, zend_string *path, zend_string *domain, int secure, int httponly, zend_string *samesite, int url_encode);
                ^
    /root/php7.3/xdebug-2.6.1/xdebug_compat.c:194:2: error: too few arguments to function 'php_setcookie'
      php_setcookie(name_s, value_s, expires, path_s, domain_s, secure, url_encode, httponly);
      ^
    In file included from /root/php7.3/xdebug-2.6.1/xdebug_compat.h:25:0,
                     from /root/php7.3/xdebug-2.6.1/xdebug_compat.c:45:
    /usr/include/php/20180731/ext/standard/head.h:40:12: note: declared here
     PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires, zend_string *path, zend_string *domain, int secure, int httponly, zend_string *samesite, int url_encode);
                ^
    make: *** [xdebug_compat.lo] Error 1", "stderr_lines": ["/root/php7.3/xdebug-2.6.1/xdebug_compat.c: In function 'xdebug_zval_ptr':", "/root/php7.3/xdebug-2.6.1/xdebug_compat.c:56:27: warning: passing argument 1 of 'zend_get_zval_ptr' makes pointer from integer without a cast [-Wint-conversion]", "  return zend_get_zval_ptr(op_type, node, zdata, &should_free, BP_VAR_R);", "                           ^", "In file included from /usr/include/php/20180731/Zend/zend_API.h:29:0,", "                 from /usr/include/php/20180731/main/php.h:38,", "                 from /root/php7.3/xdebug-2.6.1/xdebug_compat.c:43:", "/usr/include/php/20180731/Zend/zend_execute.h:331:16: note: expected 'const zend_op * {aka const struct _zend_op *}' but argument is of type 'int'", " ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type);", "                ^", "/root/php7.3/xdebug-2.6.1/xdebug_compat.c:56:36: warning: passing argument 2 of 'zend_get_zval_ptr' makes integer from pointer without a cast [-Wint-conversion]", "  return zend_get_zval_ptr(op_type, node, zdata, &should_free, BP_VAR_R);", "                                    ^", "In file included from /usr/include/php/20180731/Zend/zend_API.h:29:0,", "                 from /usr/include/php/20180731/main/php.h:38,", "                 from /root/php7.3/xdebug-2.6.1/xdebug_compat.c:43:", "/usr/include/php/20180731/Zend/zend_execute.h:331:16: note: expected 'int' but argument is of type 'const znode_op * {aka const union _znode_op *}'", " ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type);", "                ^", "/root/php7.3/xdebug-2.6.1/xdebug_compat.c:56:42: warning: passing argument 3 of 'zend_get_zval_ptr' from incompatible pointer type [-Wincompatible-pointer-types]", "  return zend_get_zval_ptr(op_type, node, zdata, &should_free, BP_VAR_R);", "                                          ^", "In file included from /usr/include/php/20180731/Zend/zend_API.h:29:0,", "                 from /usr/include/php/20180731/main/php.h:38,", "                 from /root/php7.3/xdebug-2.6.1/xdebug_compat.c:43:", "/usr/include/php/20180731/Zend/zend_execute.h:331:16: note: expected 'const znode_op * {aka const union _znode_op *}' but argument is of type 'zend_execute_data * {aka struct _zend_execute_data *}'", " ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type);", "                ^", "/root/php7.3/xdebug-2.6.1/xdebug_compat.c:56:49: warning: passing argument 4 of 'zend_get_zval_ptr' from incompatible pointer type [-Wincompatible-pointer-types]", "  return zend_get_zval_ptr(op_type, node, zdata, &should_free, BP_VAR_R);", "                                                 ^", "In file included from /usr/include/php/20180731/Zend/zend_API.h:29:0,", "                 from /usr/include/php/20180731/main/php.h:38,", "                 from /root/php7.3/xdebug-2.6.1/xdebug_compat.c:43:", "/usr/include/php/20180731/Zend/zend_execute.h:331:16: note: expected 'const zend_execute_data * {aka const struct _zend_execute_data *}' but argument is of type 'zval ** {aka struct _zval_struct **}'", " ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type);", "                ^", "/root/php7.3/xdebug-2.6.1/xdebug_compat.c:56:9: error: too few arguments to function 'zend_get_zval_ptr'", "  return zend_get_zval_ptr(op_type, node, zdata, &should_free, BP_VAR_R);", "         ^", "In file included from /usr/include/php/20180731/Zend/zend_API.h:29:0,", "                 from /usr/include/php/20180731/main/php.h:38,", "                 from /root/php7.3/xdebug-2.6.1/xdebug_compat.c:43:", "/usr/include/php/20180731/Zend/zend_execute.h:331:16: note: declared here", " ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type);", "                ^", "/root/php7.3/xdebug-2.6.1/xdebug_compat.c: In function 'xdebug_setcookie':", "/root/php7.3/xdebug-2.6.1/xdebug_compat.c:194:80: warning: passing argument 8 of 'php_setcookie' makes pointer from integer without a cast [-Wint-conversion]", "  php_setcookie(name_s, value_s, expires, path_s, domain_s, secure, url_encode, httponly);", "                                                                                ^", "In file included from /root/php7.3/xdebug-2.6.1/xdebug_compat.h:25:0,", "                 from /root/php7.3/xdebug-2.6.1/xdebug_compat.c:45:", "/usr/include/php/20180731/ext/standard/head.h:40:12: note: expected 'zend_string * {aka struct _zend_string *}' but argument is of type 'int'", " PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires, zend_string *path, zend_string *domain, int secure, int httponly, zend_string *samesite, int url_encode);", "            ^", "/root/php7.3/xdebug-2.6.1/xdebug_compat.c:194:2: error: too few arguments to function 'php_setcookie'", "  php_setcookie(name_s, value_s, expires, path_s, domain_s, secure, url_encode, httponly);", "  ^", "In file included from /root/php7.3/xdebug-2.6.1/xdebug_compat.h:25:0,", "                 from /root/php7.3/xdebug-2.6.1/xdebug_compat.c:45:", "/usr/include/php/20180731/ext/standard/head.h:40:12: note: declared here", " PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires, zend_string *path, zend_string *domain, int secure, int httponly, zend_string *samesite, int url_encode);", "            ^", "make: *** [xdebug_compat.lo] Error 1"], "stdout": "/bin/bash /root/php7.3/xdebug-2.6.1/libtool --mode=compile cc   -I. -I/root/php7.3/xdebug-2.6.1 -DPHP_ATOM_INC -I/root/php7.3/xdebug-2.6.1/include -I/root/php7.3/xdebug-2.6.1/main -I/root/php7.3/xdebug-2.6.1 -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/php7.3/xdebug-2.6.1/xdebug_compat.c -o xdebug_compat.lo 
    libtool: compile:  cc -I. -I/root/php7.3/xdebug-2.6.1 -DPHP_ATOM_INC -I/root/php7.3/xdebug-2.6.1/include -I/root/php7.3/xdebug-2.6.1/main -I/root/php7.3/xdebug-2.6.1 -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/php7.3/xdebug-2.6.1/xdebug_compat.c  -fPIC -DPIC -o .libs/xdebug_compat.o
    Makefile:234: recipe for target 'xdebug_compat.lo' failed", "stdout_lines": ["/bin/bash /root/php7.3/xdebug-2.6.1/libtool --mode=compile cc   -I. -I/root/php7.3/xdebug-2.6.1 -DPHP_ATOM_INC -I/root/php7.3/xdebug-2.6.1/include -I/root/php7.3/xdebug-2.6.1/main -I/root/php7.3/xdebug-2.6.1 -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/php7.3/xdebug-2.6.1/xdebug_compat.c -o xdebug_compat.lo ", "libtool: compile:  cc -I. -I/root/php7.3/xdebug-2.6.1 -DPHP_ATOM_INC -I/root/php7.3/xdebug-2.6.1/include -I/root/php7.3/xdebug-2.6.1/main -I/root/php7.3/xdebug-2.6.1 -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/php7.3/xdebug-2.6.1/xdebug_compat.c  -fPIC -DPIC -o .libs/xdebug_compat.o", "Makefile:234: recipe for target 'xdebug_compat.lo' failed"]}

    然后也不知道到底怎么回事,是不是该修改Xdebug相关配置,就去box配置里面找网上找,只发现了 这些。

    # XDebug configuration.
    php_xdebug_version: 2.6.1
    # Change this value to 1 in order to enable xdebug by default.
    php_xdebug_default_enable: 0
    php_xdebug_coverage_enable: 0
    php_xdebug_cli_disable: 'yes'
    php_xdebug_remote_enable: 1
    php_xdebug_remote_connect_back: 1
    # Use PHPSTORM for PHPStorm, sublime.xdebug for Sublime Text.
    php_xdebug_idekey: PHPSTORM
    php_xdebug_max_nesting_level: 256
    php_xdebug_remote_port: '9000'
    php_memory_limit: 512M

    然后就按

    php_xdebug_version:

    这个关键字搜 发现了这篇文章

    https://blog.csdn.net/longxingjiang/article/details/83505559

    让我根据phpinifo() 去找对应需要安装的xdebug版本

    于是我就把phpinfo()复制出来然后去了这个网站

    https://xdebug.org/wizard

    然后得到了结果

    好的 ,看来是我需要安装 2.9.6 版本的xdebug,因为我现在用的是php7.3了。老版本 2.6.1 是对 php 7.2 使用的。 

     这 vagrant 里面升级 php 版本真方便啊,改改配置,重新reload就好了。

  • 相关阅读:
    Mongo连接远程数据库
    将MongoDB服务器设置成Windows启动服务(win10)
    关于php初学者的理解!请大家浏览并指出不足!谢谢!
    python+selenium初学者常见问题处理
    极客时间测试专栏阅读总结——软件测试总体方案
    pytest 一.安装和使用入门
    软件测试工程师——你不仅仅应该会点点点
    测试电梯、杯子、桌子、洗衣机的方法
    软件测试面试-软件测试宝典
    支付测试场景
  • 原文地址:https://www.cnblogs.com/lizhaoyao/p/13330238.html
Copyright © 2020-2023  润新知