I was testing this PHP script in my Kali box, but for some reason it keeps failing, and I have seen the reason is the ">" character
<?php
foreach ($_POST as $key => $value)
{
echo "Field ".htmlspecialchars($key)." is ".htmlspecialchars($value)."<br>";
}?>
The result from sending a POST request to this script is:
Every time I write any ">" character (even comented) the php script terminates as if the character ">" was a close tag like "?>"
I don't know what's going on, I wrote the full application in a Debian 8 box, and it works perfectly fine; I have reinstalled php and apache in Kali but I can't make it work in there, Currently I am running PHP 7.0.10-1 (cli) ( NTS ), any insight will be greatly appreciated.
EDIT:
The source code of the resultant page is:
EDIT: None of the solutions in this post works, the problem is different.