I'm simply trying to do PUT/DELETE requests in my PHP application, but after the first 5 requests, the data is lost.
I've reduced the code to this to illustrate the issue:
index.php
$h = fopen('php://input', 'r');
var_dump(fread($h, 1024));
die();
CLI input
curl -X PUT http://cms.dev.com -d '{"foo":"bar"}'
So, for the first 5 times I run that, I get:
string(13) "{"foo":"bar"}"
Then, from the 6th onwards, I get:
string(0) ""
I'm running PHP Version 5.6.0beta1 and Apache/2.2.26, installed on OSX 10.9.3 via Mac Ports.
POST works fine.
EDIT It might be worth noting this can be replicated on 2 other colleague's MacPorts setups, but can't on MAMP, which seems to act correctly.
Does anyone have ideas? It's driving me crazy!
Thanks, Todd