Hi,
I love this module and have been using it for ages.
I currently have a problem trying to migrate on of my sites to another server.

I can actually use back and migrate to restore the site on my local MAMP server but when I try on the new server it crashes out.

Basically, in safari, the blue bar gets as far as http://, it hangs for about a minute and then crashes out.
Afterwards it reads:

Warning: Table 'mydb.users' doesn't exist query: SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid WHERE s.sid = 'ltnk51rddu0lqiakgrbogjgci2' in /home/www/mywebsite.com/htdocs/includes/database.mysql.inc on line 128

arning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/www/mywebsite/htdocs/includes/database.mysql.inc:128) in /home/www/www.mywebsite.com/htdocs/includes/bootstrap.inc on line 1031

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

Warning: Table 'gnw.variable' doesn't exist query: SELECT * FROM variable in /home/www/mywebsite/htdocs/includes/database.mysql.inc on line 128

Warning: Table 'gnw.cache' doesn't exist query: UPDATE cache SET data = '', created = 1244767267, expire = 0, headers = '', serialized = 0 WHERE cid = 'variables' in /home/www/mywebsite/htdocs/includes/database.mysql.inc on line 128

Warning: Table 'gnw.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 /home/www/mywebsite/htdocs/includes/database.mysql.inc on line 128

As I know it works locally it must be something to do with some settings somewhere.

In the php.ini it is pumped more than my local server:

max_execution_time = 300     ; Maximum execution time of each script, in seconds
max_input_time = 600	; Maximum amount of time each script may spend parsing request data
memory_limit = 256M      ; Maximum amount of memory a script may consume (8MB)

This is usually what I have found to cause a problem.

Does anyone have any idea of what I need to change, tweak or do to get it working?

Like I said....works on the local MAMP server and my test Site but not on the new server?

*Also I 'm not a server guy so sorry if I can't answer any specific technical server details...

Thanks.

Comments

dman’s picture

Warning: Table 'mydb.users' doesn't exist
... so have you checked that?
Getting this means your login credentials are correct, but your database in not populated.
Warning: Table 'gnw.cache' doesn't exist query:
And are you really trying to connect to two different database at once? Or did you just rewrite some of the messages to deliberately confuse anyone who's trying to help?

Bensbury’s picture

Hi,

Thanks for the quick response.

Regarding the empty tables, I repeated the exact same install and restore and my test server and it worked fine.
Also the fresh install on the new site works fine, so I would expect that cache must exist.
But I'll check it.

As for the second question:

Yes I deliberately renamed some of the message on purpose to confuse people, so they wouldn't be able to help me, because that would be a really clever thing to do and benefit everyone.
In fact there is nothing I like to do better than sabotage my own support requests, confuse helpful people and prevent myself from fixing problems (all before lunchtime!).....and I didn't at all want to make the messages generic and then miss out the DB entries in doing so.

So I'm not writing to two DB, but I did try to rewrite the messages to make it appear generic but made a mistake.
Sorry.

Now if you don't mind me asking...... do you usually ask questions to people looking for support in a sarcastic and slightly offensive fashion or are you trying to prevent Drupal's new popularity in the mainstream? :p

Anyway... that's what's happening and the cache does appear to be there, as does the other tables.

dman’s picture

Short answer, yes, I do often reply to badly-put support requests with a tongue-in-cheek attitude. I usually also provide enough clues to prompt people in the right direction at the same time - but will not hand-hold if the way the question was asked was annoying.

I have helped thousands in this forum, and there are an unfortunate number who leave out or sometimes actually obscure, change or delete the required information. Too often the 'code' pasted turns out not to be the actual code, but an interpretation thereof - occasionally a version of the code that does not contain the typo or error that we are being asked to diagnose. You may be able to imagine that this gets frustrating as we end up debugging the wrong problem.

It is altogether possible (although rare) to have configured Drupal to work with two databases at once. If you had in fact done so - as your posting declared - that would have been a vital detail about your set-up that you'd left out. I guessed not, but that required telepathy. Expending my telepathy needlessly makes me grumpy.

To your problem - when you look at the first message
Warning: Table 'mydb.users' doesn't exist
... you have logged onto your server and via phpmyadmin or mysql client ... that database and that table really is accessible using the login credentials in your settings.php?
So that error message is false?

It really is probably that either Table 'mydb.users' doesn't exist or possibly that it's looking at the wrong database altogether. Normally looking for the wrong database could fail badly - but there is a small overlap where it could succeed - yet be looking in the wrong place. This is only likely if using generic or shared usernames and passwords across systems, so shouldn't happen a lot.

Bensbury’s picture

I've got into mysql now.
My boss is making me use terminal rather than have something friendly like phpAdmin, so took a while.

Before I back up gnw.cache is most definitely there.

We found another error from a manual dump:

specified key was too long; max key length is 767 bytes

I've tracked this to some UTF-8 issue which I'm researching but not sure if this is the cause or not.

He has put some fruity UTF-8 command in the .cnf file

default-character-set=utf8
<code>
Which might also have something to do with it.

Here's the error messages again
<code>

Warning: Table 'gnw.cache' doesn't exist query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'variables' in /home/www/www.website.com/htdocs/includes/database.mysql.inc on line 128

Warning: Table 'gnw.cache' doesn't exist query: UPDATE cache SET data = 'a:31:{s:13:¥"theme_default¥";s:12:¥"network¥";s:13:¥"filter_html_1¥";i:1;s:18:¥"node_options_forum¥";a:1:{i:0;s:6:¥"status¥";}s:18:¥"drupal_private_key¥";s:64:¥"7cd928465ca55f570b8b93dbb75d1c5f849f30f5ff855985c76418b3ed1e93c4¥";s:10:¥"menu_masks¥";a:23:{i:0;i:63;i:1;i:62;i:2;i:61;i:3;i:59;i:4;i:58;i:5;i:56;i:6;i:45;i:7;i:31;i:8;i:30;i:9;i:29;i:10;i:24;i:11;i:22;i:12;i:21;i:13;i:15;i:14;i:14;i:15;i:11;i:16;i:10;i:17;i:7;i:18;i:6;i:19;i:5;i:20;i:3;i:21;i:2;i:22;i:1;}s:12:¥"install_task¥";s:4:¥"done¥";s:13:¥"menu_expanded¥";a:0:{}s:16:¥"language_default¥";O:8:¥"stdClass¥":11:{s:8:¥"language¥";s:2:¥"en¥";s:4:¥"name¥";s:7:¥"English¥";s:6:¥"native¥";s:7:¥"English¥";s:9:¥"direction¥";s:1:¥"0¥";s:7:¥"enabled¥";i:1 in /home/www/www.website.com/htdocs/includes/database.mysql.inc on line 128

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

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

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

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

........actually you have just given me an idea

Okay! I am pretty sure it is the UTF-8 max Key size mySQL 6 issue.

All my other sites run mySQL 5.
I don't think I am able to switch mySQL back to 5 so unless there is a work around, I'm going to have to rebuild it.

Bensbury’s picture

Title: Back Up and Migrate Crashes out on Restore » Back Up and Migrate Crashes out on Restore: mySQL6 [SOLVED]

MYSQL 6 has a 'feature' that has reduced the max key length of keys.
These monster screws things up when using utf-8 and there were quite a few angry people on the mySQL site ;)

The way to fix it is to open up your Back UP sql file (it's only really a text file).

Then do a search replace on varchar(256) and replace with varchar(190);

190 seems to be the magic number for me and from there everything restored swimmingly ;)

ronan’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.