I have recently been trying to install PHP and Apache on my computer. After many hours, they\'re installed. I have modified the httpd.conf and php.ini files like everyone sa
Posting what worked for me in case in helps someone down the road, though it is an unusual case.
I had set a handler to force my web host to use a higher version of php than their default. There's was 5.1, but I wanted 5.6 so I had this:
SetHandler php56-cgi
in my .htaccess file.
When trying to run my site locally, having that in there caused php code to be output to the browser. Removing it solved the problem.