I have recently downloaded and compiled the latest version of PHP on to my server. However, realized I did all of this as root. PHP shows as successfully installed, however php pages do not render, and just display as plain text. Was installing php as root the problem, and if so, do I need to re-install, or is there something I can do?
First, you need to restart Apache (I'm assuming that's your webserver since you didn't mention it). If you didn't, that's your problem.
If you already did... It's not all to install PHP, you have to make sure it's properly loaded by apache. The default PHP rpm install will detect Apache and create a php.conf file in /etc/httpd/conf.d. All you gotta do after is restart Apache and it should work.
My php.conf contains this:
If you don't have a php.conf file in /etc/httpd/conf.d, then look for those lines (the uncommented ones) in your /etc/httpd/conf/httpd.conf file, and make sure the paths are good. If you say you compiled it first and then reinstalled using a package, my guess is that you have conflicting lines (duplicates) pointing to different paths. You should clean that out first and try to restart Apache after.
If it still doesn't work, look in the error log of Apache and see if there's an error. This should tell you more.