我正在努力解決此錯誤,但無法找到原因,因爲我是新的drupal Error at offset 2 of 16 bytes in bootstrap.inc on line 936
當我打開/ var/www/html/mysite /包括/ bootstrap.inc文件中我發現這個在bootstrap.inc中的偏移量爲2的16字節錯誤936行
function function variable_initialize($conf = array()) {
// NOTE: caching the variables improves performance by 20% when serving
// cached pages.
if ($cached = cache_get('variables', 'cache_bootstrap')) {
$variables = $cached->data;
}
else {
// Cache miss. Avoid a stampede.
$name = 'variable_init';
if (!lock_acquire($name, 1)) {
// Another request is building the variable cache.
// Wait, then re-run this function.
lock_wait($name);
return variable_initialize($conf);
}
else {
// Proceed with variable rebuild.
$variables = array_map('unserialize', db_query('SELECT name, value FROM {variable}')->fetchAllKeyed());
cache_set('variables', $variables, 'cache_bootstrap');
lock_release($name);
}
}
foreach ($conf as $name => $value) {
$variables[$name] = $value;
}
return $variables;
}
錯誤顯示在此行$variables = array_map('unserialize', db_query('SELECT name, value FROM {variable}')->fetchAllKeyed());
我無法來解決這個問題,是什麼原因?
嗨@Kanika,我的答案有錯別字,但我修好了!請留下評論,告訴我它是否有幫助,或者如果您發現任何錯誤。謝謝 – EricLavault
@ericLavault我一直在努力,一旦你的解決方案工作讓你知道 – Kanika