
The problem was that I did not specify the content type at the httperf command.
httperf --server localhost --port 80 --wsesslog 1,1,myfile --print-reply --add-header="content-type: application/x-www-form-urlencoded\n"
Earlier $_POST array did not get populated, for my own simple php script. But after I used the option bold faced above it got ok.
But still the problem is with Moodle login page

Ealier I was thrown back to logn/index.html. But now end up in location.replace (http://localhost/moodle)