If you only see the literal PHP code, or Apache says "file not found," nine times out of 10 you have one of the following problems:
Your phpinfo.php file is really called phpinfo.php.txt and you just can't see the hidden file extension.
Your phpinfo.php file is not in the Apache document root.
Your ScriptAlias and Action lines in httpd.conf don't match up, or PHP4 isn't installed in the place you think it is.
Your AddType lines are incorrect.
Hope this helps
-Abi