I have a problem when I want to publish my local development to production environment,
this problem is about error message handling. When I access my site using development environment errors can be shown, but errors should not show in production enviroment .
I have tried to configure this in /fuel/app/config/config.php by changing errors=>false and referenced to this document http://fuelphp.com/docs/general/configuration.html, but it still does not change when I’m testing by producing an error on my query of database.
also I’m tried to change error_reporting to 0 and display_errors to 0 in index.php, still not fix my problem…
error_reporting(0);//error_reporting(-1);
ini_set('display_errors', 0);//ini_set('display_errors', 1);
How I can disabled error messages on production environment in FuelPHP?
I think the issue here is that the OP uses the work “environment” while he means “server”.
FuelPHP supports multiple environments, “development” being the default. And in development mode, all error messages are enabled. If you deploy your code to another server, but don’t set the FuelPHP environment, your app will run in development mode on that server too.
So the solution here is to run FuelPHP is production mode on the production server. You do that by setting the environment variable FUEL_ENV. Easiest is in your virtualhost definition:
see http://fuelphp.com/docs/general/environments.html