drupal7.24升级错误(rules模块)

原来是7.21版本,直接把7.23版本文件覆盖,点击网页进入后台的模块页面,提示模块要升级,升级失败,打开另外一个网站首页出错,提示:

“error: Class 'RulesEventHandlerEntityBundle' not found in /home/user/public_html/sites/all/modules/rules/modules/node.rules.inc on line 147.”

发现应该是rules模块升级出错

删除新版本的rules模块,恢复到老版本的rules,运行:update.php,提示:Access denied

Access denied. You are not authorized to access this page. Log in using either an account with the administer software updates permission or the site maintenance account (the account you created during installation). If you cannot log in, you will have to edit settings.php to bypass this access check. To do this:
 
With a text editor find the settings.php file on your system. From the main Drupal directory that you installed all the files into, go to sites/your_site_name if such directory exists, or else to sites/default which applies otherwise.
There is a line inside your settings.php file that says $update_free_access = FALSE;. Change it to $update_free_access = TRUE;.
As soon as the update.php script is done, you must change the settings.php file back to its original form with $update_free_access = FALSE;.
To avoid having this problem in the future, remember to log in to your website using either an account with the administer software updates permission or the site maintenance account (the account you created during installation) before you backup your database at the beginning of the update process.
 
修改setting文件后,再次升级,正常升级无错,再次打开首页,网站运转正常。