It is possible as long as the environment (server) allows access to such settings.
There is not much to say about what works or not because who can answer is the support of the hosting service.
You can usually enable or disable using php_flag
php_flag display_errors on
Do this in htaccess and see what happens. Normally when it is not allowed it returns an "internal error", "error 500" and things like.
Alternatively, make sure your hosting provider supports custom php.ini. Most modern hosts offer by default. However, it's pretty restrictive, especially if it's a shared host.
One suggestion is to configure the error log instead of display_error
as ON
.
The default production environment is always OFF
because it helps protect the general site from exposing sensitive information when there is an error.