Error

SQLite: Expression tree is too large (maximum depth 1000)

SQLite may throw the following error:

Expression tree is too large (maximum depth 1000)

SQLite: bind or column index out of range

When using PHP PDO with SQLite, the error messages sometimes are not really self-explaining. Today I had an error stating "bind or column index out of range". The "column index" part made me check the tables index and data type.

PHP Error: Creating default object from empty value

PHP 5 introduces the E_STRICT error reporting constant. The PHP manual states "Enable to have PHP suggest changes to your code which will ensure the best interoperability and forward compatibility of your code.". Thus it's recommendable to enable strict PHP errors.

About strict mode (E_STRICT)

Enabling the strict mode is done via the INI file (php.ini) or via code during runtime:

  ini_set('error_reporting', E_ALL | E_STRICT);

The above code sets error_reporting to E_ALL and E_STRICT, because E_STRICT is not part of the E_ALL constant.