I've just experienced a really BAD fatal error while attempting to update my Drupal 4.7.4 site after uploading the newest Advanced Poll module (I think it's the Dec.30th, 2006 version). I have full backups, but before I go and upload a huge database and replace the entire root directory of the webserver, I thought I'd ask here first.

Here's what happened. I took the site offline, verified that it was offline with a regular user from another machine, and then navigated to update.php while logged in as administrator.

I saw the update.php page come up, I had just completed a full backup, so I ran the updater. It came back with a page full of modules and their associated pop-up menus, but they all said "update not needed", or something like that. I pressed the go button anyway, just as I've always done before when seeing this page.

This time, I was greeted with a white screen and the words:
Fatal error: Call to undefined function: drupal_valid_token() in /usr/local/websiteroot/update.php on line 685

I found only one post on the drupal.org site that deals with "drupal_valid_token()", and that one is a handbook page dealing with forms and cross-site scripting.

Does anyone know which file is the culprit here? I'm afraid that if I replace my root website directory with my backed-up files, that the database will somehow be wrong now because of the update.php that just ran. Is that true?

Comments

cog.rusty’s picture

Strange. Function drupal_valid_token() should be defined in Drupal's /includes/common.inc (http://api.drupal.org/api/4.7/function/drupal_valid_token). Check if the file was corrupted. Or not loaded (maybe a php memory problem?) I can't think anything else.

About the database, the upgrade 4.7.4 -> 4.7.5 performs exactly two updates (183 and 184), the last ones in /database/update.inc. You can check if the changes in the tables have been done, and also if Drupal knows it ('system' table, 'system.module' row, 'schema_version' column).

daggett’s picture

Thanks rusty cog. Your post pointed me in the right direction.

best regards,

James

James Sinnamon
http://www.candobetter.org/james

mlarini’s picture

Check the permissions on /include and /include/*

senpai’s picture

The perms on /include/ are 755 and the perms on /include/* are sticky. I went ahead and did a [chmod rwxr-xr-x -R] on the include dir just to see if it might help. No such luck. Running /update.php still produces the same error.

[EDIT] The URL that I end up with during the error is /update.php?op=selection. Is that right?
--
Joel Farris
"...and that's the way it oughtta be!"

****
Joel "Senpai" Farris | certified to rock score

divyeshvk’s picture

Ya that's right....
I am facing the same error......
tried out all the specified way, but still getting same error........

Divyesh V. Khambhatwala

divyeshvk’s picture

ya i was getting the same error while I was using Coder module and using that I was trying to remove some patches of my code files and I was facing in 4.7 version. Because of some function in common.inc was missing which was required. And after adding those function lines, I was able to run the files.

So, might check with the code files by comparing it to same version's file and you come to know that.

Divyesh V. Khambhatwala