0

非常にまれに、神秘的な死の白い画面のPHPエラーが発生します。次の設定を使用しても、何も表示またはログに記録されません。

ini_set( "error_reporting"、E_ALL);
ini_set( "display_errors"、true);
ini_set( "log_errors"、true);
ini_set( "display_startup_errors"、true);
ini_set( "html_errors"、false);
ini_set( "error_log"、 "/ var / log / php_error_log");

出力バッファリングまたはメモリ制限エラーによってエラー出力が発生しない可能性があることをどこかで読みましたが、以前は(たとえば)__ autoload()が欠落しているクラスファイルを探しているだけでWSODが発生していることがわかりました。

これらのエラーを表示する方法を見つけた人はいますか?コードのブロックをコメントアウトするのは嫌いです。

ありがとう

4

1 に答える 1

3

I had a similar problem recently and it turned out that the software package I was using was overriding the logging settings so that I was never seeing the logs in certain situations. Because your putting the settings in the ini file, i'm guessing your using php.ini, there is a lot of opportunity that something closer to where the code is run is changing the settings.

My advice would be to put error_reporting(E_ALL | E_STRICT); in the file that is causing the problem and see if that improves things.

于 2010-10-12T04:45:07.527 に答える