I know the cookie expiry date is set in the future. I know the expiry date is NOT larger than PHP's integer max-size PHP Integer maximum value is about 32 bits, mine is no more than 5 characters
Uh, shouldn't the expiry time of a cookie be the number of seconds since epoch? A 5 digit expiry date would be early January 2nd, 1970, so I don't think it's possible that your expiry date is both five characters or less, and also in the future.
This is a Unix timestamp so is in number of seconds since the epoch. In other words, you'll most likely set this with the time() function plus the number of seconds before you want it to expire
<?php setcookie("hiworld", "true", time()+300); ?> Hi, world! curl -v danf.us/t.php * Adding handle: conn: 0x7ff05180d000 * Adding handle: send: 0 * Adding handle: recv: 0 * Curl_addHandleToPipeline: length: 1 * - Conn 0 (0x7ff05180d000) send_pipe: 1, recv_pipe: 0 * About to connect() to danf.us port 80 (#0) * Trying 126.96.36.199... * Connected to danf.us (188.8.131.52) port 80 (#0) > GET /t.php HTTP/1.1 > User-Agent: curl/7.30.0 > Host: danf.us > Accept: */* > < HTTP/1.1 200 OK * Server nginx/1.0.10 is not blacklisted < Server: nginx/1.0.10 < Date: Fri, 02 Jan 2015 22:31:19 GMT < Content-Type: text/html < Transfer-Encoding: chunked < Connection: keep-alive < Keep-Alive: timeout=20 < X-Powered-By: PHP/5.3.13-pl0-gentoo < Set-Cookie: hiworld=true; expires=Fri, 02-Jan-2015 22:36:19 GMT < Hi, world! * Connection #0 to host danf.us left intact