Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Errors displayed on production
  • I'm testing some code in a production environment. I have FUEL_ENV set to production. When I get an error it shows the correct error page without a backtrace, but it also shows an error at the top of the page with the file and line number. Changing to the development environment removes the error and shows it in the "Prior Contents" section of the error page. e.g.
    Fatal error: Class 'Foo' not found in /var/www/localhost/fuel/app/classes/controller/test.php on line 5 I found this line in index.php: ini_set('display_errors', 1); Changing this to 0 removes the error. Is there a reason display_errors isn't set from a config file? The comment at the top of index.php says this should be changed, but it's very easy to miss. Or is there something else I have not configured correctly? Thanks
  • It's a bit of a chicken and egg situation: you want error reporting and display on as early as possible to catch everything. Which means relying on a config file is way to late in the bootstrap process. Having said that it's probably logical to have the option in an environment config file so you can override the default in your index.php file. Can you create an issue for this on http://github.com/fuel/core/issues so it can be looked at?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion