Drupal.my | The nightmare begin.. (technical-need help)

Events happening in the community are now at Drupal community events on www.drupal.org.
khalemi's picture

I think we all know about the login/cookie/session problem with firefox 3 on drupal.my

I was called to make the fix and here is the chronology of the event :

Platform : MS Windows XP Pro SP3
Browser : 1. Firefox 3 (3.0.1)
2. IE7

PART A

  1. najibx installed drupal V 5 as an addon in his shared hosting account. Some basics and advanced module and themes was installed.
  2. the site running well but encounter login problem with firefox 3 user.
  3. expected to be server issue, bad modules/files ,etc, I log into the site with admin privileges, disabled all modules. but, problem
    persisted.
  4. najibx transfer the site to our hosting server, so I can look further. Dns was allowed to propagate worldwide for 48 hr.
  5. a new fresh copy of drupal-510 was downloaded and uploaded to server. no additional modules and themes was installed.
  6. drupal was setup with mysqli extension with dpx510 as prefix.
  7. PROBLEM PERSISTED : First account (uid 1) setup is giving Access Denied, cannot log into admin area.
  8. Suspected to be redirection error or session, a few modification was made to the following files :

    1. .htaccess

    // To redirect all users to access the site WITH the 'www.' prefix,
    // (http://example.com/... will be redirected to http://www.example.com/...)
    // adapt and uncomment the following:
    RewriteCond %{HTTP_HOST} ^drupal.my$ [NC]
    RewriteRule ^(.*)$ http://www.drupal.my/$1 [L,R=301]

    RewriteBase /

    1. settings.php

    $base_url = 'http://www.drupal.my'; // NO trailing slash!
    $cookie_domain = 'www.drupal.my';
    later changed to
    $cookie_domain = '.drupal.my';
    $cookie_domain = 'drupal.my';

  9. Firefox browser cache cleared and cookies deleted. Retry on login.

  10. PROBLEM PERSISTED
  11. Dig into drupal.org to find solutions, few modification to settings.php was made

    ini_set('session.cookie_domain', '.drupal.my');

    A different combination of modification was made to the settings.php.

  12. PROBLEM PERSISTED

  13. Site was destroyed and db dropped. A new instance of Drupal (v 6.3) was installed using fantastico deluxe, using default
    install.
  14. PROBLEM PERSISTED
  15. To make sure this is not a server issue, a new php.ini was copied from /etc/php and save to /home/mydrupal.etc chmod 444.
    .htaccess was instructed (PHPRC) to use the new php.ini file which have relaxed setting.
  16. PROBLEM PERSISTED
  17. A new subdomain was created dev.drupal.my. Default drupal install using fantastico was performed.
  18. PROBLEM SOLVED : admin was able to login and confirmed by rajaiskandar
  19. To make sure this is not drupal 5 specific issue, a new drupal 5.10 was installed in dev.hostwaves.com.
  20. PROBLEM SOLVED : admin was able to login and confirmed by rajaiskandarshah

PART B

  1. A Virtual Machine (VM) was deployed inside VmWare Workstation 6 with MS Windows XP Pro SP3, Apache 2.2.8 with mod_ssl,
    PHP 5.2.6 with PECL, MySQL 5.0.51a Essential along with BIND 9.4 and a GPL pop3/smtp mail server was installed in this VM. PHP
    was set to run as apache_module with default php.ini setting with one mysqli extension enabled. NIC was configured to
    self-resolve. Firefox 3 was used as default web browser.
  2. Drupal.my was configured as virtual host running as Name-Based virtual server.
  3. Drupal 5.10 tar package was extracted and installation script was run using mysqli db extension.
  4. PROBLEM PERSISTED ..........
  5. Server components was reconfigured to use drupal.org.my, drupal.com.my.
  6. PROBLEM SOLVED : Login with firefox was successful

EXPLAINATION

  1. To be honest, I have no idea ! I rerun the test with drupal 5.5, and the problem persisted
  2. Add yours below...... :

SOLUTIONS ()

  1. run drupal.my as www1.drupal.my, en.drupal.my or anything like as long as it is a subdomain. A domain forwarding will be
    configured to redirect www.drupal.my or drupal.my to the destination subdomain.
  2. Wait for firefox 3 fix, or Drupal Fix or, Post bug.
  3. Add your solutions below ........ :

Comments

My guess is your PHP version

ckng's picture

My guess is your PHP version or the servers? You didn't mention what version of servers used in Part A, and is it on Windows (or just your browser)?

CK Ng | myFineJob.com


consultation • web design & development • content development • site domain, hosting & maintenance • software design & development

CK Ng | myFineJob.com

not server

khalemi's picture

this is not a server issue. We have many other drupal sites running fine on the same server and the secondary server., najibx can confirm on this as he is having the same issue on his other .my site.

php is version 5.2.6 on both server.

My browser? No.

............
M Khalemi (MCP)
www.hostwaves.com

login workaround

khalemi's picture

Issue fixed.
Firefox 3 users should be able to login now.

Drupal bug. drupal doesn't like domains with a single dot

angch's picture

Got it. Duplicated the bug, Ubuntu 8.04 Hardy, Drupal 6.4.

Looks like a bug related to bootstrap.inc (as khalemi mentioned to me). Drupal's attempting to handle RFC2109's "must contain at least one dot other than the first" causing cookies to be set or send twice. Firefox 3's handling of that differs from other browser's, hence the cookie not "sticking" after login in FF3.

drupal.org's itself appears to be behind a squid http_accel, with the "real domain" being www.drupal.org, so it sidesteps this issue.

This appears to be a longstanding bug that was hidden by non-Firefox 3's cookie conflict resolution procedure and http accelerators or redirectors (see khalemi's workaround about).

I'll poke around and see if I can expose the real source of the bug and fix it. In the meantime, probably just use khalemi's workaround.

You're saying every domain

ckng's picture

You're saying every domain with a single dot such as abc.com, bcd.my will have problem with Drupal?
That's is highly unlikely as most of the websites come with 1 dot and doesn't have problem with Drupal 5 or 6.

CK Ng | myFineJob.com


consultation • web design & development • content development • site domain, hosting & maintenance • software design & development

CK Ng | myFineJob.com

hmmm

khalemi's picture

havent i mentioned in my post?

i resetup the site inside a vm with .com.my, .org.my, dev.drupal.my, .my, .us and .(any) as the virtual host

the site work even the domain end with .hn, .us, .com.my, .org.my. but when .my is used, the login failed.

you can always duplicate the bug on your end and see the result.

Thanks
............
M Khalemi (MCP)
www.hostwaves.com

eihhh

najibx's picture

haven't we installed 100s of drupal site before, and funny enough when we want install drupal.my this kind of things arise.
he he ... sabar sabar .... on another perspective, this is good start for Drupal.my !

and thanks you all for the effort. you are not alone anymore ...

-najibx -
<a href="http://www.successideaweb.com>Drupal web developer | designer in Malaysia

need contributor

khalemi's picture

drupal.my need contributors.

  1. admins
  2. translators
  3. moderators
  4. site developer (modules, themes, config etc..)

dear malaysian, we need your support.

............
M Khalemi (MCP)
www.hostwaves.com

try & error

pensil2b's picture

good job..keep it up

malaysia buleh

I post this issue in drupal

khalemi's picture

I post this issue in drupal core issue list, but till today, no one care to test or found a direct solution.
Or drupal does not care about malaysian community? or running drupal on .my is just another web sites?

............
M Khalemi (MCP)
www.hostwaves.com

I did a little digging -

edkwh's picture

I did a little digging - this issue is not Drupal's fault. It's a Firefox thing. Firefox 3 has a new security feature, Effective TLD:

"Firefox 3 includes a feature called the Effective TLD Service, which examines host names to figure out the effective top-level domain, or the part under which domain names can be registered by the public (examples include .com, .co.uk and .pvt.k12.wy.us). This allows for cookies to be better secured (by, for example, preventing a site from setting a cookie under .co.uk, which could then be read by any .co.uk site) and can also allow for better sorting of history by site. There's no algorithm for determining the effective TLD, so a list has been compiled and made available at publicsuffix.org."
-- http://www.mozillazine.org/articles/article23974.html

The list of allowed TLD (https://wiki.mozilla.org/TLD_List), assuming it's the updated list, only lists .my as a third level domain name (.com.my, .net.my, etc). Hence cookies from [domain].my would be disallowed by Firefox 3; probably causing similar problems on other sites that requires cookies. No fix atm, until the new tld names are added to Firefox's list.

At that time i was blaming

khalemi's picture

At that time i was blaming firefox for the issue, and hence post a bug report also, but i did not come across to

http://www.mozillazine.org/articles/article23974.html
https://wiki.mozilla.org/TLD_List

Thanks.
............
M Khalemi (MCP)
www.hostwaves.com

Drupal Developer Groups in Malaysia

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week