Infinite loop on secondary domain(s)

bleen18 - November 10, 2009 - 18:12
Project:Domain Access
Version:6.x-2.0
Component:Code
Category:support request
Priority:critical
Assigned:Unassigned
Status:closed
Description

Developing on local machine with MAMP 1.8.3 (php 5.2.11 | mySQL 5.1.37)

PROBLEM:
browsing to non-primary domains result in infinite loop: "Firefox has detected that the server is redirecting the request for this address in a way that will never complete."
Note: I am not using sub-domains for this project, but rather completely separate domains

STEPS TAKEN:
1. downloaded module
2. added abc.com & xyz.com to /etc/hosts
3. added abc.com & xyz.com as vhosts in httpd.conf all pointing to 127.0.0.1
4. restarted apache (and firefox)
5. added line to settings.php (as last line): include './sites/all/modules/domain/settings.inc';
6. installed "domain access" module (no ohter domain mods installed)
7. domain module automatically created www.abc.com as primary domain (I made no settings changes)
8. added xyz.com as domain record (default settings)
9. browse to abc.com works fine ... browse to xyz.com results in infinite loop (note: I've tried both xyz.com & www.xyz.com with same result)

I have read every issue I can find, but cannot seem to find a solution here. Thoughts?
Alex

#1

bleen18 - November 10, 2009 - 18:36
Status:active» closed

BLAAARG!!

For anyone else who is having this problem - here is what I was doing to mess up the works. Because I have several developers working on this project we added the following lines to our settings.php in order to let everyone develop locally:

switch($_SERVER['HTTP_HOST']){
  case 'local1.abc.com'
    $db_url = 'mysqli://user:*****@localhost1/db';
    break;
  case 'local2.abc.com'
    $db_url = 'mysqli://user:*****@localhost2/db';
    break;
  case 'www.abc.com'
    $db_url = 'mysqli://user:*****@prod.mysql.host/db';
    break;
}

Well ... once we added the secondary domain names, then $db_url ended up empty string. (we added case satements for each secondary domain and life was good)

So if you are having infinite loop problems... step 1 in debugging should be to add this line print "dburl: ".$db_url; directly above your include './sites/all/modules/domain/settings.inc';

 
 

Drupal is a registered trademark of Dries Buytaert.