Ich habe ein altes Projekt übernommen und ich habe festgestellt, dass die 500 Antworten an den Browser keine Informationen enthalten. Da ich lokal daran arbeite, würde ich gerne sehen, was vor sich geht.PHP Wird keine Stack-Trace oder Fehlerdetails mit einem 500 Server-Fehler senden
Ich habe versucht, meine eigene neue Datei mit dem follwing
<?php
throw new Exception("bleh");
echo "test";
?>
machen, dass 500 zurückkehrt, aber auch hier ist es eine leere Antwort. Das ist meine php.conf. Mit Ausnahme der letzten beiden Zeilen ist es Lager von der yum installieren auf Cent 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"
Die letzten paar Zeilen tailing/var/log/httpd/error_log sind
[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'
Dank Für jede Hilfe habe ich das angeguckt und ich habe das Gefühl, dass ich etwas Offensichtliches vermisse.
Überprüfen Sie die Fehlerprotokolle auf dem Server. –
Ich habe die letzten paar Zeilen von/var/log/httpd/error_log getailt und es dem ursprünglichen Post hinzugefügt, um besser zu formatieren – user49438
nicht wirklich eine Antwort, aber schaut mal [whoops] (https://github.com/filp/ Whoops), es wird das Debuggen so viel einfacher machen! – Pevara