In the file http://example.com/path/foo.php, I have the form (formatting deleted):
<form action="/path/foo.php" method="post">
Email: <input type="text" name="email">
Password: <input type="password" name="password">
<input type="checkbox" name="remember" checked="checked"> Remember me
<input type="submit" value="Log In">
</form>
Sometimes users are not able to log in: the reported behavior was that they tried to log in and were presented with a fresh login screen.
When I've been able to duplicate the problem, it appears $_POST is empty: $_POST['email'] and $_POST['password'] lack the submitted values, and the following just logs "##":
error_log("#" . file_get_contents("php://input") . "#");
I can't see why this would be due to a redirect; it can't be a case of /directory -> /directory/ , and a look through Apache's relevant VirtualHost section turned up very little rewriting, and not any that should affect the file. (And the displayed URL is the same as the one referenced in the form.)
The system has been around for a few months and the problem was first reported to me today.
I'm planning on emerging updated Apache and PHP(5), in case there's a fluke that could be improved by a more recent version. But I'd be very interested in hearing other ways I might be getting an empty $_POST after filling out a form.
Thoughts?