I set up Drupal for the first time today. 4.7.4 on a CentOS 4.4 box. Pretty easy overall and I'm digging it.
The initial install went under foo.bar.com/drupal. The web dev I set it up for played around with it for a while, then wanted to move it under a different virtual domain. I added the named virtual baz.bar.com to my Apache config and pointed its DocumentRoot to where /drupal pointed in the previous config. They both only need to use the default config and they both use the same MySQL database.
When I try to contact the new site at http://baz.bar.com, I get "Access denied" and "You are not authorized to access this page." Also, when I go back to http://foo.bar.com/drupal, I get the same thing.
I don't really want to ask this guy to redo his work, but the only way around this that I can see right now is to start with a fresh database. I would think that what I'm doing wouldn't be too tough, but I can't find another way around it.
Any suggestions?
Thanks.
-sig
Comments
Access denied Problem: how did I solve?
Hi!
I don't know why it gives such problems, especially when I make some changes in settings or add some new domain related setting.php. Within a few minutes of installation, it gives these "access denied" or "you are not authorized to ....", but if you wait for few hours: go to bed, wake up next morning and try it, it works with surprises. I don't know why this method was also working at my Joomla CMS based websites. So, there is something to do with cache/ cookie/...temporary files. I have no idea, and I follow thig dumb's method. What else could I do? I tried to change the cache / cookie life time / .... at setting.php file (around bottom), and all these attempts failed.
If this problem repeats after 24 hours of my first installation of new domain, then I simply change my computer -- notebook to desktop or vice versa. It works well, surprising. Don't know why? For me it works, so I just do it in this way. Third method, I have registered several names at administrator level, so if one admin account does not work, I go for another, and it works. What else can I do? Another dumb method. Its my website, I have freedom to have any number of administrators to create. Its really a funny solution is not it? Try these methods, they may work in your case too, but I am not sure whether these methods that I developed were statistical or will work in other websites other than mine. I use Drupal 4.7.3.
Good Luck.
Dr. G. Pokharel
WebMaster
http://www.geotechnical.org/
Drupal for handheld mobile equipments: An Example: http://www.egs.mobi/
Thanks, Doc, I'll try the
Thanks, Doc, I'll try the "wait" method. I've got a million other things to do right now, so putting it on the back burner is quite appealing. :) If that doesn't work by tomorrow, I'll look into stomping out my cookies and trying again.
Thanks.
-sig
I believe you have a Session ID conflict
If you go to the list of cookies in your browser and search for cookies named PHPSESSID. Remove the cookie for the old domain and voila you are logged in!
SETTINGS.PHP caused the problem for me
Maybe someone will have the same problem as me - I had the same symptom as everybody else, but the problem was not the session, cookies in the browser or anything similar - the problem was the line in settings.php, which stated:
$cookie_domain = 'academica.org.rs';
which was the OLD DOMAIN. I had to change this (actually, I commented it out since I have two more Drupal's without that line that work just fine :)
After I made changes to settings.php, I was able to log in as usual.
Rgds
Your solution worked. Made my day.
Your solution worked. Made my day.