WordPress database error "Incorrect datetime value"

You have feature Requests, or some Bugs found within the port of PHPIDS WPIDS? Tell them here.

WordPress database error "Incorrect datetime value"

Postby markp on Tue Jun 10, 2008 11:45 pm

Installed WPIDS 0.1.2 plugin in WordPress 2.5.1 on Win2k3/IIS6 server. When I activate the plugin, I immediately get this error displayed below the footer on every page:

WordPress database error Incorrect datetime value: '2008-06-10T16:36:24-07:00' for column 'date' at row 1 for query INSERT INTO `wp_sec_log` (`id`, `ref_id`, `ip`, `page`, `tag`, `value`, `app`,`type`,`date`,`status`) VALUES (0, 0, '172.16.31.122', '/projects/wp-admin/plugins.php', 'PATH_TRANSLATED', 'EProjects Blogwordpress-2.5.1wordpresswp-adminplugins.php', 0, 'path', '2008-06-10T16:36:24-07:00', 1) made by wpids_log

Frustrating part is that it works fine on development server set up the same way (but obviously something's different). TIA for any suggestions.
markp
 
Posts: 6
Joined: Tue Jun 10, 2008 11:33 pm

Re: WordPress database error "Incorrect datetime value"

Postby Philnate on Mon Jun 16, 2008 6:36 am

I had no chance to test it on a Windows Server at all. But as multiple persons report Problems with it under WP 2.5.1 I'm gonna test it these days. What's your development Server is this a aswell a Windows one, or a linux one? And does it run the same WP version?
Philnate
Site Admin
 
Posts: 78
Joined: Sun Jun 12, 2005 7:54 pm

Re: WordPress database error "Incorrect datetime value"

Postby markp on Tue Jun 17, 2008 3:51 am

Sorry I didn't see your reply sooner! Yes, WP version is the same on both servers. Crazy.
markp
 
Posts: 6
Joined: Tue Jun 10, 2008 11:33 pm

Re: WordPress database error "Incorrect datetime value"

Postby markp on Tue Jun 17, 2008 3:59 am

Ah ha! Development server shows MySQL version 5.0.51b-community-nt, while production server shows 5.0.27-community-nt. Is this the difference that could make a difference?
markp
 
Posts: 6
Joined: Tue Jun 10, 2008 11:33 pm

Re: WordPress database error "Incorrect datetime value"

Postby Philnate on Tue Jun 17, 2008 7:05 pm

I'm currently not able to tell you where the problem is, but I'm gonna investigate into it. I'll test this query on my PC, let's see what he returns...
Philnate
Site Admin
 
Posts: 78
Joined: Sun Jun 12, 2005 7:54 pm

Re: WordPress database error "Incorrect datetime value"

Postby Philnate on Sun Jun 22, 2008 9:11 am

I just discovered some possible cause for this behave: Please check which modes your Database Servers are using. Mostly one Server allows wrong Datetimes(your development one) and the other one doesn't.
http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html
You can get the set modi through these SQL-commands:
Code: Select all
SELECT @@global.sql_mode;
SELECT @@session.sql_mode;


Run the first one through PHPMyAdmin or something similiar, and the other one can be append to the end of your WP footer file, enclosed within PHP:
Code: Select all
         print_r ($GLOBALS['wpdb']->get_results("SELECT @@session.sql_mode;"));

to see what modi are used. Please do this on both machines and return the results, please.

Edit:This should fix the problem: Open the wp-ids.php file and scroll to the bottom of the file, replace there twice this:date('c') with date('Y-m-d H:i:s')
Let me know if it did the trick for you.
Last edited by Philnate on Sun Jun 22, 2008 9:23 am, edited 1 time in total.
Reason: additional Informations
Philnate
Site Admin
 
Posts: 78
Joined: Sun Jun 12, 2005 7:54 pm

Re: WordPress database error "Incorrect datetime value"

Postby mark on Mon Jul 13, 2009 5:39 am

Looks like that last trick did the trick. Thanks!
Last bumped by Anonymous on Mon Jul 13, 2009 5:39 am.
mark
 


Return to WPIDS

Who is online

Users browsing this forum: No registered users and 1 guest

cron