I upgraded from 4.7 to 5.1.

I'm getting an 'Access denied' when I attemp to access any page except for the update.php script. The update went fine without any errors.

I've made sure all my tables are utf8_general_ci, I tried both 'mysqli' and 'mysql' for the $db_url and I also made sure my sesson.inc had the line: register_shutdown_function('session_write_close');

But I'm still getting an Access denied.

Please help...

Thanks,

Comments

behindthepage’s picture

I had the same problem and fixed it by changing the database.
From memory I think the following fixed it. (I really should write these things down.)

node_access table to the following

nid 0
gid 0
realm all
grant_view 1
grant_update 0
grant_delete 0

Let me know if that doesn't fix it
gpdinoz
"Everything should be made as simple as possible, but not simpler." - Albert Einstein

Regards
Geoff

number3’s picture

Thanks for the post gpdinoz.

Your solution worked (not sure how or why it worked), I did not receive an 'Access Denied' message. But here is the odd part and I should have mentioned this before.

I have drupal 4.7 in my wwwroot folder. I created a sub folder (wwwroot/drupal51), copied the default drupal 5.1 files to the folder, created a new database (and imported the data from my 4.7 tables) and copied my .htaccess and settings.php to the 'drupal51' folder.

I changed the $db_url to use the new database I created for my upgrade; and I changed my $base_url so that it refers to the drupal 5.1 folder.

After trying out your solution I typed in the url that points to the drupal 5.1 files (wwwroot/drupal51), and the same home page that is used for my drupal 4.7 install came up (even though the url was wwwroot/drupal51); that home page had the same menu module and theme as my drupal 4.7 install.

That should not be possible because I never copied my theme or menu module to the drupal 5.1 files.

I really don't know what is going on here. It would be greatly appreciated If someone could shed some light.

Thanks,

behindthepage’s picture

I can't say anything definative but here are a few things that didn't sound quite right.

Having a drupal instalation in a subfolder of a drupal instalation sounds like a recipe for problems. I have a hunch that you could get interactions between the .htaccess files and paths. It would be better to put them in folders side by side or put the 5.1 in a subdomain. Then you won't need base_url.

Copying the .htacces and settings.php files. When upgrading I think it is best to change the 5.1 files rather than copy over from 4.7 in case there are small differences.

I think making these few changes will solve your problems and if they don't, it will make it easy to find out what is causing the problems.

gpdinoz
"Everything should be made as simple as possible, but not simpler." - Albert Einstein

Regards
Geoff

number3’s picture

Thanks for the reply gpdinoz.

You are correct, it has been quite problematic for me so far.

I'll give drupal 5.1 another go on some fresh real estate.