Newbie here. I'm running Drupal 6.10. I have a nice multisite installation. (I modeled it largely after the references listed at the end of this post.)

It currently has one site running and everything is working perfectly -- and has been working for about 6 weeks.

Now I am adding another site. (EDIT: For the 2nd site I'm starting clean and not importing any data.) I'm following all the installation steps, yet I cannot get past the database errors. The installation step is not setting up the database tables and I cannot figure out why.

In searching around I found some similar problems posted without solutions:
http://drupalbin.com/8044
http://forums.devside.net/index.php?topic=1740.0

Here are my errors:

------------------------------
Warning: Table 'drupal.access' doesn't exist query: SELECT 1 FROM access WHERE type = 'host' AND LOWER('11.22.33.44') LIKE LOWER(mask) AND status = 0 LIMIT 0, 1 in /var/www/drupal-6.10/includes/database.mysql.inc on line 128

Warning: Table 'drupal.users' doesn't exist query: SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid WHERE s.sid = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' in /var/www/drupal-6.10/includes/database.mysql.inc on line 128

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/drupal-6.10/includes/database.mysql.inc:128) in /var/www/drupal-6.10/includes/bootstrap.inc on line 1029

Warning: Table 'drupal.cache' doesn't exist query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'variables' in /var/www/drupal-6.10/includes/database.mysql.inc on line 128

Warning: Table 'drupal.variable' doesn't exist query: SELECT * FROM variable in /var/www/drupal-6.10/includes/database.mysql.inc on line 128

Warning: Table 'drupal.cache' doesn't exist query: UPDATE cache SET data = '', created = 1241631464, expire = 0, headers = '', serialized = 0 WHERE cid = 'variables' in /var/www/drupal-6.10/includes/database.mysql.inc on line 128

Warning: Table 'drupal.system' doesn't exist query: SELECT name, filename, throttle FROM system WHERE type = 'module' AND status = 1 AND bootstrap = 1 ORDER BY weight ASC, filename ASC in /var/www/drupal-6.10/includes/database.mysql.inc on line 128

Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal-6.10/includes/database.mysql.inc:128) in /var/www/drupal-6.10/includes/bootstrap.inc on line 630

Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal-6.10/includes/database.mysql.inc:128) in /var/www/drupal-6.10/includes/bootstrap.inc on line 631

Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal-6.10/includes/database.mysql.inc:128) in /var/www/drupal-6.10/includes/bootstrap.inc on line 632
Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal-6.10/includes/database.mysql.inc:128) in /var/www/drupal-6.10/includes/bootstrap.inc on line 632

Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal-6.10/includes/database.mysql.inc:128) in /var/www/drupal-6.10/includes/bootstrap.inc on line 633

Warning: Table 'drupal.url_alias' doesn't exist query: SELECT COUNT(pid) FROM url_alias in /var/www/drupal-6.10/includes/database.mysql.inc on line 128

Multisite install references:
-----------------------------------
http://www.4ldesigns.com/4l/a-simple-drupal-multisite-configuration-usin...
http://justinhileman.info/blog/2007/06/a-more-secure-drupal-multisite-in...
http://blog.jbhannah.net/2008/07/10/drupal-multisite-clean-urls-and-ligh...
http://drupal.org/node/305020

Comments

cog.rusty’s picture

Try to keep things as simple as possible until it works, and only then try to use that "secure" scheme.

A few obvious things to check:
- Does the database user has the permissions needed for the database specified in $db_url?
- Does drupal has permissions to write a settings.php file in the sites/example.com directory?
- Does the default.settings.php file still exist in sites/default? (It is required there -- it shouldn't have been renamed or deleted.)
See also INSTALL.txt, "INSTALLATION", section 2.

And a few less obvious:
- Does install.php (and update.php) select the settings.php of the right site to get the right $db_url where it is going to create the tables?
- Does index.php select the settings.php of the right site to get the right $db_url? (in case it checks a different database for the tables)
- Does the HTTP request clearly match a sites/example.com name, according to the rules listed in the comments in settings.php?

Because the above selection is based on the HTTP request received by the server (which is compared with your sites/example.com names), you may need to find out whether the request comes through correctly. Go to themes/garland/maintenance-page.tpl.php (the template used for install.php and update.php) and add:

<?php print '<strong>Requested domain: </strong>'. $_SERVER['HTTP_HOST'] .'<br />'; ?>
<?php print '<strong>Requested URL path: </strong>'. $_SERVER['REQUEST_URI'] .'<br />'; ?>

just before the print $help line. Then browse to each different site's install.php or update.php to see whether the right request for each site is received.

You could do the same in page.tpl.php to see if the same request is received by index.php.

MountainX’s picture

I got a new site to install. Here are the things I did:

First, I extracted a clean set of Drupal 6.10 files. I copied index.php, install.php and update.php into my installation (overwriting my files). Then I did the same for the default.settings.php file. I looked for any other files like this, but I don't think there were any others I overwrote. I believe all that changed when I did this were the permissions, but I wanted to make sure everything was unmodified from standard, so I just overwrote the files.

- Does drupal has permissions to write a settings.php file in the sites/example.com directory?
I had made this file read only, so I made sure write permissions were granted.

- Does the default.settings.php file still exist in sites/default? (It is required there -- it shouldn't have been renamed or deleted.)
See also INSTALL.txt, "INSTALLATION", section 2.
it was there, but I copied it again.

Once I did all that, it started working! :)

[snip]
You could do the same in page.tpl.php to see if the same request is received by index.php.

I did this too and it verifies things are correct. The home page shows:
Requested domain: new.example.com
Requested URL path: /

Thank you!!! Now I can move on to working on my other problems! But first I'm going to update my new site to 6.11 now that I know it is functioning correctly. Reading the how-to on upgrading makes it seem fairly challenging! I'm going to give it a try.

MountainX’s picture

Now that I have everything working at this site (my new webserver), is there a way to import the content from my old Drupal site (running 6.9) other than importing the entire database?

My other database (the one I want to import) has some problems, so that's why I'm wondering if I can import just the content (without the stuff in the system table such as the module paths).

cog.rusty’s picture

This can be difficult. Some modules which control data make changes to their underlying database schema from version to version, and the system table holds information about module versions.

If you reset their version information, then even if you find and upload the module versions which correspond to your current database schema, their next update will try to begin the database changes from zero.

So, it may take much manual tinkering to get it to import the content correctly.