[wp-trac] [WordPress Trac] #22845: On 32-bit systems, with post IDs higher than PHP_INT_MAX (2147483647) wordpress does not run fine

WordPress Trac noreply at wordpress.org
Mon Dec 10 09:13:01 UTC 2012


#22845: On 32-bit systems, with post IDs higher than PHP_INT_MAX (2147483647)
wordpress does not run fine
-----------------------------+-------------------------
 Reporter:  copesc           |       Type:  enhancement
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  General
  Version:  trunk            |   Severity:  normal
 Keywords:  needs-patch      |
-----------------------------+-------------------------
 Logging all the MySQL queries I discovered that the queries that should
 pick my posts were all doing something like this:

 SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN
 (2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647)

 This 2147483647 number clearly has something in it: it's the PHP_INT_MAX
 value on 32-bit operating systems, while on 64-bit machines it's
 9223372036854775807 http://php.net/manual/en/language.types.integer.php

 So, the problem is divided in 2 parts: I run on a 32 bit system, and I
 have my IDs a bit too high.

 I know that 2147483647 is a bit high for a post ID, but I discovered this
 the hard way.
 Now, I would have preferred an error message in the administrator
 interface. Do you think it's a good idea?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22845>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list