Fix highlighter consistency

- in some places php would not be highlighted as the `<?php` tag was missing
- in one place there was a duplicate `<?php` tage
- replaced `bash` with `console` for better highlighting
- ensured all console snippets are wrapped within highlighting code
- wrapped ini examples in highlighting code
This commit is contained in:
jrfnl
2014-12-07 22:31:05 +01:00
parent 0fcb7c0a91
commit 7d19feaf98
12 changed files with 53 additions and 31 deletions

View File

@@ -7,17 +7,19 @@ anchor: error_reporting
Error logging can be useful in finding the problem spots in your application, but it can also expose information about
the structure of your application to the outside world. To effectively protect your application from issues that could
be caused by the output of these messages, you need to configure your server differently in development versus
be caused by the output of these messages, you need to configure your server differently in development versus
production (live).
### Development
To show every possible error during <strong>development</strong>, configure the following settings in your `php.ini`:
display_errors = On
display_startup_errors = On
error_reporting = -1
log_errors = On
{% highlight ini %}
display_errors = On
display_startup_errors = On
error_reporting = -1
log_errors = On
{% endhighlight %}
> Passing in the value `-1` will show every possible error, even when new levels and constants are added in future PHP versions. The `E_ALL` constant also behaves this way as of PHP 5.4. - [php.net](http://php.net/function.error-reporting)
@@ -36,10 +38,12 @@ use either `-1` or `E_ALL | E_STRICT`.
To hide errors on your <strong>production</strong> environment, configure your `php.ini` as:
display_errors = Off
display_startup_errors = Off
error_reporting = E_ALL
log_errors = On
{% highlight ini %}
display_errors = Off
display_startup_errors = Off
error_reporting = E_ALL
log_errors = On
{% endhighlight %}
With these settings in production, errors will still be logged to the error logs for the web server, but will not be
shown to the user. For more information on these settings, see the PHP manual: