Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><em>On production server:</em> Always disable php warnings.</p> <p><em>On development machine:</em> Disable all warnings for that page for the purpose of testing and re-enable after testing is complete and functionality confirmed as working.</p> <p><em>Hint</em>: I prefer to have a variable globally set and depending on that enable or disable all php and database warning notifications. You could set that in <code>.htaccess</code> for example if you use apache. I have this in <code>.htaccess</code>:</p> <ul> <li>production: <code>SetEnv DEVELOPMENT Off</code></li> <li>development: <code>SetEnv DEVELOPMENT On</code></li> </ul> <p>And in the php code:</p> <pre><code>if( strtolower(getenv('DEVELOPMENT')) == "on" ) { ini_set("display_errors",2); ini_set('error_reporting', E_ALL | E_STRICT); } </code></pre> <p>To disable all errors from .htaccess use</p> <pre><code>php_flag display_startup_errors off php_flag display_errors off php_flag html_errors off php_value docref_root 0 php_value docref_ext 0 </code></pre> <p>If you want to get really tricky you could add a check like:</p> <pre><code>if(error_get_last() !== null) </code></pre> <p>and set a http header and check that from javascript both for json output and when loading your page and take a look at the error log or display the error on screen if you prefer that, still I strongly recommend that you disable the error showing code in the production environment.</p> <p>For more in-depth talk about this take a look at <a href="http://perishablepress.com/advanced-php-error-handling-via-htaccess/">this article</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload