Drupal Cron not working manually - drupal-7

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".

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.

Related

After Installing the module H5P I got the message and white screen - The website encountered an error, please try again later

After installing the module H5P, my site wouldn't load and only displayed "Error" The website encountered an error, please try again later
I had to manually disable the H5P modules in the database then clear the cache and a few minutes later the website started loading again. It also seems as if sub-domains couldn't load during this time.
Has anyone else experienced this?
After uninstalling and deleting the H5P module, it still shows on the page: admin/config/system/h5p but when the H5P link is clicked I get a Website encountered an error, please try again later error.
I can't seem to clear the cache via the site admin and I can't save panel pages. It says saved but when i try to access the page url, it says page not found.
Someone else said "I've had the same or similar issue. When I install, I just get a WSOD. I ended up using the missing module cleaner to get my site back to working normal after manually uninstalling it."
I've installed the module missing fixer module and when I enabled the module I got a "Website encountered an error, please try again later error." message but when I refresh the page, it shows the module is enabled.
However, when I click on "configure" from the module list page, it takes me to /admin/config/system with no option to configure the settings or actually use the module.
Should I be looking in the database for something that could fix this issue?
This issue was fixed by truncating every cache_ table in the database.

CakePHP cms tutorial missing Helpers

Just starting with CakePHP and started the cms tutorial.
Install and configure went fine, but when I get to load the site for the first time there is a missing HTML Helper error.
When checking the View/Helper directory, it is empty: so obviously not installed.
What do I need to do to get the Helpers installed?
The issue was incorrect code in the ctp file (a stray character), and I incorrectly read the Error message as a missing Helper.
Core Helper was not actually missing, I just needed to read the Directory to discover the difference between core helpers and application helpers :-/

Not able to load Drupal site

I have downloaded a new theme from Themeforest however when loading the site I m getting the below error.
Even developer is confused about the error.
I believe its more of drupal issue can anyone help?
Fatal error: require_once(): Failed opening required 'C:\wamp\www\sites\all\modules\media\file_entity/file_entity.file_api.inc' (include_path='.;c:\wamp\bin\php\php5.4.12\pear') in C:\wamp\www\sites\all\modules\media\file_entity\file_entity.module on line 13
Can you try using relative path like
require_once("./file_entity.file_api.inc");
Before that you need to find out the getcwd() for getting the current working directory.'
then give relative path according to that.
OR
use below,
require_once(DRUPAL_ROOT . '/sites/all/modules/media/file_entity/file_entity.file_api.inc');

Joomla Upgradation showing error

I upgraded joomla but I get this error:
Fatal error: Call to undefined method JSite::execute() in /home/digitec4/public_html/index.php on line 40
Thanks for you help.
You've got two options in order to solve this problem:
1) Upgrade Joomla (if available). You just need to go to your control panel from the administrator sub-site and upgrade.
2) Reinstall Joomla and move your directory structure to the new installation.
You need to edit only "public_html/jupgrade/libraries/cms/controller" and rename the file of the controller.

CakePHP installation with multiple projects gives `require_once` error on composer

I am trying to run 2 cakephp installations on the same server. However, when I finished setting up the code and the apache vhost settings I ended up getting the following error:
Error: require_once(): Cannot redeclare class composerautoloaderinit922f66fe427c0b7305f553dc8d1952be
File: /var/www/path/app/Vendor/autoload.php
Line: 5
and similarly, on other installation I get:
Error: require_once(): Cannot redeclare class composerautoloaderinit922f66fe427c0b7305f553dc8d1952be
File: /var/www/path_second/app/Vendor/autoload.php
Line: 5
I thought of replacing require_once with just require, but I can't figure out how many includes there will be and what that will do to performance.
I thought of removing one of the folders since apparently its being loaded, but then neither of the two projects I want breaking because at some point for some reason that does not get loaded. Those two projects should be independent.
I wonder if composer should be there at all?!
What should I do?

Resources