0

With this ini settings:

ini_set("log_errors", 1);
ini_set("display_startup_errors", 1);
ini_set("error_log",APP_LOG);
ini_set("error_reporting", E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
ini_set("log_errors_max_len",1024);
ini_set("docref_root","http://manual/en/");
ini_set("html_errors",1);

I normally get HTML tags on displaing errors my PHP version is 7.0.22

2
  • 1
    Can you give us an example of the type of error message that you are expecting and when you are expecting it? Commented Oct 28, 2017 at 7:48
  • I get all messages in correct way but are displayed in plain text, normally they are formatted with html tags with a table for the stack trace. now satck trace is a single string without new lines very difficult to read. Commented Oct 28, 2017 at 8:01

2 Answers 2

1

Try turning on xdebug in your php.ini file. Then restart your web server.

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

Comments

0

ini_set("html_errors",true); will be correct settings and after setting your setting, restart your php server.

if you want to use error_handling in php-7 , it will handle this way:

try{
     // Your code
} 
catch(Error $e) {
    $trace = $e->getTrace();
    echo $e->getMessage().' in '.$e->getFile().' on line '.$e->getLine().' called from '.$trace[0]['file'].' on line '.$trace[0]['line'];
}

2 Comments

true | 1 as shown above is the same. it doesn't work!
you dont have this also: ini_set("display_errors", 1) ; error_reporting(E_ALL);

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.