Se visualizza quel codice significa che sicuramente non hai detto ad apache quali file processare usando l'interprete php. Per essere sicuro che apache utilizzi l'interprete php per tutti i file con estenzione php devi controllare la direttiva DirectoryIndex all'interno del file httpd.conf di apache. Dev'essere impostata in questo modo:
codice:
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.html index.html.var index.php