This is not really an "upgrade problem", but it is the best fit as far as I can tell.

I moved a site I developed on a site using mysql 4.1 to a server using mysql 4.0. I used the 4.0 compatibility flag as suggested here (and in other places) when exporting.

The site looks fine and navigates fine, however, when I go to log in, I get the following errors:

Warning: Duplicate entry '0' for key 1 query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', 'Duplicate entry '0' for key 1\nquery: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'user', 'Session opened for <em>Webmaster</em>.', 0, '', 'http://wisdomword.com/user', 'http://wisdomword.com/user', '64.4.106.234', 1157693073) in /home/wisdom/public_html/includes/database.mysql.inc on line 120.', 2, '', 'http://wisdomword.com/user', 'http://wisdomword.com/user', '64.4.106.234', 1157693073) in /home/wisdom/public_html/includes/database.mysql.inc on line 120

Warning: Duplicate entry '0' for key 1 query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', 'session_regenerate_id(): Cannot send session cookie - headers already sent by (output started at /home/wisdom/public_html/includes/database.mysql.inc:120) in /home/wisdom/public_html/modules/user.module on line 943.', 2, '', 'http://wisdomword.com/user', 'http://wisdomword.com/user', '64.4.106.234', 1157693073) in /home/wisdom/public_html/includes/database.mysql.inc on line 120

Warning: Duplicate entry '0' for key 1 query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', 'Cannot modify header information - headers already sent by (output started at /home/wisdom/public_html/includes/database.mysql.inc:120) in /home/wisdom/public_html/includes/common.inc on line 266.', 2, '', 'http://wisdomword.com/user', 'http://wisdomword.com/user', '64.4.106.234', 1157693073) in /home/wisdom/public_html/includes/database.mysql.inc on line 120

I did disable all contrib modules before exporting.

I also tried disabling all the modules, but that produced the same error.

I am using phpmyadmin for these exports and imports.

I am stumped! Has anyone had a similar experience and persevered?

Many thanks for any help.

Chapman

Comments

unrev.org’s picture

Just wanted to also say that I tried this, which is - I believe - essentially the same as exporting as 4.0 compatible.

unrev.org’s picture

In case these are helpful, I checked all of the tables with phpmyadmin and got these errors:

Problems with indexes of table `node`
PRIMARY and INDEX keys should not both be set for column `nid`
More than one INDEX key was created for column `status`

Problems with indexes of table `term_hierarchy`
PRIMARY and INDEX keys should not both be set for column `tid`

Problems with indexes of table `term_node`
PRIMARY and INDEX keys should not both be set for column `tid`

I don't know what to do with them myself as I am very inexperienced with working with databases, but they might give someone a clue!

Thanks.

unrev.org’s picture

I just checked for these same problems on the database that I exported from, and they are the same, but the site works fine.

So this is most likely not related.

unrev.org’s picture

OK - so I realized that I had managed to log in on another browser when I moved the site over originally. I still cannot log in using the first account, nor other accounts when using another browser.

Since I discovered that I still have admin privileges on the first browser, I posted a blog entry to reproduce the errors I experienced when doing that. Here they are:

Warning: Duplicate entry '0' for key 1 query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', 'Duplicate entry '0' for key 1\nquery: INSERT INTO url_alias (src, dst) VALUES ('node/297', 'blog/webmaster/sep/08/2006/test') in /home/wisdom/public_html/includes/database.mysql.inc on line 120.', 2, '', 'http://www.wisdomword.com/node/add/blog', 'http://www.wisdomword.com/node/add/blog', '64.4.106.234', 1157697635) in /home/wisdom/public_html/includes/database.mysql.inc on line 120

Warning: Duplicate entry '0' for key 1 query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', 'Duplicate entry '0' for key 1\nquery: INSERT INTO url_alias (src, dst) VALUES ('pathauto/node/blog/webmaster/sep', 'blog/webmaster/sep') in /home/wisdom/public_html/includes/database.mysql.inc on line 120.', 2, '', 'http://www.wisdomword.com/node/add/blog', 'http://www.wisdomword.com/node/add/blog', '64.4.106.234', 1157697635) in /home/wisdom/public_html/includes/database.mysql.inc on line 120

Warning: Duplicate entry '0' for key 1 query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', 'Duplicate entry '0' for key 1\nquery: INSERT INTO url_alias (src, dst) VALUES ('pathauto/node/blog/webmaster/sep/08', 'blog/webmaster/sep/08') in /home/wisdom/public_html/includes/database.mysql.inc on line 120.', 2, '', 'http://www.wisdomword.com/node/add/blog', 'http://www.wisdomword.com/node/add/blog', '64.4.106.234', 1157697635) in /home/wisdom/public_html/includes/database.mysql.inc on line 120

Warning: Duplicate entry '0' for key 1 query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', 'Duplicate entry '0' for key 1\nquery: INSERT INTO url_alias (src, dst) VALUES ('pathauto/node/blog/webmaster/sep/08/2006', 'blog/webmaster/sep/08/2006') in /home/wisdom/public_html/includes/database.mysql.inc on line 120.', 2, '', 'http://www.wisdomword.com/node/add/blog', 'http://www.wisdomword.com/node/add/blog', '64.4.106.234', 1157697635) in /home/wisdom/public_html/includes/database.mysql.inc on line 120

Warning: Duplicate entry '0' for key 1 query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', 'Duplicate entry '0' for key 1\nquery: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'content', '<em>blog</em>: added <em>Test</em>.', 0, '<a href=\\"/node/297\\">view</a>', 'http://www.wisdomword.com/node/add/blog', 'http://www.wisdomword.com/node/add/blog', '64.4.106.234', 1157697636) in /home/wisdom/public_html/includes/database.mysql.inc on line 120.', 2, '', 'http://www.wisdomword.com/node/add/blog', 'http://www.wisdomword.com/node/add/blog', '64.4.106.234', 1157697636) in /home/wisdom/public_html/includes/database.mysql.inc on line 120

Warning: Duplicate entry '0' for key 1 query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', 'Cannot modify header information - headers already sent by (output started at /home/wisdom/public_html/includes/database.mysql.inc:120) in /home/wisdom/public_html/includes/common.inc on line 266.', 2, '', 'http://www.wisdomword.com/node/add/blog', 'http://www.wisdomword.com/node/add/blog', '64.4.106.234', 1157697636) in /home/wisdom/public_html/includes/database.mysql.inc on line 120

The strange thing is that when I click back in the browser, the entries actually do get recorded and displayed on the site, but the errors fill up a white page (as opposed to red errors on a Drupal page). (FYI - the original errors I posted also occur on a white page and not a Drupal page.)

OK - that's the latest from my attempts to get things running at 3 in the morning!

Chapman