Call to undefined function module_implements

Pawel Gawlowski - December 29, 2007 - 17:56
Project:APC - Alternative PHP Cache
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:won't fix
Description

I have problem while using APC Cache.
I get error:
Fatal error: Call to undefined function module_implements() in C:\wos\www\includes\bootstrap.inc on line 735

While bootstrapping DRUPAL_BOOTSTRAP_LATE_PAGE_CACHE Drupal calls variable_init(...).
It looks for variables in cache using cache_get(...). It fails and it tries to log it using watchdog(...) function.
Unfortunatelly watchdog(...) uses module_implements(..) so it can be called only if module.inc has been previously included.

There are 3 possible solutions for this issue:
1. Add if(function_exists(...) in watchdog function in bootstrap.inc

2. Switch theese lines in bootstrap.inc:
// Initialize configuration variables, using values from settings.php if available.
$conf = variable_init(isset($conf) ? $conf : array());
// Load module handling.
require_once './includes/module.inc';

3. Modify logging mechanizm in apc_handle_get(...) in apc.inc

It seems to work if I remove watchdog(...) from apc_gandle_get(...)

#1

Dimm - October 8, 2008 - 16:31

+1

#2

a.horoshavin - November 10, 2008 - 13:27

subscribe

#3

slantview - November 11, 2008 - 00:34
Status:active» won't fix

This module is basically deprecated. I don't plan on continuing development. Please have a look at http://drupal.org/project/cacherouter for APC cache options.

#4

harking - September 24, 2009 - 15:59

Same issue exists in cacherouter. ;)

Looks like the fix would be a function_exists() check around the module_implements call.

 
 

Drupal is a registered trademark of Dries Buytaert.