Linux 软件免费装

Incorrect Datetime Bug Fix

开发者 eddiemoya
更新时间 2013年1月8日 03:49
捐献地址: 去捐款
WordPress版本: 3.2.1

标签

timestamp sql bug mysql sql_mode no_zero_date no_zero_in_date

下载

1.0 1.1

详情介绍:

This plugin was create to work around a problem caused by certain configurations in MySQL that lead to several odd symptoms including but not limited to: In addition, this problem is often accompanied by an error like the following: WordPress database error: [Incorrect datetime value: '0000-00-00 00:00:00' for column 'post_date_gmt' at row 1] INSERT INTO 'mg_posts' ('post_author','post_date','post_date_gmt','post_content','post_content_filtered','post_title', 'post_excerpt','post_status','post_type','comment_status','ping_status','post_password','post_name','to_ping','pinged', 'post_modified','post_modified_gmt','post_parent','menu_order','guid') VALUES (’1′,’2011-08-23 03:32:43′, ’0000-00-00 00:00:00′,”,”,’Auto Draft’,”,’auto-draft’,'post’,'closed’,'open’,”,”,”,”,’2011-08-23 03:32:43′,’0000-00-00 00:00:00′,’0′,’0′,”) The inability to pass zero dates breaks the ability to actually create a new post, but it also seems to have the odd secondary effect of confusing the heck out of nonces (noces are a security feature), probably because they too rely on timestamps. This plugin strips out the sql_modes listed below from @@SESSION, thereby eliminating the problem while only effecting database sessions WordPress starts and not the whole database.

安装:

  1. Upload plugin-name.php to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
Will this fix sql_mode during installation? No, plugins are not loaded during installation. For alternative solutions see "Other manifestations, alternative solutions" on the plugin home page Will this effect other applications that might run on the same database, and depend on these sql_mode settings? No, it uses @@SESSION.sql_mode to change the settings for each WordPress session individually. How do I undo what this plugin does? Just turn off the plugin - because it uses @@SESSION, the changes wont persist. If you've made other modifications explained in this plugin's documentation, you will have to run similar SQL commands to apply the old settings.

升级注意事项:

1.1 New version eliminates wpdb::prepare() PHP warnings.

更新日志:

1.0 1.1