• On running wp-install at https://www.smowton.f2s.com/clara/wp-admin/wp-install.php…

    (Host: Freedom2Surf. Database server: Mine. PHP: 4.2.2. MySQL: 5.0.16.)

    Here are the errors:

    WordPress database error: [Field ‘link_notes’ doesn’t have a default value]
    INSERT INTO wp_links (link_url, link_name, link_category, link_rss) VALUES (‘https://blog.carthik.net/index.php’, ‘Carthik’, 1, ‘https://blog.carthik.net/feed/’);

    WordPress database error: [Field ‘link_notes’ doesn’t have a default value]
    INSERT INTO wp_links (link_url, link_name, link_category, link_rss) VALUES (‘https://blogs.linux.ie/xeer/’, ‘Donncha’, 1, ‘https://blogs.linux.ie/xeer/feed/’);

    WordPress database error: [Field ‘link_notes’ doesn’t have a default value]
    INSERT INTO wp_links (link_url, link_name, link_category, link_rss) VALUES (‘https://zengun.org/weblog/’, ‘Michel’, 1, ‘https://zengun.org/weblog/feed/’);

    WordPress database error: [Field ‘link_notes’ doesn’t have a default value]
    INSERT INTO wp_links (link_url, link_name, link_category, link_rss) VALUES (‘https://boren.nu/’, ‘Ryan’, 1, ‘https://boren.nu/feed/’);

    WordPress database error: [Field ‘link_notes’ doesn’t have a default value]
    INSERT INTO wp_links (link_url, link_name, link_category, link_rss) VALUES (‘https://photomatt.net/’, ‘Matt’, 1, ‘https://xml.photomatt.net/feed/’);

    WordPress database error: [Field ‘link_notes’ doesn’t have a default value]
    INSERT INTO wp_links (link_url, link_name, link_category, link_rss) VALUES (‘https://zed1.com/journalized/’, ‘Mike’, 1, ‘https://zed1.com/journalized/feed/’);

    WordPress database error: [Field ‘link_notes’ doesn’t have a default value]
    INSERT INTO wp_links (link_url, link_name, link_category, link_rss) VALUES (‘https://www.alexking.org/’, ‘Alex’, 1, ‘https://www.alexking.org/blog/wp-rss2.php’);

    WordPress database error: [Field ‘link_notes’ doesn’t have a default value]
    INSERT INTO wp_links (link_url, link_name, link_category, link_rss) VALUES (‘https://dougal.gunters.org/’, ‘Dougal’, 1, ‘https://dougal.gunters.org/feed/’);

    WordPress database error: [Field ‘category_description’ doesn’t have a default value]
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename) VALUES (‘0’, ‘Uncategorized’, ‘uncategorized’)

    WordPress database error: [Field ‘post_excerpt’ doesn’t have a default value]
    INSERT INTO wp_posts (post_author, post_date, post_date_gmt, post_content, post_title, post_category, post_name, post_modified, post_modified_gmt) VALUES (‘1’, ‘2005-12-06 09:34:07’, ‘2005-12-06 09:34:07’, ‘Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!’, ‘Hello world!’, ‘0’, ‘hello-world’, ‘2005-12-06 09:34:07’, ‘2005-12-06 09:34:07’)

    Warning: Invalid argument supplied for foreach() in /web/sites/213/smowton/www.smowton.f2s.com/wordpress/wp-admin/upgrade-functions.php on line 30

    When subsequently logging into the admin dashboard, I get an apparently working page preceded by

    Warning: Invalid argument supplied for foreach() in /web/sites/213/smowton/www.smowton.f2s.com/wordpress/wp-includes/functions.php on line 1161

    When logging into the blog proper, I get what you see at https://www.smowton.f2s.com/clara, including the error

    Warning: Invalid argument supplied for foreach() in /web/sites/213/smowton/www.smowton.f2s.com/wordpress/wp-includes/template-functions-category.php on line 311

    No categories

    As well as a remarkable absence of the default test post it looks like the script was trying to install!

    Thanks for any help you can give

    chris

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter smowton

    (@smowton)

    Okay I’ve fixed some of this by manually mangling the database; the initial post now shows up once I specified values for ‘post_excerpt’, ‘to_ping’, ‘pinged’ and ‘post_content_filtered’. Also I added a category using the dashboard, removing most of the errors. However, despite all this I still can’t actually post anything! It just says “post saved: view site” and doesn’t do a damn thing — looking at the server, nothing goes into the wp-posts table though the software believes iself successful…

    Thread Starter smowton

    (@smowton)

    One last note: Looking at the DB command string in post.php for filling in the wp-posts table, it doesn’t seem to specify a ‘pinged’ value. When I was manually entering the Hello World post, this was one of the fields it complained about not having a default value. Could this be the problem?

    Thread Starter smowton

    (@smowton)

    OK nevermind, fixed it. MySQL5 appears to have a “strict mode” in which it enforces such things. Since MySQL5 is going to become more and more common, shouldn’t WordPress really support it?

    how did u fix it?

    im getting the same exact error

    MySQL 5 strict mode enforces schema integrity. The problem with WordPress (indeed, most OSS written with MySQL in mind) is that it creates a database schema but then fails to adhere to it. In the past, MySQL only generated warnings when this occurred, but in strict mode it acts more like an enterprise database system and throws errors instead of warnings.

    There are three ways to fix this.

    First, do not use strict mode. But as smowton noted, it is far better to use strict mode since it enforces good code. There is, unfortunately, a lot of sloppy database code out there.

    Second, you can modify the database schema either by editing the WP installer/upgrade file, or directly modifying the database after installing.

    Third, and this would be the preferred method I think, you can go through the source and correct the SQL commands that cause the errors.

    So that you know, the current betas of WP 2.0 install just fine in strict mode, although commenting is currently broken due to the same issue (bad INSERT syntax in the WP codebase). HOPEFULLY, this will be fixed in the final 2.0 release, especially since there is already a patch on the trac site that fixes commenting in strict mode.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘String of non-fatal MySQL errors on wp-install’ is closed to new replies.