Hi there,

I got de following problem with my drupal 4.7.3 Installation. When i upload my site to the server i can login with Firefox and Safari but not with Internet Explorer. My site is on a certain domain from my hosting company. My www.domain.com is provided by an other company. the www.domain.com is redirecting to my hosting company's server.

I've searched all the topics about this problem, I erased the cookies from IE, I changed lines off code in the user.module like suggested in certain posts. But nothing seems to help.

Does somebody have a solution for this verry strange problem ?

Thanx in advance

Greetz,

Daflow

Comments

calebgilbert’s picture

Best thing I can tell you is to:

1. Download the latest bootstrap.inc file from CVS (this is for the 4.7 branch and is new than the 4.7.3 version)
http://cvs.drupal.org/viewcvs/*checkout*/drupal/drupal/includes/bootstra...

2. Find this line in the user.module
session_regenerate_id();
...and comment it out.

3. Change the following settings in yoursettings.php file to something like:

ini_set('arg_separator.output',     '&');
ini_set('magic_quotes_runtime',     0);
ini_set('magic_quotes_sybase',      0);
ini_set('session.cache_expire',     1500);
ini_set('session.cache_limiter',    'none');
ini_set('session.cookie_lifetime',  0);
ini_set('session.gc_maxlifetime',   1500);
ini_set('session.save_handler',     'user');
ini_set('session.use_only_cookies', 1);
ini_set('session.use_trans_sid',    0);
ini_set('url_rewriter.tags',        '');

(these setting simply help with clearing an existing cookie after a certain amount of time and/or when they close their browser window, but don't cure this issue itself, btw. But then as I've studied the problem it's the existing cookie which IS the problem. It's never blocked me out from logging in with IE if I clear the cookie first - only if there is already a cookie)

4. Haven't tried this last one because the first three cleared my problems up, as well as the double-login issue with IE, but it sounds kind of promising:

...to those above commands in settings.php add:

ini_set('session.cookie_domain', '.yourdomain.com');

Good luck,

=====
Bloggyland.com
Hosting for pre-tuned/pre-configured Drupal installations
No set-up time, instant fully-functioning site with many extra modules
Drupal specific support, SSH/FTP/cPanel

daflow’s picture

Hi politicalphysics,

Many thanx for your suggestions. I tried all the suggestions you mentioned, but they had no succes. Altough their was one strange result. I added the ini_set('session.cookie_domain', '.yourdomain.com'); line, and i couldn't login anymore with Safari. So it does something, but not yet the right result. Other tips or hints to solve this problem ?

Thanx in advance

Greet,

Daflow

calebgilbert’s picture

Just be sure to delete your existing cookie before testing the new settings. That way you can be sure that you're testing the new stuff and not the remnants of the old. Hope you find something that does the trick...

=====
Bloggyland.com
Hosting for pre-tuned/pre-configured Drupal installations
No set-up time, instant fully-functioning site with many extra modules
Drupal specific support, SSH/FTP/cPanel

daflow’s picture

Yes I did erase my cookies, but no succes. Could it have something to do with htaccess file ? more suggestions ?

Thanx in advance.

Greetz

daflow

calebgilbert’s picture

but this is the main place to keep an eye on for new developments (the issues thread which is marked critical):

http://drupal.org/node/60584

=====
Bloggyland.com
Hosting for pre-tuned/pre-configured Drupal installations
No set-up time, instant fully-functioning site with many extra modules
Drupal specific support, SSH/FTP/cPanel

skcombs’s picture

I had this problem too. When I tried to login, I got no error message, but the login form was always redisplayed. I looked in the database at the sesssions table and noticed that for every one attempt at a login, 7 sessions were created. One of them, the 4th one, had my userid, but all the rest did not. I made this change to the settings.php which cured the problem:

ini_set('session.auto_start', 0);

I know that .htaccess sets this already, but when I added the line to settings.php, my problem completely disappeared. I can login using IE, Firefox, Netscape. No problem for the past month, no extra sessions being written.

Check your sessions table, and if your problem is like mine, perhaps this will help.

Sandra

drupalworlds’s picture

As I'm using Drupal 6 version and the problem was caused from the other reason/scheme/situation, the solution was not exactly the same as yours.
However, luckily, I could get some inspiration that the Internet Explorer(IE) login probllem/error may have been related with the session matter, especially the code of "session_regenerate_id()".

When I was troubled with the double session problem, I commented out the session_regenerated_id() in the file "includes/session.inc" and add some ini_set() lines in the file "default/settings.php".
After then, I could not login in IE otherwise the other browsers have no trouble for login.
As Drupal 6 is a different system, I should not commented out the the session_regenerated_id().

After then, I could login in the IE.

Thanks.

Fons-1’s picture

I think I've found a clue to what may be at the base of the problem that seems to be a pain to many users. I've got a site to which I forward a domain, www.artivocali.org, and I can't login with it form IE, although I can from firefox. I can login form IE if I don't use the forwarding from www.artivocali.org, but access the server imediately.

I noticed that firefox displays the url to which the www.artivocali.org is forwarded, and IE does not. It keeps displaying http://www.artivocali.org

I'm using PHP4.x, Apache2, on Suse9.3 with drupal 4.7

On this site, they hint at the solution for users, but I don't want to burden my users with this. I tried and it works, so it has to do something with the IE forwarding policy.

http://forums.oracle.com/forums/click.jspa?searchID=-1&messageID=1138452

Another one:
http://www.phpfreaks.com/forums/index.php?topic=102792.msg410443

Can anyone turn this into a global drupal solution?

Thanks

calebgilbert’s picture

...and you probably want to look at doing a 301 redirect instead of whatever setup you have now for more reasons than one:

http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm

=====
Bloggyland.com
Hosting for pre-configured Drupal installations
Instantly activated, Drupal specific support
Also: HigherVisibilityWebsites.com

Fons-1’s picture

It seems to me that the user at the top is describing the same issue, and that the solution provided on the links I mention do the trick.

I would do the 301 redirect, but the provider I am currently with only provides the domain by forwarding. I'm thinking of changing to another domain-provider, but I would like to try to get a solution without having to move. Besides, I thought maybe this could help the drupal community.

I've never experienced any toubles login in to drupal with firefox, nor IE, if I just connect with the IP of my server, neither with drupal 4.6 nor with drupal 4.7, so I thought this might have been the reason that drupal didn't work. If the drupal community is absolutely convinced that the problem doesn't have to do anything with this, fine with me, but I've nowhere seen an accurate describtion of the problem, nor a solution that fits this problem. It seems nobody really knows where this bug is coming from. If there is, I welcome this person to share it with me and the other users, since it's giving me a really hard time setting up this new website.

Kind Regards