Reputation: 115
I am debugging some errors in my PHP
bus booking site. My issue is that I am not able to display errors. When I googled this issue it shows you can achieve it though php.ini
. But unfortunately I haven't find any php.ini
file .
Now the error is showing as
This page isn’t working
cableandmedia.com is currently unable to handle this request. HTTP ERROR 500
Upvotes: 0
Views: 41
Reputation: 72289
On your all-pages/or-a-common-file which-is-included-in-each-file.
On top just after starting <?php
add these two lines:-
error_reporting(E_ALL);
ini_set('display_errors',1);
If you have php.ini
file then check these two variables:-
display_errors
error_reporting
Now change these variables values to:-
display_errors=ON
error_reporting=E_ALL
Now save the file and restart your server(important if you are working on localhost).And you have good to go.
Upvotes: 2
Reputation: 16436
Add this line to your php file. To debug
ini_set('display_errors', 1);
error_reporting(E_ALL);
Upvotes: 1