Hello,
I tried to make a copy of my Drupal site for testing, but I can't get the test site to work. This is what I've done:
1) I made a copy of the database (let's call it test_db). 2) I made a copy of the Drupal directory and changed settings.php to point to test_db.
I can navigate to the new Drupal site, but all the nodes give me "access denied". I can login, I can create new pages, and the new pages I create work fine (no "access denied") but the old pages just won't work.
I tried following the instructions here:
http://www.tech4him.com/content/drupal-access-denied-permission-are-correct
No luck.
If I change settings.php in the test site to point to the old database, the site works fine. So the problem seems to be something in the new database, but I can't imagine what.
Does anyone have any ideas? Any suggestions would be greatly appreciated.
Daniel.
This sounds like a good case of "everybody out of the car, everybody into the car, let's see if it starts".
You say you "copied all the tables"...
How did you dump the database in the source site? How exactly did you load the target database?
I would recommend doing a complete dump either on the command line with mysqldump utility, or else with phpmyadmin, but of all the tables together. And upload everything together, or else load with mysql command line utility.
Drop all tables in the source database before loading it with the data.
Victor Kane http://awebfactory.com.ar
On Thu, Aug 14, 2008 at 8:27 AM, Daniel Carrera daniel.carrera@zmsl.com wrote:
Hello,
I tried to make a copy of my Drupal site for testing, but I can't get the test site to work. This is what I've done:
- I made a copy of the database (let's call it test_db).
- I made a copy of the Drupal directory and changed settings.php to
point to test_db.
I can navigate to the new Drupal site, but all the nodes give me "access denied". I can login, I can create new pages, and the new pages I create work fine (no "access denied") but the old pages just won't work.
I tried following the instructions here:
http://www.tech4him.com/content/drupal-access-denied-permission-are-correct
No luck.
If I change settings.php in the test site to point to the old database, the site works fine. So the problem seems to be something in the new database, but I can't imagine what.
Does anyone have any ideas? Any suggestions would be greatly appreciated.
Daniel.
[ Drupal support list | http://lists.drupal.org/ ]
Might try first clearing the cache. Also, if this is living on the same domain somehow, you might have cookie collision issues.
Laura http://pingv.com
On Aug 14, 2008, at 3:12 PM, Victor Kane wrote:
This sounds like a good case of "everybody out of the car, everybody into the car, let's see if it starts".
You say you "copied all the tables"...
How did you dump the database in the source site? How exactly did you load the target database?
I would recommend doing a complete dump either on the command line with mysqldump utility, or else with phpmyadmin, but of all the tables together. And upload everything together, or else load with mysql command line utility.
Drop all tables in the source database before loading it with the data.
Victor Kane http://awebfactory.com.ar
On Thu, Aug 14, 2008 at 8:27 AM, Daniel Carrera <daniel.carrera@zmsl.com
wrote: Hello,
I tried to make a copy of my Drupal site for testing, but I can't get the test site to work. This is what I've done:
- I made a copy of the database (let's call it test_db).
- I made a copy of the Drupal directory and changed settings.php to
point to test_db.
I can navigate to the new Drupal site, but all the nodes give me "access denied". I can login, I can create new pages, and the new pages I create work fine (no "access denied") but the old pages just won't work.
I tried following the instructions here:
http://www.tech4him.com/content/drupal-access-denied-permission-are-correct
No luck.
If I change settings.php in the test site to point to the old database, the site works fine. So the problem seems to be something in the new database, but I can't imagine what.
Does anyone have any ideas? Any suggestions would be greatly appreciated.
Daniel.
[ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
I tried clearing the cache.
The test site is in the same domain. Do you think the problem might get fixed with a sub-domain? So if the main site is at:
and I put the test site in:
Do you think that would resolve any cookie collision issue?
It's 2AM here, I'll try that tomorrow. Thanks for the suggestion.
Laura Scott wrote:
Might try first clearing the cache. Also, if this is living on the same domain somehow, you might have cookie collision issues.
Laura http://pingv.com
On Aug 14, 2008, at 3:12 PM, Victor Kane wrote:
This sounds like a good case of "everybody out of the car, everybody into the car, let's see if it starts".
You say you "copied all the tables"...
How did you dump the database in the source site? How exactly did you load the target database?
I would recommend doing a complete dump either on the command line with mysqldump utility, or else with phpmyadmin, but of all the tables together. And upload everything together, or else load with mysql command line utility.
Drop all tables in the source database before loading it with the data.
Victor Kane http://awebfactory.com.ar
On Thu, Aug 14, 2008 at 8:27 AM, Daniel Carrera <daniel.carrera@zmsl.com
wrote: Hello,
I tried to make a copy of my Drupal site for testing, but I can't get the test site to work. This is what I've done:
- I made a copy of the database (let's call it test_db).
- I made a copy of the Drupal directory and changed settings.php to
point to test_db.
I can navigate to the new Drupal site, but all the nodes give me "access denied". I can login, I can create new pages, and the new pages I create work fine (no "access denied") but the old pages just won't work.
I tried following the instructions here:
http://www.tech4him.com/content/drupal-access-denied-permission-are-correct
No luck.
If I change settings.php in the test site to point to the old database, the site works fine. So the problem seems to be something in the new database, but I can't imagine what.
Does anyone have any ideas? Any suggestions would be greatly appreciated.
Daniel.
[ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
Hello, Daniel,
Try these two steps, in this order:
1. Navigate to admin/build/modules/uninstall (administer - site building - modules, click the "uninstall" tab) -- check to see if there are any disabled modules with uninstall features, esp any modules related to access control. If so, uninstall them.
2. Then, navigate to admin/content/node-settings (administer - content management - post settings ) and look for the "Rebuild Permissions" button. Click it, and rebuild your permissions.
You also might want to look at your logs, and clear all the cache* tables in the database, just for good measure.
Cheers,
Bill
Daniel Carrera wrote:
I tried clearing the cache.
The test site is in the same domain. Do you think the problem might get fixed with a sub-domain? So if the main site is at:
and I put the test site in:
Do you think that would resolve any cookie collision issue?
It's 2AM here, I'll try that tomorrow. Thanks for the suggestion.
Laura Scott wrote:
Might try first clearing the cache. Also, if this is living on the same domain somehow, you might have cookie collision issues.
Laura http://pingv.com
On Aug 14, 2008, at 3:12 PM, Victor Kane wrote:
This sounds like a good case of "everybody out of the car, everybody into the car, let's see if it starts".
You say you "copied all the tables"...
How did you dump the database in the source site? How exactly did you load the target database?
I would recommend doing a complete dump either on the command line with mysqldump utility, or else with phpmyadmin, but of all the tables together. And upload everything together, or else load with mysql command line utility.
Drop all tables in the source database before loading it with the data.
Victor Kane http://awebfactory.com.ar
On Thu, Aug 14, 2008 at 8:27 AM, Daniel Carrera <daniel.carrera@zmsl.com
wrote: Hello,
I tried to make a copy of my Drupal site for testing, but I can't get the test site to work. This is what I've done:
- I made a copy of the database (let's call it test_db).
- I made a copy of the Drupal directory and changed settings.php to
point to test_db.
I can navigate to the new Drupal site, but all the nodes give me "access denied". I can login, I can create new pages, and the new pages I create work fine (no "access denied") but the old pages just won't work.
I tried following the instructions here:
http://www.tech4him.com/content/drupal-access-denied-permission-are-correct
No luck.
If I change settings.php in the test site to point to the old database, the site works fine. So the problem seems to be something in the new database, but I can't imagine what.
Does anyone have any ideas? Any suggestions would be greatly appreciated.
Daniel.
[ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
Hello all,
Sorry for the delay in responding.
To re-cap the problem: I made a copy of my Drupal site as a test site, and all the permissions are wrong, I can't access any node. I can, however, login as admin and access admin pages. I can also create new nodes and those work fine.
Victor, Laura and Bill all offered suggestions and I do apologize for not following up quickly. I followed the suggestions without much luck:
1) Victor: I can't do a command-line dump because I don't have command-line access. I am stuck with phpMyAdmin. I can't upload an entire copy of the database so I must do the copy in steps. :-(
2) Laura: I have cleared the cache, and I also cleared the sessions table for good measure. No change. I created a sub-domain and pointed it to the new Drupal site. No change. So I don't think that this is a cookie-related issue.
3) Bill: Drupal 4.7 doesn't have "administer > site building" so I can't uninstall modules. :-( All I can do is deactivate them. I have deactivated everything in sight.
4) Bill: Drupal 4.7 doesn't have "administer - content management". I see no way to rebuild permissions.
Question: Is it possible to (1) create an entirely new Drupal site and then (2) copy the users and the nodes? Is such a thing possible? I don't care about the modules except for the "blog" and "page" modules. I'm happy to install new ones later.
Thank you all for the help you have provided. I hope that we can find a solution. I wonder if my installation is messed up for some reason and perhaps the best option is to start a new. The problem is that I have to copy the pages and blogs. They belong to my users. The users can tolerate a change in UI and changing some features for others, but not the loss of all their data.
Daniel.
On Tue, Aug 19, 2008 at 3:02 PM, Daniel Carrera daniel.carrera@zmsl.com wrote:
Hello all,
Sorry for the delay in responding.
To re-cap the problem: I made a copy of my Drupal site as a test site, and all the permissions are wrong, I can't access any node. I can, however, login as admin and access admin pages. I can also create new nodes and those work fine.
Victor, Laura and Bill all offered suggestions and I do apologize for not following up quickly. I followed the suggestions without much luck:
- Victor: I can't do a command-line dump because I don't have
command-line access. I am stuck with phpMyAdmin. I can't upload an entire copy of the database so I must do the copy in steps. :-(
- Laura: I have cleared the cache, and I also cleared the sessions
table for good measure. No change. I created a sub-domain and pointed it to the new Drupal site. No change. So I don't think that this is a cookie-related issue.
- Bill: Drupal 4.7 doesn't have "administer > site building" so I can't
uninstall modules. :-( All I can do is deactivate them. I have deactivated everything in sight.
- Bill: Drupal 4.7 doesn't have "administer - content management". I
see no way to rebuild permissions.
Unfortunately Drupal 4.7 has been unsupported for a long time and most have started to forget how it used to work. Somehow you will need to follow Bill's advice manually or with whatever means were available at the time.
The first thing I would try: Upgrade to Drupal 5.10. After replacing all your modules with their 5.x versions, making sure that your theme can handle Drupal5, and running update.php, try to follow Bill's advice. Try it on a test site first.
If this is not possible, and you need to stay with D 4.7, then (on a test site):
- Check if you have any access control modules such as OG or taxonomy access. If you used to have them but you have disabled them, then enable them again, disable their access control from their settings page, and only then disable themagain.
- If this fails, check the node_access table in the database. With all access control modules disabled, it should contain only one row with values 0, 0, 'all', 1, 0, 0. If it contains more rows with different realms, delete them all and add only this one:
INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);
Question: Is it possible to (1) create an entirely new Drupal site and then (2) copy the users and the nodes? Is such a thing possible? I don't care about the modules except for the "blog" and "page" modules. I'm happy to install new ones later.
If it comes to that, these modules may help import users and nodes from comma delimited text files:
http://drupal.org/project/user_import http://drupal.org/project/node_import
Thank you all for the help you have provided. I hope that we can find a solution. I wonder if my installation is messed up for some reason and perhaps the best option is to start a new. The problem is that I have to copy the pages and blogs. They belong to my users. The users can tolerate a change in UI and changing some features for others, but not the loss of all their data.
Daniel.
[ Drupal support list | http://lists.drupal.org/ ]
Im not sure if this has been proposed allready before, but are the php versions the same between your installations? I had some issues before with access on 4.7 installations that went from php4 to php5, there is a sessions issue which makes that you are logged out at the first click after signing in. There is an easy fix available on drupal.org, I can look it up for you if thats your problem.
Good luck,
Hans
On 8/19/08, Cog Rusty cog.rusty@gmail.com wrote:
On Tue, Aug 19, 2008 at 3:02 PM, Daniel Carrera daniel.carrera@zmsl.com wrote:
Hello all,
Sorry for the delay in responding.
To re-cap the problem: I made a copy of my Drupal site as a test site, and all the permissions are wrong, I can't access any node. I can, however, login as admin and access admin pages. I can also create new nodes and those work fine.
Victor, Laura and Bill all offered suggestions and I do apologize for not following up quickly. I followed the suggestions without much luck:
- Victor: I can't do a command-line dump because I don't have
command-line access. I am stuck with phpMyAdmin. I can't upload an entire copy of the database so I must do the copy in steps. :-(
- Laura: I have cleared the cache, and I also cleared the sessions
table for good measure. No change. I created a sub-domain and pointed it to the new Drupal site. No change. So I don't think that this is a cookie-related issue.
- Bill: Drupal 4.7 doesn't have "administer > site building" so I can't
uninstall modules. :-( All I can do is deactivate them. I have deactivated everything in sight.
- Bill: Drupal 4.7 doesn't have "administer - content management". I
see no way to rebuild permissions.
Unfortunately Drupal 4.7 has been unsupported for a long time and most have started to forget how it used to work. Somehow you will need to follow Bill's advice manually or with whatever means were available at the time.
The first thing I would try: Upgrade to Drupal 5.10. After replacing all your modules with their 5.x versions, making sure that your theme can handle Drupal5, and running update.php, try to follow Bill's advice. Try it on a test site first.
If this is not possible, and you need to stay with D 4.7, then (on a test site):
- Check if you have any access control modules such as OG or taxonomy
access. If you used to have them but you have disabled them, then enable them again, disable their access control from their settings page, and only then disable themagain.
- If this fails, check the node_access table in the database. With all
access control modules disabled, it should contain only one row with values 0, 0, 'all', 1, 0, 0. If it contains more rows with different realms, delete them all and add only this one:
INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);
Question: Is it possible to (1) create an entirely new Drupal site and then (2) copy the users and the nodes? Is such a thing possible? I don't care about the modules except for the "blog" and "page" modules. I'm happy to install new ones later.
If it comes to that, these modules may help import users and nodes from comma delimited text files:
http://drupal.org/project/user_import http://drupal.org/project/node_import
Thank you all for the help you have provided. I hope that we can find a solution. I wonder if my installation is messed up for some reason and perhaps the best option is to start a new. The problem is that I have to copy the pages and blogs. They belong to my users. The users can tolerate a change in UI and changing some features for others, but not the loss of all their data.
Daniel.
[ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
- Victor: I can't do a command-line dump because I don't have
command-line access. I am stuck with phpMyAdmin. I can't upload an entire copy of the database so I must do the copy in steps. :-(
If this is true that you copied the tables one at a time, it sounds like you didn't get the node_access table copied. You should check to make sure it has entries for the nodes in question. Or that it is copied from a fresh drupal install if you've disabled all the access control modules.
Dave
Yes, same php versions. It is exactly the same server. The two sites are simply different directories on the same site:
http://example.com/foo http://example.com/bar
Thanks.
KOBA | Hans Rossel wrote:
Im not sure if this has been proposed allready before, but are the php versions the same between your installations? I had some issues before with access on 4.7 installations that went from php4 to php5, there is a sessions issue which makes that you are logged out at the first click after signing in. There is an easy fix available on drupal.org, I can look it up for you if thats your problem.
Good luck,
Hans
On 8/19/08, Cog Rusty cog.rusty@gmail.com wrote:
On Tue, Aug 19, 2008 at 3:02 PM, Daniel Carrera daniel.carrera@zmsl.com wrote:
Hello all,
Sorry for the delay in responding.
To re-cap the problem: I made a copy of my Drupal site as a test site, and all the permissions are wrong, I can't access any node. I can, however, login as admin and access admin pages. I can also create new nodes and those work fine.
Victor, Laura and Bill all offered suggestions and I do apologize for not following up quickly. I followed the suggestions without much luck:
- Victor: I can't do a command-line dump because I don't have
command-line access. I am stuck with phpMyAdmin. I can't upload an entire copy of the database so I must do the copy in steps. :-(
- Laura: I have cleared the cache, and I also cleared the sessions
table for good measure. No change. I created a sub-domain and pointed it to the new Drupal site. No change. So I don't think that this is a cookie-related issue.
- Bill: Drupal 4.7 doesn't have "administer > site building" so I can't
uninstall modules. :-( All I can do is deactivate them. I have deactivated everything in sight.
- Bill: Drupal 4.7 doesn't have "administer - content management". I
see no way to rebuild permissions.
Unfortunately Drupal 4.7 has been unsupported for a long time and most have started to forget how it used to work. Somehow you will need to follow Bill's advice manually or with whatever means were available at the time.
The first thing I would try: Upgrade to Drupal 5.10. After replacing all your modules with their 5.x versions, making sure that your theme can handle Drupal5, and running update.php, try to follow Bill's advice. Try it on a test site first.
If this is not possible, and you need to stay with D 4.7, then (on a test site):
- Check if you have any access control modules such as OG or taxonomy
access. If you used to have them but you have disabled them, then enable them again, disable their access control from their settings page, and only then disable themagain.
- If this fails, check the node_access table in the database. With all
access control modules disabled, it should contain only one row with values 0, 0, 'all', 1, 0, 0. If it contains more rows with different realms, delete them all and add only this one:
INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);
Question: Is it possible to (1) create an entirely new Drupal site and then (2) copy the users and the nodes? Is such a thing possible? I don't care about the modules except for the "blog" and "page" modules. I'm happy to install new ones later.
If it comes to that, these modules may help import users and nodes from comma delimited text files:
http://drupal.org/project/user_import http://drupal.org/project/node_import
Thank you all for the help you have provided. I hope that we can find a solution. I wonder if my installation is messed up for some reason and perhaps the best option is to start a new. The problem is that I have to copy the pages and blogs. They belong to my users. The users can tolerate a change in UI and changing some features for others, but not the loss of all their data.
Daniel.
[ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
Ok, sorry, I did not have the first part of the thread anymore.
Some more ideas: - Try to redo the backup with http://www.ozerov.de/bigdump.php - Or another option as Victor proposed: if you have no command line access check if your hosting company provides an interface for cronjobs, for instance in cpanel this is a workaround to execute command line, just enter mysqldump -u USERNAME --password=PASSWORD DBNAME > /home/backups/backup.sql as a cron job an let cron run once. Make the directory backups first in your filesystem in advance. - Install Devel module with which you easily can clear the cache before you backup and there is also a block available for checking the node_access table for the node you are viewing. Though I'm not sure if these options are included in the 4.7 version of Devel. - Use your original database for both installations, so use the same settings file, just to check if there are no differences in the files (permissions, missing files during copying) that are causing the problems. With the same database permissions should be ok, but you never know.
Good luck,
Hans
2008/8/20 Daniel Carrera daniel.carrera@zmsl.com
Yes, same php versions. It is exactly the same server. The two sites are simply different directories on the same site:
http://example.com/foo http://example.com/bar
Thanks.
KOBA | Hans Rossel wrote:
Im not sure if this has been proposed allready before, but are the php versions the same between your installations? I had some issues before with access on 4.7 installations that went from php4 to php5, there is a sessions issue which makes that you are logged out at the first click after signing in. There is an easy fix available on drupal.org, I can look it up for you if thats your problem.
Good luck,
Hans
KOBA | Hans Rossel wrote:
Ok, sorry, I did not have the first part of the thread anymore.
Some more ideas:
- Try to redo the backup with http://www.ozerov.de/bigdump.php
THANKS!!!
BigDump worked, and not only that, as soon as I did the import the test site began working correctly. I don't get "access denied" anymore.
Ok, now I'm curious, why did it work? Why do I have to copy the entire database at once and why is it bad if I copy it in chunks?
Anyways, thank you very much. And thanks to everyone who chipped in to help. I really appreciate your efforts. Now I will proceed with the upgrade to Drupal 5.
Daniel.
Glad it worked!
BigDump is also importing in chunks, but then in an automated way, 3000 lines at a time by default, so that's certainly not the problem. But if you start cutting yourself it's easy to forget some pieces.
Hans
2008/8/20 Daniel Carrera daniel.carrera@zmsl.com
KOBA | Hans Rossel wrote:
Ok, sorry, I did not have the first part of the thread anymore.
Some more ideas:
- Try to redo the backup with http://www.ozerov.de/bigdump.php
THANKS!!!
BigDump worked, and not only that, as soon as I did the import the test site began working correctly. I don't get "access denied" anymore.
Ok, now I'm curious, why did it work? Why do I have to copy the entire database at once and why is it bad if I copy it in chunks?
Anyways, thank you very much. And thanks to everyone who chipped in to help. I really appreciate your efforts. Now I will proceed with the upgrade to Drupal 5.
Daniel.
[ Drupal support list | http://lists.drupal.org/ ]