• <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 分段错误

      时间:2024-04-13

          <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 分段错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:apache error.log 中的“[notice] child pid XXXX exit signal Segm 下一篇:如何阻止 PHP 中的无限递归函数吃掉所有可用内存并最终导致笔记本电脑崩溃?

                相关文章

                  <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>
                1. <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>