By j0k3z on
Had Drupal setup and running perfectly and then decided to move hosts. I moved the directory to the new host, copied the database over, changed the info in settings.php, etc.
Now when I access my domain it says "Fatal error: Call to undefined function user_access() in /home/xxxxxx/public_html/drupal/modules/cck/content.module on line 81"
Any idea how I can fix this?
Comments
Function user_access should
Function user_access should have been defined in user.module (in core).
- Does the file drupal/modules/user/user.module exist, exactly at that place?
- Is it undamaged? (for example is it zero size or does it contain garbage?)
- Is the user.module file readable by the web server? (permissions at least 644)
- Is its containing directory (user) readable by the server? (permissions at least 755)
You may need to upload again.
Or, have you done any complicated .htaccess tricks which you forgot to repeat in the new server?
thanks for the help. Turns
thanks for the help. Turns out the user module didnt upload, must have timed out or something.
So I uploaded that and the site started to work except clean urls no longer work. I turned off clean urls and now when I click a link on my website firefox asks if I want to save the page. Any idea how to fix this? I tried copying my htaccess file over but that didnt change anything. What should the htaccess file contain?
Also, status report shows "register_globals is enabled. Drupal requires this configuration directive to be disabled." so maybe that is why it is asking me to download the pages?
Watch out for more missing
Watch out for more missing or corrupted files.
Drupal's .htaccess file is completely essential for clean URLs. With that file, clean URLs should work even without enabling them in Drupal's settings. Without it, they just won't work. Upload a fresh one from a Drupal package of the same version as yours.
The .htaccess file should also have disabled register_globals. If you upload it and doesn't work, we 'll see...
A browser trying to download php files instead of running them is a different problem, a server configuration problem. It is possible that it is broken because of some unneeded added directive in your .htaccess file. Or it may be a temporary server glitch, when they need to restart some service. If not, your host must solve it.
well I contacted hostgator
well I contacted hostgator and they fixed the issue with php files trying to be downloaded.
I still cant get clean urls to work properly though. Searching the forum reveals that others have had similar problems. What should the htacess file contain?
The important .htaccass
The important .htaccass lines for clean URLs are:
The
# RewriteBase /line is disabled. Remove the#only if it doesn't work as it is.For register_globals and for other needed settings, there are also these lines which go before the above:
But everything is already in the .htaccess file in your version's drupal package.
True, true
I had the same issue on Host Gator - turns out I still had RewriteBase /"Drupal Install Folder" uncommented as mentioned above. You need this to be able to enable clean URLs on your localhost, but once I upload a site, one of my tasks is to comment it out. I also have the register_globals issue, so I will ensure my settings are the same.
cog.rusty, thank you
cog.rusty, thank you again.
My htaccess must have been out of date because I added this code and it works perfectly (for now)
Thanks