The configuration directive cgi. force_redirect prevents anyone from calling PHP directly with a URL like http://my.host/cgi-bin/php/secretdir/script.php . Instead, PHP will only parse in this mode if it has gone through a web server redirect rule.
Goto php.ini file
cgi.force_redirect =0
Uncommnet the above line and set 0