Enable report of errors of any kind - PHP

-1

I tried to place the following pieces in my PHP code:

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

There is definitely no solution. What I simply want to show is, literally, any type of error either its level / degree of importance as news, notice, error, etc.

How can I do this? I've tried everything and I've reviewed a lot of similar questions in the Stackoverflow community, but none of them worked for me.

I am using PHP 7.0 on a Nginx web server.

I have SSH access and total SFTP.

Thanks for your answers,

// Jose Antonio

    
asked by Jose Antonio 22.08.2017 в 23:00
source

2 answers

0

error_reporting (E_ALL); is with semicolons, maybe that's missing because with that line of code you see all the errors, it is not necessary to put the 2 lines of code, only with a coarse you can also use error_reporting (-1); that works quite similarly or you can also use ini_set ('error_reporting', E_ALL); .

I recommend you visit and read the php manual for more information about errors in php .

You can also try this:

try {    // Code that should have errors ... } catch (ArithmeticError | Exception $ e) {    // compile }

    
answered by 22.08.2017 в 23:08
0

For PHP versions

answered by 23.08.2017 в 00:08