running current CVS version and loving it so far, but...
i am getting the same error with every cron run:

Fatal error: Call to undefined function: db_lock_table() in /blah-blah/includes/bootstrap.inc on line 235

function in question:

function variable_set($name, $value) {
  global $conf;

  db_lock_table('variable');
  db_query("DELETE FROM {variable} WHERE name = '%s'", $name);
  db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", $name, serialize($value));
  db_unlock_tables();

  cache_clear_all('variables');

  $conf[$name] = $value;
}

can anyone help?

Comments

dries’s picture

I looks like your installation is not complete. The db_lock_table() functions should be available in your database-specific include files:

$ grep -r db_lock *
includes/bootstrap.inc:  db_lock_table('variable');
includes/bootstrap.inc:  db_lock_table('cache');
includes/database.mysql.inc:function db_lock_table($table) {
includes/database.mysqli.inc:function db_lock_table($table) {
includes/database.pgsql.inc:function db_lock_table($table) {

Sure you uploaded all files to your web server?

thinkinkless’s picture

thanks for the reply, dries.
i just checked and the inc files are all there. i downloaded a fresh copy of the CVS to compare dates and the files i have are the most recent.
i am running cron against the cron.php file
any other ideas?
fyi this is a new problem i have seen only running the CVS (clean install). i did not see this when i played with 4.6.

i do see some changes in that file vs 4.6 and i suspect it may be a bug?

4.6 version of cron.php lists bootstrap like this (line 9):

include_once 'includes/bootstrap.inc';
include_once 'includes/common.inc' ;

CVS has:

include_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

it is also missing the ?> at the end of the doc.

could this be the problem?

thinkinkless’s picture

my last comment was in fact the source of the problem. i'll submit an issue but am curious why nobody else has experienced this?

CVS of cron.php
changed incorrect path (line 9):
include_once './includes/bootstrap.inc';
to:
include_once 'includes/bootstrap.inc';

added missing ?> toi end of doc and the error stopped.