I had Drupal up and running. When I moved modules over to the server, I accidentally copied the drupal folder again (into the modules folder). I configured my site. When I noticed the extra Drupal folder, I deleted it and got this error: Fatal error: Call to undefined function user_access() in ../public_html/includes/menu.inc on line 2490. I followed instructions found here, http://drupal.org/node/332619, for a similar problem, but it didn't work.

So I reloaded the extra drupal folder into the modules folder and the site worked again! There was this non-fatal error, though:

warning: require_once(modules/drupal-6.19/modules/user/user.pages.inc) [function.require-once]: failed to open stream: No such file or directory in ...

Im glad it's up and running again, but I am worried it will be a problem later. Any suggestions on how to fix it?

Thanks!

Comments

mrwhizkid’s picture

Your database is probably 'confused' as to where the module folder is actually located. It's definitely NOT a good idea to have that Drupal folder in the module folder.

Try removing the Drupal folder from the modules folder. Then go to www.mysite.com/update.php . This should update the database as to where your core modules are located.

If you aren't logged in as admin you may have trouble running update.php. (especially if the errors won't let you log in!) You will need to go to your settings.php file and change $update_free_access = FALSE; to $update_free_access = TRUE;

Then run www.mysite.com/update.php

Just make sure you change this BACK to FALSE afterwards...otherwise everyone and their brother will be able to run that script.

fieldswb’s picture

Thanks for the help. After following your instructions, it still gives me a fatal error: Call to undefined function user_access().../includes/theme.inc on line 980. I found that my site still works when I delete everything from the extra drupal folder except for the users module...

fieldswb’s picture

Still the same issues. I started to deactivate the modules that were being referenced with the fatal errors and see that when the extra drupal folder (with only the user module) is deleted, then any time there is a user_access() function, it returns a fatal error...fyi

mrwhizkid’s picture

OK. It looks like the database is still trying to pull the user module from that rogue Drupal folder. The next thing that you can try is this:

Go into PHPmyadmin from Cpanel and select your database. On the left,you will see 'System'. Click on that and look for the user.module

It SHOULD be something like modules/user/user.module but I'm guessing that in your configuration it's something like modules/Drupal/user/user.module

You can change this by editing this table...push the pencil icon next to the red x.

Next to filename make sure it says modules/user/user.module

You may need to run update.php again but this should hopefully clear up the problem.