• <bdo id='0X1zc'></bdo><ul id='0X1zc'></ul>

      <legend id='0X1zc'><style id='0X1zc'><dir id='0X1zc'><q id='0X1zc'></q></dir></style></legend>

    1. <tfoot id='0X1zc'></tfoot>

      <small id='0X1zc'></small><noframes id='0X1zc'>

    2. <i id='0X1zc'><tr id='0X1zc'><dt id='0X1zc'><q id='0X1zc'><span id='0X1zc'><b id='0X1zc'><form id='0X1zc'><ins id='0X1zc'></ins><ul id='0X1zc'></ul><sub id='0X1zc'></sub></form><legend id='0X1zc'></legend><bdo id='0X1zc'><pre id='0X1zc'><center id='0X1zc'></center></pre></bdo></b><th id='0X1zc'></th></span></q></dt></tr></i><div id='0X1zc'><tfoot id='0X1zc'></tfoot><dl id='0X1zc'><fieldset id='0X1zc'></fieldset></dl></div>

      PHPUnit 分段错误

      PHPUnit Segmentation fault(PHPUnit 分段错误)

          <bdo id='n9jJw'></bdo><ul id='n9jJw'></ul>

        • <small id='n9jJw'></small><noframes id='n9jJw'>

            1. <tfoot id='n9jJw'></tfoot>
                <tbody id='n9jJw'></tbody>
            2. <legend id='n9jJw'><style id='n9jJw'><dir id='n9jJw'><q id='n9jJw'></q></dir></style></legend>
              <i id='n9jJw'><tr id='n9jJw'><dt id='n9jJw'><q id='n9jJw'><span id='n9jJw'><b id='n9jJw'><form id='n9jJw'><ins id='n9jJw'></ins><ul id='n9jJw'></ul><sub id='n9jJw'></sub></form><legend id='n9jJw'></legend><bdo id='n9jJw'><pre id='n9jJw'><center id='n9jJw'></center></pre></bdo></b><th id='n9jJw'></th></span></q></dt></tr></i><div id='n9jJw'><tfoot id='n9jJw'></tfoot><dl id='n9jJw'><fieldset id='n9jJw'></fieldset></dl></div>
              • 本文介绍了PHPUnit 分段错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                当我的开发盒 (Linux Mint) 上的 PHPUnit 测试正常失败时,它会在我的持续集成盒 (Centos) 上导致分段错误".两台机器都运行相同版本的 PHPUnit.我的开发箱运行 PHP 5.3.2-1ubuntu4.9,CI 是 PHP 5.2.17.不过,我宁愿把升级 PHP 作为最后的手段.

                When a PHPUnit test fails normally on my dev box (Linux Mint), it causes a "Segmentation Fault" on my Continous Integration box (Centos). Both machines are running the same version of PHPUnit. My dev box is running PHP 5.3.2-1ubuntu4.9, and the CI is PHP 5.2.17. I'd rather leave upgrading the PHP as a last resort though.

                根据这个线程:PHPUnit 得到分段错误我试过停用/重新安装 Xdebug.我没有安装 inclue.so.

                As per this thread: PHPUnit gets segmentation fault I have tried deactivating / reinstalling Xdebug. I don't have inclue.so installed.

                在 CI 框上,我目前只有两个处于活动状态的扩展:来自 php-xml 的 dom(phpunit 需要)和 memcache(我的框架需要),所有其他的都已关闭.

                On the CI box I currently only have two extensions active: dom from php-xml (required for phpunit) and memcache (required by my framework), all the others have been turned off.

                推荐答案

                在 cweiske 建议的旁边,如果升级 PHP 不是您的选择,并且您在定位 segfault 的来源时遇到问题,您可以使用调试器来了解更多.

                Next to what cweiske suggested, if upgrading PHP is not an option for you and you have problems to locate the source of the segfault, you can use a debugger to find out more.

                您可以通过这种方式启动 gdb 来调试 PHPUnit 会话:

                You can launch gdb this way to debug a PHPUnit session:

                gdb --args php /usr/bin/phpunit quiz_service_Test.php
                

                然后输入 r 以运行程序和/或首先设置环境变量.

                Then type in r to run the program and/or set environment variables first.

                set env MALLOC_CHECK_=3
                r
                

                您也可以考虑在系统上安装 PHP 的调试符号以获得更好的调试结果.gdb 会在启动时为您检查这一点,并通知您如何执行此操作.

                You might also consider to install the debugging symbols for PHP on the system to get better results for debugging. gdb checks this on startup for you and leaves a notice how you can do so.

                这篇关于PHPUnit 分段错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Converting string to MySQL timestamp format in php(在php中将字符串转换为MySQL时间戳格式)
                datetime to timestamp(日期时间到时间戳)
                PHP timestamp date to user timezone(PHP时间戳日期到用户时区)
                Converting TIMESTAMP to unix time in PHP?(在 PHP 中将 TIMESTAMP 转换为 unix 时间?)
                Convert ISO 8601 to unixtimestamp(将 ISO 8601 转换为 unixtimestamp)
                Finding days between 2 unix timestamps in php(在php中查找2个unix时间戳之间的天数)

                  <tbody id='z31WL'></tbody>
                  <i id='z31WL'><tr id='z31WL'><dt id='z31WL'><q id='z31WL'><span id='z31WL'><b id='z31WL'><form id='z31WL'><ins id='z31WL'></ins><ul id='z31WL'></ul><sub id='z31WL'></sub></form><legend id='z31WL'></legend><bdo id='z31WL'><pre id='z31WL'><center id='z31WL'></center></pre></bdo></b><th id='z31WL'></th></span></q></dt></tr></i><div id='z31WL'><tfoot id='z31WL'></tfoot><dl id='z31WL'><fieldset id='z31WL'></fieldset></dl></div>
                  • <small id='z31WL'></small><noframes id='z31WL'>

                      <tfoot id='z31WL'></tfoot>
                        <legend id='z31WL'><style id='z31WL'><dir id='z31WL'><q id='z31WL'></q></dir></style></legend>

                        • <bdo id='z31WL'></bdo><ul id='z31WL'></ul>