hhvm-fastcgi没有显示警告 [英] hhvm-fastcgi is not showing warnings

查看:111
本文介绍了hhvm-fastcgi没有显示警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Nginx上使用HHVM 3.1.0(rel),并且fastcgi没有显示警告,但是显示在控制台上运行hhvm. 正常吗?

I'm using HHVM 3.1.0 (rel) with Nginx, and fastcgi is not showing warnings, but running hhvm on console it shows. Is it normal?

我的php.ini:

error_reporting = E_ALL
display_errors = 1

hhvm.error_handling.call_user_handler_on_fatals = false
hhvm.error_handling.max_loop_count = 0
hhvm.error_handling.no_infinite_recursion_detection = false
hhvm.error_handling.throw_bad_type_exceptions = true
hhvm.error_handling.throw_too_many_arguments = true
hhvm.error_handling.warn_too_many_arguments = true
hhvm.error_handling.throw_missing_arguments = true
hhvm.error_handling.throw_invalid_arguments = true
hhvm.error_handling.enable_hip_hop_errors = true
hhvm.error_handling.notice_frequency = 1
hhvm.error_handling.warning_frequency = 1

hhvm.debug.full_backtrace = true
hhvm.debug.server_stack_trace = true
hhvm.debug.server_error_message = true
hhvm.debug.translate_source = true

推荐答案

我遇到了同样的问题,

Well I had the same issue, stack question

经过大量挖掘,我发现了问题所在.没有为HHVM设置error_handler.因此,您需要设置自己的内容.

After a lot of digging I found the problem. There is no error_handler set for HHVM. So you need to set your own.

我写了一个简单的,看起来像PHP的,虽然不完整,例如错误级别

I wrote a simple one that looks like the one of PHP, not complete though ie the error levels

set_error_handler(function ($errorNumber, $message, $errfile, $errline) {
    switch ($errorNumber) {
        case E_ERROR :
            $errorLevel = 'Error';
            break;

        case E_WARNING :
            $errorLevel = 'Warning';
            break;

        case E_NOTICE :
            $errorLevel = 'Notice';
            break;

        default :
            $errorLevel = 'Undefined';
    }

    echo '<br/><b>' . $errorLevel . '</b>: ' . $message . ' in <b>'.$errfile . '</b> on line <b>' . $errline . '</b><br/>';
});

这篇关于hhvm-fastcgi没有显示警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆