0

I've got an PHP file with an error in it, but I don't know where it is and there is no error reporting, but I enabled error reporting in php.ini and in the script.

Why can't I see the error?

halfer
  • 18,701
  • 13
  • 79
  • 158
Ura Fag
  • 9
  • 1

2 Answers2

3

Make the first four lines of your page look like this:

<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

This will override your error echoing settings elsewhere so you can track down your problem. And of course, don't forget to do a phpinfo(); if you suspect there's a missing or misconfigured dependency.

roberthernandez
  • 509
  • 3
  • 10
0

Try enabling errors in PHP:

<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

If you still don't see anything and you are using Linux and Apache try looking into /var/log/apache2/error.log you can see the live log tail -f /var/log/apache2/error.log

MaX
  • 1,314
  • 13
  • 25