Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
A recent update of PHP to version 5.2.5 by the host ISP caused a number of problems most of which have been solved (topics 210286 fixed via forum response, 210489 fixed by ISP and unrelated to Drupal, and 210448 partially fixed by forum).
Thanks to forum members who provide solutions or links to solutions.
It seems that the system is overdue for an update to a more recent version.
I just tried to update a client's site from Drupal 5.5 to 5.6, and wasn't really expecting any problems as I've done plenty of Drupal upgrades before, usually without incident. But this time things got really wonky.
Since upgrading to 5.5 I've not been able to update my account (user/1). When I click on my account, I get the following error message: warning: Invalid argument supplied for foreach() in /www/drupal/modules/user/user.module on line 1526.
If I click on the "edit" link at the top of the page, I get a page not found error.
the code from user.module surrounding this line is (line 1526 is highlighted): function user_view($uid = 0) {
global $user;
$account = user_load(array('uid' => $uid));
if ($account === FALSE || ($account->access == 0 && !user_access('administer users'))) {
return drupal_not_found();
}
// Retrieve and merge all profile fields:
$fields = array();
foreach (module_list() as $module) {
if ($data = module_invoke($module, 'user', 'view', '', $account)) {
foreach ($data as $category => $items) { <<<<<<<<<<----- LINE 1526
foreach ($items as $key => $item) {
$item['class'] = "$module-". $item['class'];
$fields[$category][$key] = $item;
}
}
}
}
// Let modules change the returned fields - useful for personal privacy
// controls. Since modules communicate changes by reference, we cannot use
// module_invoke_all().
foreach (module_implements('profile_alter') as $module) {
The ISP host recently updated to PHP version 5.2.5
My initial problem http://drupal.org/node/210286 was that the page wasn't being displayed at all. I solved that using a fix discussed in 55593 and not the page appears as normal.
On the way to fixing this I discovered how to determine what version we are using so I now know it is 4.6.5.
The new problem is that I can no longer do any admin.