0
votes

I got following Error when i run cron manually for my Drupal 7.

Fatal error: Call to undefined function db_fetch_object() in /home/sitename/public_html/example.com/modules/php/php.module(80) : eval()'d code on line 57

The error seems that "db_fetch_object()" function is undefined. I searched around it and found that the this function is no longer used for Drupal 7. I verified each module and they are pointed to Drupal 7 version.

I installed the "Search Debug" module and found that this error only occurs when i run cron only for "Search" module. The search module pick each module for indexing but was very hard to find which module has an error. I don't know how to debug this problem.

Anyone help me?

One more thing i got "Unexpected termination of cron channel default, aborted. Last job executed: search_cron" error under the "Recent Log Messages".

1

1 Answers

0
votes

First thing try not to use db_fetch_object in Drupal 7 as it is used in drupal 6, Try to use db wrapper functions in drupal 7 which are using db_query with findAll, FindAll,fetchAllAssoc().

If you are running cron from an individual file make sure you have load full drupal bootstrap.