LoginSignup
1
0

More than 3 years have passed since last update.

ログが見れないマネージドサーバでphpのエラーを可視化する

Last updated at Posted at 2019-06-08

マネージドサーバは便利だが、ログが見えないサービスもある。
エラーがあるときはしんどい。
そんな場合は、phpのソースに次の2行を加える。
ブラウザに警告やエラーが表示される。

ini_set( 'display_errors', 1 );
ini_set( 'error_reporting', E_ALL );

こんな風に使う。

<?php
ini_set( 'display_errors', 1 );
ini_set( 'error_reporting', E_ALL );

警告やエラーが可視化された。
スクリーンショット 2019-06-08 11.11.20.png

これでどこを調査すれば良いか範囲を絞れる。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0