0

I have a problem with hosting and the hosting company does not want to help me with this. I want to show PHP errors for developing but when there is an error on the page I only see a blank page. I can't use .htaccess because the server API is CGI/FastCGI and php.ini does not work. I tried this in php.ini but it doesn't work, still a blank page, and I made an error in PHP on purpose.

display_errors = On
display_startup_errors = On

On the page I also have:

error_reporting(E_ALL);

EDIT: Solved by mario, I renamed php.ini to .user.ini and it worked.

CJ Dennis
  • 3,676
  • 2
  • 32
  • 53
Vladimir Szabo
  • 408
  • 3
  • 15
  • Can you create two other files. One just prints Hello World, so that you know that PHP is working properly; another one with a known syntax error, and see the output? – Schien Feb 18 '14 at 02:45
  • 3
    On recent FastCGI setups you can use `.user.ini`, as explained in the manual. – mario Feb 18 '14 at 02:46
  • 1
    @mario manual link for the lazy - http://php.net/manual/configuration.file.per-user.php – Phil Feb 18 '14 at 02:47

1 Answers1

2

Try

ini_set('display_errors', '1');

in your PHP file. Source: http://www.dzone.com/snippets/let-php-show-all-errors

rvighne
  • 17,348
  • 7
  • 45
  • 64