0

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

2
  • 1
    On your page you can do it like :- error_reporting(E_ALL);ini_set('display_errors',1); Commented Aug 19, 2017 at 4:57
  • should I add this code on each and every php page Commented Aug 19, 2017 at 4:58

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

Comments

1

Add this line to your php file. To debug

ini_set('display_errors', 1);

error_reporting(E_ALL);

2 Comments

i havent a php.ini file. should i create a phi.ini file and just add this 2 lines of code
You need to add this line to your php file. Not in ini file

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.