How do I get PHP Errors to display?

Mihai B.

Well-known member
Registered
Joined
Apr 19, 2016
Messages
243
Points
18
I have a PHP site and a page is getting error with blank page, how do I get PHP errors to display? can i do it through PHP.ini or directly enable errors on that file?
 

24x7CSM

Well-known member
Registered
Joined
Sep 27, 2016
Messages
263
Points
28
Display errors could be turned off in the php.ini or your Apache config file. You can turn it by either adding or editing below parameter

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

You should see the same messages in the PHP error log
 

Luxin Host

Well-known member
Registered
Joined
Jun 26, 2016
Messages
543
Points
43
Yes you can do it through PHP.ini. First of all check if your display error is on:

Code:
display_errors = on
Then you can use the following to get the errors to display:

Code:
Ini_set ('display_errors', 1);
But even if your display errors is on the errors during your start up sequence will not display. In order to get the start up errors you can use the following:

Code:
Ini_set ('display_startup_errors', 1);
Then use :

Code:
error_reporting (E_ALL);
To make sure all the errors will get reported to you.
 
Latest Threads
Replies
0
Views
31
Replies
1
Views
38
Replies
0
Views
230
Replies
1
Views
49
Recommended Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top