Problem/Motivation

Since #2252969: HTTP_HOST is not a reliable default prefix, redis cannot be used anymore for the page cache with $conf['page_cache_without_database'] = TRUE:

PHP Fatal error: Class 'Database' not found in [...]/redis/lib/Redis/AbstractBackend.php on line 33

Proposed resolution

Make sure that the Database class is always available by directly including /includes/database/database.inc.

Remaining tasks

User interface changes

API changes

CommentFileSizeAuthor
#1 2354181-fix-global-prefix.patch691 bytesznerol
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

znerol’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
691 bytes
znerol’s picture

Title: HTTP_HOST is not a reliable default prefix » Fatal error with $conf['page_cache_without_database'] = TRUE
Parent issue: #2252969: HTTP_HOST is not a reliable default prefix »
Related issues: +#2252969: HTTP_HOST is not a reliable default prefix
pounard’s picture

Right, nice catch, I will fix that ASAP, thanks for the report.

Exploratus’s picture

Thanks

pounard’s picture

@znerol thank you very much, just switched the include_once to require_once and commited it, next release will have the fix.

pounard’s picture

Status: Needs review » Fixed

  • Pierre.R committed da49a06 on 7.x-2.x
    Issue #2354181 by znerol: Fatal error with 'page_cache_without_database...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.