In order to display PHP setup, configuration and environmental variables simply create a php page and execute the phpinfo command. It will display all the relevant information about PHP as output in the browser or in command line.
Ex. in info.jsp
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>
The output would look like this: