WordPress.org

Ready to get started?Download WordPress

Forums

Posts not saving to database (12 posts)

  1. nathanmo
    Member
    Posted 8 years ago #

    When ever I try to write a new post or add a new page, I click on Publish or Save it never writes the page or post to the database, but it returns back that the Post or Page has been Saved.

    I am running MySQL 5.0 with PHP 4 ISAPI and IIS 6. I moved my site over to this new server and ever since then it stopped working and I am not sure how to fix it.

  2. chaaban
    Member
    Posted 8 years ago #

    are you using mode_rewrite ? if yes : does the new server allow mode_rewrite ?

  3. nathanmo
    Member
    Posted 8 years ago #

    mode_rewrite? I am not using apache. I am using IIS 6. As far as I know there is now mode_rewrite.

  4. nathanmo
    Member
    Posted 8 years ago #

    Another thing is that when I go to change the options, and save them, they do write to the database. But when I try to add a new Page or Post, nothing is saved in the database even though it says it is.

  5. peluso14
    Member
    Posted 8 years ago #

    I have them same problem, I am running a new install, and I am having various errors in WordPress uner MySql 5.0.15. From what I Can see MySql 5.x is much more strict in terms of how it enforces tabel restaraints and default values, ie it won't insert if the sql does not account for all required fields, and no default was given.

    I am still digging to see if I can throw MySql back to not enforcing these rules at this level.

  6. nathanmo
    Member
    Posted 8 years ago #

    Perhaps we can just give wordpress db defaults. I'd also be interested if you could find the answer in MySQL 5.0

  7. nathanmo
    Member
    Posted 8 years ago #

    Actually, it does seem to be a problem with MySQL 5.0 which is really sad. I installed MySQL 4 on my server and it works now.

  8. peluso14
    Member
    Posted 8 years ago #

    It would seem removing STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION from the sql_mode fixes all the issues, or atleast the ones I found.

  9. nathanmo
    Member
    Posted 8 years ago #

    Where do I find these options to remove them?

  10. nathanmo
    Member
    Posted 8 years ago #

    Are they located in the MySQL Administrator?

  11. peluso14
    Member
    Posted 8 years ago #

    Yes under startup...than advanced.

  12. trippfoxx
    Member
    Posted 8 years ago #

    What you may like to consider is, rather than relaxing your entire MySQL5 server, just changing it on a per-session basis.

    For instance, adding:

    mysql_query("set session sql_mode = ''");

    to the function wpdb in wp-db.php (after the successful mysql_connect query) will effectively ignore all the disobeyed NOT NULLs in WordPress's CREATE TABLEs, but only during a WordPress session.

    Note: this is what I came up with as a solution having installed all the latest versions of Apache, PHP, MySQL and WordPress yesterday. Having never used any of the applications listed before, don't be too hard on this solution if there's a better one!

    Cheers

Topic Closed

This topic has been closed to new replies.

About this Topic