I just upgraded from Drupal 6.1 to 6.5. Now when going to the website, I get this message:
Fatal error: Call to undefined function user_access() in /home/portjes2/public_html/volidaygreetings/includes/menu.inc on line 448
When going into the program the above message specifies, line 448 is this,
"$item['access'] = (count($arguments) == 1) ? user_access($arguments[0]) : user_access($arguments[0], $arguments[1]);"
I cannot figure out what the problem is or what to do about it? HELP.
Comments
Comment #1
Kevin10EC commentedI also get this error,
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/portjes2/public_html/volidaygreetings/includes/menu.inc on line 80
Comment #2
Kevin10EC commentedAnd of course I did not back up the site first.
Comment #3
vm commentedin reading similar threads using the search = http://drupal.org/search/node/Fatal+error%3A+Call+to+undefined+function+...
It seems the common link is that a file was either not uploaded or corrupted upon upload. That said, I'd remove all files and reupload them again.
Not backing up the system first can burn you , though not this time around as nothing has happened to the DB unless you've already run update.php? have you?
if you haven't I HIGHLY suggest backing up your DB NOW!
Comment #4
vm commentedComment #5
vm commentedComment #6
Kevin10EC commentedI have attempted to reinstall all the drupal modules and I still get the error, but this time on another line, Fatal error: Call to undefined function user_access() in /home/portjes2/public_html/volidaygreetings/includes/menu.inc on line 449
Comment #7
vm commentedstill waiting for an answer as to whether update.php was run or not after uploading the new core files.
Now were talking about drupal modules. Core modules? contrib modules?
The problem could be any file from what I've read and not limited to just module files.
Comment #8
ryooki commentedI get the same error. When I go to the update.php page, I get redirected to update.php?op=info with absolutely nothing on the page... viewing the source pulls up a blank page, as well. I haven't updated my database b/c I haven't been able to get that option at all.
Comment #9
Kevin10EC commentedI have not run the update.php process.
Comment #10
SungamR commentedI also have Fatal error: Call to undefined function user_access() in menu.inc on line 449
I extracted the compressed file linked to from the build in update system as usual.
I have also downloaded the file manually from the Drupal frontpage with no other result.
I have not run update.php or done anything else.
I don't know if it matters but since it was something regarding user_access(). I was logged in as Administrator while copying the new files... No other users though, its a developer installation.
Comment #11
vm commentedwhat if any contrib modules are in use in this installation?
Comment #12
SungamR commentedACL
Forum_Access
Ubercart a farily new nightly build.
Token
Comment #13
vm commentedI recall a situation between 6.0 and 6.2 that had something to do with the menu but I can't seem to find the documentation.
At this point if it were me.
I'd replace my files with the originals, which can be obtained by downloading the original version that was installed. This should get your site back to a working site as update.php was never run so the database was never altered.
once you get the site back to a working state, we can try to proceed forward and you can make the necessary backups at that time.
Comment #14
SungamR commentedProgress report:
I make a clean installation of 6.4 and get the same error except its 2 lines earlier. (447)
And I can swear on holy things that I never ran Update.
BTW my installation is a test one, so if you have any ideas I can take risks testing stuff etc..
*edit*
Cleared all cache tables, no result.
Comment #15
ryooki commentedI had a ton of modules installed. I deleted them and set the status of everything in system to '0'. That didn't seem to help. :(
Comment #16
Kevin10EC commentedThank you everyone for your help and comments. This was resolved and my site is working fine now.
Comment #17
psi36 commentedI have the same problem, only I did run update and only got the error afterwards.
Off course I didn't make a backup of the db before, which is quite stupid, I know.
But is there any way I could retrieve the data from my database?
Comment #18
cgdigitaltreats commentedFunction http://api.drupal.org/api/function/user_access/6 is defined in modules/user/user.module (http://api.drupal.org/api/file/modules/user/user.module/6/source). Either this file is missing, or perhaps it was missing and as a result has been disabled in the {system} table in the DB. The value of status should be 1. Same goes for node.module which is where node_load lives, and also block, filter and system modules. Hopefully that will fix the form.inc error too.
cog.rusty - October 19, 2008 - 02:13
Was that an upgrade from Drupal 6.0?
"undefined function user_access()" means that Drupal
- either didn't find the user.module file at the place where it should be (under /modules/user/)
- or it couldn't read it (because it was damaged, or because its permissions were less than 644, or because the permissions of it directory were less that 755, or for some other reason).
The error message from update.php does not say that some code is wrong, it says that it received a wrong value.
Don't access your site with the updated Drupal files before running update.php. Upload again, make sure that the modules have been placed at the right directories, make sure that Drupal's directories have permissions at least 755, and run update.php again.
Thanks. Rusty Cog, You were rigtht for me. I had to do your fix and gdk said the same thing, being those modules were disabled.
I tried to update to 6.8 and ran into that user access problem.
First:
I had to turn back on the user module, set to 1 from 0. Also the user module somehow had 750 permissions, I changed it to 755.
The system module was disabled for me. I set it to 1 and the site came back alive. Thanks.
For others, load up phpmyadmin, log into your database, scroll down to where it says system. Look for your modules, and the status, 1 is on 0 is off.
I'm posting this on all the pages I found that people had this problem.
Comment #19
ainigma32 commented@psi36: Can you confirm you were able to resolve this issue using the info provided by vitovonantwon ?
- Arie
Comment #20
Kevin10EC commentedInstallation works.