PHP7 Xdebug配置方式

方式一

  • 到http://xdebug.org/files/php_xdebug-2.4.1-7.0-vc14.dll下载最新版的XDebug文件。

下载之后放到PHP7根目录下的ext子目录下。

  • PHP7 配置 修改PHP7根目录下的PHP.ini文件,在最后添加如下代码

    [XDebug]
    ;; Only Zend OR (!) XDebug
    zend_extension=f:\xampp\php\ext\php_xdebug-2.4.1-7.0-vc14.dll
    xdebug.remote_enable=1
    xdebug.remote_host=127.0.0.1
    xdebug.remote_port=9000
    xdebug.remote_handler=dbgp
    xdebug.collect_vars = On
    xdebug.collect_return = On
    xdebug.collect_params = On
    xdebug.profiler_enable=1
    xdebug.profiler_output_dir=f:\xampp\tmp

方式二

  • 到http://xdebug.org/files/php_xdebug-2.4.0rc3-7.0-vc14-x86_64.dll下载最新版的XDebug文件。

下载之后放到PHP7根目录下的ext子目录下。

  • PHP7 配置 修改PHP7根目录下的PHP.ini文件,在最后添加如下代码

    [xdebug]
    zend_extension = D:\PHP-TS\ext\php_xdebug-2.4.0rc3-7.0-vc14-x86_64.dll
    xdebug.remote_enable=true
    xdebug.collect_params=3
    ;xdebug.collect_return=1
    xdebug.collect_vars=1
    xdebug.collect_assignments=1
    xdebug.collect_includes=1
    xdebug.trace_format=0
    xdebug.auto_trace=0
    ;xdebug.trace_options=1
    ;xdebug.profiler_enable = off
    ;xdebug.profiler_enable_trigger = off
    ;xdebug.profiler_output_name =cachegrind.out.%t.%p
    xdebug.trace_output_name=trace.%H%R%t
    ;xdebug.show_local_vars=1
    xdebug.remote_handler = dbgp
    xdebug.remote_host= localhost
    xdebug.remote_port = 9999
    xdebug.cli_color=2
    xdebug.show_exception_trace=0
    xdebug.show_mem_delta=1
    xdebug.var_display_max_children=-1
    xdebug.var_display_max_data=-1
    xdebug.var_display_max_depth=6

附:PHP7的安装

  • PHP 5.5升级到PHP7.0后,提示“The mbstring extension is missing. Please check your PHP configuration.”

    找到php.ini,修改一下配置 extension_dir = "F:\xampp\php7x86ts\ext" 找到extension=php_mbstring.dll这一行,去掉行首分号保存php.ini 类似问题可具体可参考php5中的php.ini配置

  • 启动阿帕奇服务器httpd.exe - 系统错误 “无法启动此程序 因为计算机中丢失libssh2.dll 尝试重新安装解决此问题”

    1 下载 php extension ssh2 下载地址 http://windows.php.net/downloads/pecl/releases/ssh2/1.0/ 根据自己PHP的版本去下载,我使用的是线程安全的,所以下载的是php_ssh2-1.0-7.0-ts-vc14-x86.zip 2 解压完后,会有三个文件,libssh2.dll、php_ssh.dll、php_ssh2.pdb。 3 将 php_ssh.dll、php_ssh2.pdb 放到你的 php 扩展目录下 php/ext/ 下。 4 将libssh2.dll 复制到 c:/windows/system32 和 c:/windows/syswow64 各一份 5 php.ini中加入 extension=php_ssh2.dll 6 重启apache,即可使用php执行ssh连接操作了。 查看phpinfo(),是否有显示php_ssh2扩展加载成功。

  • 启动阿帕奇服务器httpd.exe - 系统错误 “无法启动此程序 因为计算机中丢失nghttp2.dll 尝试重新安装解决此问题”

    将nghttp2.dll 复制到 c:/windows/system32 和 c:/windows/syswow64 各一份,重启apache。

  • 启动阿帕奇服务器httpd.exe “无法定位序数 385 于动态链接库 SSLEAY32.dll 上”

    这个问题比较棘手,它涉及到操作系统的深层影响,不单单是软件本身的配置问题。由于我这里所使用的PHP方式是在原有的XAMPP版本上进行升级改造,从而出现一系列配置问题以及难以预料的操作系统问题,花费了大量时间来进行排查调试,仍然难以解决,得不偿失,因而决定升级XAMPP到新版本,直接支持PHP7.1。遗憾的是,在卸载XAMPP的同时,忘了备份数据库,因此造成了原有数据的丢失。值得一提的是,新的XAMPP集成开发包中所包含的MariDB作为MySQL的替代方案,有着良好的继承与兼容能力,数据库文件直接复制粘贴过去照样可以用,没有任何问题。在数据库连接上,最大的变化是PHP7只能使用msqli来连接数据库,不再支持mysql_connect()函数。建议以后在WIndow环境使用XAMPP集成环境,在Linux上使用LNMP集成环境,尽量不要去产生大的改造,以免带来不可预知的问题。

http://www.cnblogs.com/ioveNature/p/7199585.html

 

posted on 2017-08-09 15:30  chen110xi  阅读(3654)  评论(0编辑  收藏  举报