古いプロジェクトを引き継いだので、ブラウザに送信された500の応答に情報が含まれていないことに気付きました。私はこれをローカルで作業しているので、何が起こっているのかを見たいと思います。PHP 500のサーバーエラーでスタックトレースやエラーの詳細を送信しない
私は500を返していfollwing
<?php
throw new Exception("bleh");
echo "test";
?>
と自分の新しいファイルを作ってみましたが、やはりそれは空の応答です。これは私のphp.confです。最後の2行を除いて、それが株式であるセントOS 7
#
# Cause the PHP interpreter to handle files with a .php extension.
#
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
#
# Allow php to handle Multiviews
#
AddType text/html .php
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
#
# Uncomment the following lines to allow PHP to pretty-print .phps
# files as PHP source code:
#
#<FilesMatch \.phps$>
# SetHandler application/x-httpd-php-source
#</FilesMatch>
#
# Apache specific PHP configuration options
# those can be override in each configured vhost
#
php_value session.save_handler "files"
php_value session.save_path "/var/lib/php/session"
# my adds
php_value error_reporting "ALL"
にインストールはyumからテーリングの/ varの最後の数行/ログ/ httpdの/ error_logにされている
[Sat Jun 25 17:41:03.269154 2016] [auth_digest:notice] [pid 2804] AH01757: generating secret for digest authentication ...
[Sat Jun 25 17:41:03.269537 2016] [lbmethod_heartbeat:notice] [pid 2804] AH02282: No slotmem from mod_heartmonitor
[Sat Jun 25 17:41:03.280894 2016] [mpm_prefork:notice] [pid 2804] AH00163: Apache/2.4.6 (CentOS) PHP/5.4.16 configured -- resuming normal operations
[Sat Jun 25 17:41:03.280915 2016] [core:notice] [pid 2804] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
感謝どんな助けでも、私はこれを見つめていました。私は何かが明らかでないことを感じています。
サーバーのエラーログを確認します。 –
私は/ var/log/httpd/error_logの最後のいくつかの行を尾引きし、より良い書式設定のために最初の投稿に追加しました – user49438
本当に答えはありませんが、見た目は[whoops](https://github.com/filp/)それはデバッグを非常に簡単にします! – Pevara