Wordpress HHVM在致命错误时输出状态代码200,因此我无法在上游使用fastcgi_next_
当HHVM出现故障时,我想退回到nginx上的下一个上游php5 fpm。这目前不可能,因为HHVM在致命错误后输出200 OK响应代码。至少我想提供更多信息的状态代码 PHP错误日志:Wordpress HHVM在致命错误时输出状态代码200,因此我无法在上游使用fastcgi_next_,wordpress,nginx,fastcgi,fatal-error,hhvm,Wordpress,Nginx,Fastcgi,Fatal Error,Hhvm,当HHVM出现故障时,我想退回到nginx上的下一个上游php5 fpm。这目前不可能,因为HHVM在致命错误后输出200 OK响应代码。至少我想提供更多信息的状态代码 PHP错误日志: \nFatal error: $this is null in /data/wordpress/htdocs/wp-content/plugins/woocommerce-gateway-klarna/classes/class-klarna-account.php on line 1231 我确信它在php
\nFatal error: $this is null in /data/wordpress/htdocs/wp-content/plugins/woocommerce-gateway-klarna/classes/class-klarna-account.php on line 1231
我确信它在php5 fpm中工作
HHVM版本:
hhvm --version
HipHop VM 3.4.0 (rel)
Compiler: tags/HHVM-3.4.0-0-g817b3a07fc4e509ce15635dbc87778e5b3496663
Repo schema: 0e12aaa31fae66b5591f65603de50c9d62caafac
Extension API: 20140829
我通过为hhvm注入自定义错误处理程序解决了这个问题 wordpress的My index.php:
<?php
/**
* HHVM outputs http status: 200 OK even on fatal errors.
* Catch fatal errors on HHVM and put right response code.
*/
//Is this HHVM?
if (defined('HHVM_VERSION')) {
set_error_handler('catch_fatal_error_hhvm',E_ERROR);
}
function catch_fatal_error_hhvm() {
http_response_code(500);
die();
}
// WordPress view bootstrapper
define('WP_USE_THEMES', true);
require(dirname( __FILE__ ) . '/wordpress/wp-blog-header.php');
我建议在此问题上打开一个问题。