hey
was wondering, were the cache php files stripped of DBTNG database layer present in Drupal 7?

if so, check DBTNG module.
it's a backport of the new DBTNG in D7. it says it prefixes every function/class with dbtng_ instead of db_.

if it works, you could create a dependency for this module, perhaps with gains in performance too.


This module does not override the existing database functionality but makes the new compatibility layer available under a series of functions identical to their Drupal 7 counterparts named dbtng_ instead of db_. For example with this module, use dbtng_set_active instead of db_set_active, with the exception of the following functions that funciton identically to their Drupal 7 conterparts: db_insert, db_merge, db_update, db_delete, db_truncate, db_select, db_transaction, db_close, db_condition, db_xor, db_and, db_or, db_next_id, and db_like.

Comments

lpalgarvio’s picture

Issue tags: +backport, +bug, +DBTNG

database.inc supplied (backport) does not seem to work well when autoload and dbtng are present and installed in the system.

also, after uninstalling autoload and dbtng, and clearing caches (tables and all), it still does not work.

Drupal 6.20
Cache Backport 1.0-alpha3
database.inc supplied

    // Use our backport, therefore switches to our own database backend
    // per default for all bins.
    $conf['cache_inc'] = './sites/all/modules/performance/cache_backport/cache.inc';

    // Cache Backport :: DBTNG - DrupalDatabaseCache
    $conf['cache_backends'][] = './sites/all/modules/performance/cache_backport/database.inc';

    $conf['cache_default_class'] = 'DrupalDatabaseCache';
    $conf['cache_class_cache'] = 'DrupalDatabaseCache';
    $conf['cache_class_block'] = 'DrupalDatabaseCache';
    $conf['cache_class_bootstrap'] = 'DrupalDatabaseCache';
    $conf['cache_class_content'] = 'DrupalDatabaseCache';
    $conf['cache_class_filter'] = 'DrupalDatabaseCache';
    $conf['cache_class_form'] = 'DrupalDatabaseCache';
    $conf['cache_class_menu'] = 'DrupalDatabaseCache';
    $conf['cache_class_page'] = 'DrupalDatabaseCache';
    $conf['cache_class_update'] = 'DrupalDatabaseCache';
    $conf['cache_class_views'] = 'DrupalDatabaseCache';
    $conf['cache_class_views_data'] = 'DrupalDatabaseCache';
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /modules/apis/i18n/i18n.module on line 720

Warning: Cannot modify header information - headers already sent by (output started at /modules/apis/i18n/i18n.module:720) in /drupal-6.20/includes/bootstrap.inc on line 726

Warning: Cannot modify header information - headers already sent by (output started at /modules/apis/i18n/i18n.module:720) in /drupal-6.20/includes/bootstrap.inc on line 727

Warning: Cannot modify header information - headers already sent by (output started at /modules/apis/i18n/i18n.module:720) in /drupal-6.20/includes/bootstrap.inc on line 728

Warning: Cannot modify header information - headers already sent by (output started at /modules/apis/i18n/i18n.module:720) in /drupal-6.20/includes/bootstrap.inc on line 729

Fatal error: Cannot use string offset as an array in /drupal-6.20/includes/theme.inc on line 627

first it renders bad the template - uses the default template, garland, and outputs errors on the header

then when you refresh, it returns a WSoD always with errors, until you clear the caches, upon which returns to the template error, and the cycle continues.

pounard’s picture

Hello,

To answer your first question: The DBTNG module seems good, but it forces Drupal to maintain two *SQL connections. The cache backport primary goal is to aim the best performances through configuration while the DBTNG module would add extra and useless latency to the whole site.

If my goal is performances, I don't see the point of forcing this dependency for only a few queries.

pounard’s picture

Status: Active » Postponed (maintainer needs more info)

Are you sure the problem is due to autoload and DBTNG presence? Sometime, when you change cache backend include you may experience the cache layer trying to fetch cached data using the original Drupal cache.inc, that may be different (serialized or not, etc..).

This can cause this kind of errors. When playing with cache backend you have to manually empty the cache_* tables that changes of backend each time, because cached data can be in a wrong state.

Can you retry to reproduce the bug by manually empty your cache_* tables when you experience the bug?

lpalgarvio’s picture

i though it first was a autoload / dbtng issue because it complained with a lot of errors mentioning the two modules.
then i removed those, but it still complained, with those new errors.

i tested always with flushing caches (empty cache tables and remove .css/.js/other cached files)
giving another try with alpha4

pounard’s picture

You have to empty tables manually when changing the cache backend, because some piece of data can be serialized by a backend and not by another, and when this happens, you can't even go to performance page because it will crash at bootstrap time.

pounard’s picture

Status: Postponed (maintainer needs more info) » Fixed

Still no answer here neither, guessing it's ok. Re-open it in case of any problem.

lpalgarvio’s picture

Status: Fixed » Postponed (maintainer needs more info)

i did empty all caches

pounard’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I made new releases since this bug last update, fixing odd bugs and weird behavior. Since I cannot reproduce this one, I make it as won't fix (it really pollutes my issue log). Please feel free to re-open if you experience it with the newest release, and using a working procedure for reproducing it.