Domain access failed to load during phase: 1. Please check your settings.php file and site configuration.

In spite of message the site(s) seem to be working both for logged in as well as visitor but on the default domain I get this message, The message doesn't appear on subdomains. I believe I followed everything correctly disabled all domain access modules, replace with new domain access modues then enabled all domain modules then rebuilt permissions then ran update.php. I run following
Apache version 2.2.20
PHP version 5.2.17
MySQL version 5.0.92

Comments

Road Runner’s picture

I forgot to mention I also get this

Status message 1 database table(s) were updated.
Error message
Domain access failed to load during phase: 1. Please check your settings.php file and site configuration.
This repeats Domain Source has a domain_id of 0 and needs to be updated for compatibility. even though the database report says a table was updated.

agentrickard’s picture

Category: bug » support

The 'phase 1' failure means that domain_resolve_host() did not return a valid domain. make sure that you have a default domain set properly on the overview page. /admin/structure/domain

You may have to run the "zero records" update again. See the instructions here: https://drupal.org/node/1280656

agentrickard’s picture

It is possible that not having a default domain set is causing the second update to fail.

agentrickard’s picture

Status: Active » Postponed (maintainer needs more info)

I just performed a proper upgrade using the documented instructions.

Road Runner’s picture

Still same problem. It says it updated the database table but then I continue to get warning messages but only on the default domain I don't see error messages on sub domain. I've tried numerous times only to retreat to 7..29 I was wondering would I lose anything if I uninstalled Domain access then reinstalled using 3.0 rc 5

agentrickard’s picture

Let's start over.

  1. Did you follow the upgrade instructions?
  2. What is the content of the {domain} table in your database?
  3. On what URL do you get warning messages?
  4. What is the content of the warning messages?
  5. Is your default domain set?
Road Runner’s picture

Well I thought I would give this another try. I upgraded to D7.10 so after that I followed instructions to upgrade from 7x2.9 to 7.3. I get this error
Domain access failed to load during phase: 1. Please check your settings.php file and site configuration.
My Domain IDs are 0,2 and 3 if that makes any difference. The domain with ID 0 is default.
The error only appears on default domain.

I have rebuilt permissions etc.

I am tempted to uninstall then reinstall all the Domain Access but I wonder if I will lose anything- I have content to worry about. Advice as to fix this or where in database tables I should go to fix manually.
thanks

agentrickard’s picture

Status: Postponed (maintainer needs more info) » Active

After the upgrade to 7.x.3, you should no longer have a 0 record in the {domain} table. This is the root of all your problems. The warning message indicates that you do not have a default domain set properly.

Have you run the database upgrades properly?

Specifically, you need to ensure that domain_update_7300 through domain_update_7306 have run. One way to check is to see if the variable 'domain_root' is still in the {variable} table.

domain_update_7303() is the critical update that changes the 0 record and sets the new default domain.

agentrickard’s picture

You should also ensure that you replaced all the domain files. I have seen cases where people think they have updated the code, but have only updated select files.

Road Runner’s picture

I finally got tired of this, backed up database and uninstalled Domain module, then reinstalled it and everything appears to be OK. I had to recreate my subdomains but most everything auto-filled making that easy. Unless yo know about some hidden gotcha - this was easy.
Thanks for your prompt help BTW. You can see site if you are so inclined here http://kitchenandculture.com with 2 subdomains.

agentrickard’s picture

Status: Active » Closed (cannot reproduce)

Sorry for the trouble. If you are building a brand new site, re-installing (using 7.x-3.1) is fine, because it only takes a few minutes to re-create the domains. (You can add domains with drush now, too.)

What I'm concerned about is what happened to make the upgrade fail, because I can't replicate that.

Anyway, let's close this one and we'll see if anyone else runs into a similar problem.

Note: The Domain Switcher block is intended for administrators only. If you want to expose that feature to end users, I suggest using Domain Nav.

Road Runner’s picture

Thanks for tip on domain switcher - site isn't new but still the reinstall was the easiest method. I am active user of this so if you need some help I may be able to pitch in from time to time. That said we are launching new business, I'm teaching myself iPhone programming & Objective-C and trying to find steady work so I can feed myself until everything kicks in.

julia_g’s picture

Same thing happened to me. I've followed all the instructions and ran database updates with no errors, but the default domain with id 0 is still there. I've switched back to 7.2 and updated again, this time with Drush - same thing.
I can't install from scratch because I have content in subdomains. Hopefully there's a simple way to manually update the database.

julia_g’s picture

I think I got it. For some reason, domain_id in the domain table wasn't auto increment, so update 7303 couldn't run. I made it auto increment and everything worked.

UnitedVision’s picture

Followed the instructions.
Backed up Site & Database.
Turned off Domain Access.
Removed Domain folder from Server.
Uploaded New Domain folder for 7.3
Tried update.php script ...

Tried upgrading to domain access 7.3 from 7.2.19 and I got the following error:
7300 - Remove references to row 0.
This update will been skipped due to the following missing dependencies: domain_update_7303

Not sure what to do here. Followed the instructions but it will not go past update.php.
It shows the 5 or 6 potential updates, but says they will be skipped?

What am I missing?

agentrickard’s picture

Status: Closed (cannot reproduce) » Active

You have to re-open closed issues (or re-file new ones) or I never see it.

That update 7300 message is likely coming from another module, yes? Domain Conf has that dependency. When you disable Domain Access, make sure you disable its submodules as well.

Otherwise, this sounds to me like a core bug, as the updates need to run in stated order. That is, domain_update_7303 must run before domain_conf_update_7300.

What is the 'schema' value of the 'domain' module in your {system} table?

UnitedVision’s picture

Sorry about not re-submitting the ticket.

The schema says -1 after I have unchecked it from the modules page.

agentrickard’s picture

It sounds like you uninstalled Domain module instead of just disabling it. Re-enable it before running the update.

agentrickard’s picture

Those instructions look wrong to me, too. Looks like someone made a bad edit.

agentrickard’s picture

Status: Active » Closed (cannot reproduce)
UnitedVision’s picture

Late response... but I eventually figured it out.

I had to go into PHP my admin and disable all modules manually and set Status to 0.
However, the SCHEMA of the main domain module was still -1 even after disabling the module & submodules.

So after changing the main Drupal module schema to 0 manually in PHPmyadmin...
The update was allowed to go through and the upgrade complete!

Thank you again to all the maintainers of the domain module! by far 1 of the best on drupal!

Hope my experience helps somebody else!