我一直在玩 HHVM 配置文件,但我还不能让它向浏览器输出任何致命错误。它显示 E_NOTICE 和 E_WARNING,但是当任何 E_ERROR 发生时,它会使页面留空,并且错误仅出现在 HHVM 日志文件中。
有没有办法让它在浏览器中显示?
我的 HHVM 配置文件如下:
PidFile = /var/run/hhvm/pid
Log {
Level = Warning
AlwaysLogUnhandledExceptions = true
RuntimeErrorReportingLevel = 8191
UseLogFile = true
UseSyslog = false
File = /var/log/hhvm/error.log
InjectedStackTrace = false
NativeStackTrace = false
Access {
* {
File = /var/log/hhvm/access.log
Format = %h %l %u % t \"%r\" %>s %b
}
}
}
ErrorHandling {
CallUserHandlerOnFatals = true
NoInfiniteLoopDetection = false
NoInfiniteRecursionDetection = false
ThrowBadTypeExceptions = false
ThrowNotices = false
NoticeFrequency = 1 # 1 out of these many notices to log
WarningFrequency = 1 # 1 out of these many warnings to log
AssertActive = false
AssertWarning = false
}
Debug {
FullBacktrace = false
ServerStackTrace = false
ServerErrorMessage = false
TranslateSource = false
RecordInput = false
ClearInputOnSuccess = true
ProfilerOutputDir = /tmp
CoreDumpReport = true
CoreDumpReportDirectory = /tmp
}
Http {
DefaultTimeout = 30 # in seconds
SlowQueryThreshold = 5000 # in ms, log slow HTTP requests as errors
}
Mail {
SendmailPath = sendmail -t -i
ForceExtraParameters =
}
Preg {
BacktraceLimit = 100000
RecursionLimit = 100000
}
Repo {
Central {
Path = /var/log/hhvm/.hhvm.hhbc
}
}
Eval {
Jit = true
}
MySQL {
TypedResults = false
ReadOnly = false
ConnectTimeout = 2000 # in ms
ReadTimeout = 2000 # in ms
SlowQueryThreshold = 2000 # in ms, log slow queries as errors
KillOnTimeout = false
}
Nginx:
location ~ \.php$ {
fastcgi_keep_conn on;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
fastcgi_read_timeout 900;
fastcgi_send_timeout 900;
fastcgi_intercept_errors off;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}