I suspect this may be a Drush or a more general trying to use SQLite from command-line PHP (when it was created by Apache's PHP).

However, SQLite is the new thing in the setup i do not yet understand, so please forgive me for posting here.

The command, and the voluminous error that followed.

ben@ubuntu:~/workspace/drupal$ drush dl pathauto token; drush en -y pathauto
PHP Fatal error:  Maximum function nesting level of '100' reached, aborting! in /home/ben/workspace/drupal/includes/database/sqlite/database.inc on line 233
PHP Stack trace:
PHP   1. {main}() /home/ben/workspace/drush/drush.php:0
PHP   2. drush_main() /home/ben/workspace/drush/drush.php:42
PHP   3. drush_bootstrap_to_phase() /home/ben/workspace/drush/drush.php:91
PHP   4. drush_bootstrap_max() /home/ben/workspace/drush/includes/environment.inc:294
PHP   5. drush_bootstrap() /home/ben/workspace/drush/includes/environment.inc:344
PHP   6. _drush_bootstrap_drupal_full() /home/ben/workspace/drush/includes/environment.inc:195
PHP   7. drupal_bootstrap() /home/ben/workspace/drush/includes/environment.inc:953
PHP   8. _drupal_bootstrap_variables() /home/ben/workspace/drupal/includes/bootstrap.inc:2038
PHP   9. variable_initialize() /home/ben/workspace/drupal/includes/bootstrap.inc:2260
PHP  10. variable_initialize() /home/ben/workspace/drupal/includes/bootstrap.inc:745
... 11-89 identical
PHP  90. variable_initialize() /home/ben/workspace/drupal/includes/bootstrap.inc:745
PHP  91. cache_get() /home/ben/workspace/drupal/includes/bootstrap.inc:735
PHP  92. DrupalDatabaseCache->get() /home/ben/workspace/drupal/includes/cache.inc:50
PHP  93. DrupalDatabaseCache->getMultiple() /home/ben/workspace/drupal/includes/cache.inc:320
PHP  94. SelectQuery->execute() /home/ben/workspace/drupal/includes/cache.inc:331
PHP  95. DatabaseConnection->query() /home/ben/workspace/drupal/includes/database/select.inc:1226
PHP  96. DatabaseStatement_sqlite->execute() /home/ben/workspace/drupal/includes/database/database.inc:595
PHP  97. DatabaseStatementPrefetch->execute() /home/ben/workspace/drupal/includes/database/sqlite/database.inc:454
PHP  98. DatabaseStatement_sqlite->getStatement() /home/ben/workspace/drupal/includes/database/prefetch.inc:164
PHP  99. DatabaseConnection_sqlite->PDOPrepare() /home/ben/workspace/drupal/includes/database/sqlite/database.inc:449
Drush command terminated abnormally due to an unrecoverable error.   [error]
Error: Maximum function nesting level of '100' reached, aborting! in
/home/ben/workspace/drupal/includes/database/sqlite/database.inc,
line 233
<h1>Uncaught exception thrown in shutdown function.</h1><p>PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database: DELETE FROM {semaphore} 
WHERE  (value = :db_condition_placeholder_0) ; Array
(
    [:db_condition_placeholder_0] =&amp;gt; 7464767884d42c47a26c5f7.35948846
)
 in lock_release_all() (line 247 of /home/ben/workspace/drupal/includes/lock.inc).</p><hr />PHP Fatal error:  Maximum function nesting level of '100' reached, aborting! in /home/ben/workspace/drupal/includes/database/sqlite/database.inc on line 233
PHP Stack trace:
PHP   1. {main}() /home/ben/workspace/drush/drush.php:0
PHP   2. drush_main() /home/ben/workspace/drush/drush.php:42
PHP   3. drush_bootstrap_to_phase() /home/ben/workspace/drush/drush.php:91
PHP   4. drush_bootstrap() /home/ben/workspace/drush/includes/environment.inc:311
PHP   5. _drush_bootstrap_drupal_full() /home/ben/workspace/drush/includes/environment.inc:195
PHP   6. drupal_bootstrap() /home/ben/workspace/drush/includes/environment.inc:953
PHP   7. _drupal_bootstrap_variables() /home/ben/workspace/drupal/includes/bootstrap.inc:2038
PHP   8. variable_initialize() /home/ben/workspace/drupal/includes/bootstrap.inc:2260
PHP   9. variable_initialize() /home/ben/workspace/drupal/includes/bootstrap.inc:745
... 10-89 identical
PHP  90. variable_initialize() /home/ben/workspace/drupal/includes/bootstrap.inc:745
PHP  91. cache_get() /home/ben/workspace/drupal/includes/bootstrap.inc:735
PHP  92. DrupalDatabaseCache->get() /home/ben/workspace/drupal/includes/cache.inc:50
PHP  93. DrupalDatabaseCache->getMultiple() /home/ben/workspace/drupal/includes/cache.inc:320
PHP  94. SelectQuery->execute() /home/ben/workspace/drupal/includes/cache.inc:331
PHP  95. DatabaseConnection->query() /home/ben/workspace/drupal/includes/database/select.inc:1226
PHP  96. DatabaseStatement_sqlite->execute() /home/ben/workspace/drupal/includes/database/database.inc:595
PHP  97. DatabaseStatementPrefetch->execute() /home/ben/workspace/drupal/includes/database/sqlite/database.inc:454
PHP  98. DatabaseStatement_sqlite->getStatement() /home/ben/workspace/drupal/includes/database/prefetch.inc:164
PHP  99. DatabaseConnection_sqlite->PDOPrepare() /home/ben/workspace/drupal/includes/database/sqlite/database.inc:449
Drush command terminated abnormally due to an unrecoverable error.   [error]
Error: Maximum function nesting level of '100' reached, aborting! in
/home/ben/workspace/drupal/includes/database/sqlite/database.inc,
line 233
<h1>Uncaught exception thrown in shutdown function.</h1><p>PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database: DELETE FROM {semaphore} 
WHERE  (value = :db_condition_placeholder_0) ; Array
(
    [:db_condition_placeholder_0] =&amp;gt; 21188412224d42c4cc48d006.74998293
)
 in lock_release_all() (line 247 of /home/ben/workspace/drupal/includes/lock.inc).</p><hr />

Comments

mlncn’s picture

Category: bug » support

OK, it's definitely my problem, simply permissions, not SQLite's, Drupal's, or Drush.

Garrett Albright reports it in #22 in this issue and solves it in #30, but i'm not sure what ownership/permissions are recommended to apply to the SQLite directory to work for both command line and Drupal UI.

Crell’s picture

Yuck.

Normally, I'd suggest group-all permissions and then put both apache and your shell user in the same group. Sadly file permissions bite. :-(

Garrett Albright’s picture

mlncn, are you still having this problem and/or do you still care?

Ping me on IRC some time and I'll try to help you out. Otherwise, please close this ticket.

mlncn’s picture

I haven't been using SQLite. I expect it's going to be a recurring problem for people, but i guess one that can only be documented around.

dpovshed’s picture

Status: Active » Closed (works as designed)

I believe this one can be closed because reporter solved this by himself in #1

If one is using Drush one should take care about matching own permissions with webserver permission.