wp_posts.id values over 9 digits cause posts and p

2019-08-26 09:02发布

This insert fails and causes the problems above:

INSERT INTO `wp_posts` (`ID`, ... ) 
VALUES (33145694077, ... );

But this insert works just fine:

INSERT INTO `wp_posts` (`ID`, ... )
VALUES (145694077, ... );

Only difference is that I killed off the first two numbers from the id's INSERT value. (145694077 instead of 33145694077).

Here's the table structure for wp_posts:

`wp_posts` ( 
    `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 
    ...
) 
ENGINE=MyISAM DEFAULT CHARSET=utf8;

I'm only having this problem when I'm trying to import my posts to WP Engine. My MAMP install, and my other server environment (Apache / CENTOS 6.5) handle these imports just fine. WPE uses nginx, I know. I guess I don't know enough to decide whether or not an issue exists there!

Any thoughts, similar experiences?

This sad, unsolved thread was all I could find on the subject.

1条回答
beautiful°
2楼-- · 2019-08-26 09:39

The largest signed 32-bit integer is 2,147,483,647. 33,145,694,077 is greater than that, but 145,694,077 is less than it.

I'll bet your MAMP environment and your other server are running a 64-bit operating system with appropriate versions of MySQL and PHP, while the server giving you problems is only 32-bit.

查看更多
登录 后发表回答