The displayed content is not an error, but the exact script as requested in the URL. The problem is that the script should have been executed, and not displayed as a text file.
Either PHP is not installed for Apache (not very likely, though) or Apache needs to be restarted for some reason by running as root:
# /etc/init.d httpd restart
Can also be a configuration problem in httpd.conf by not having the .php extension associated with php.
A strange situation actually, because Apache and PHP usually run out of the box on Fedora.