I ran into exactly the same problem. I solved it by following the instructions for enabling php in Part III of Configuring Apache:
There are several lines in the /private/etc/httdp/httpd.conf file concerning php that need to be un-commented.
© 2016, O’Reilly Media, Inc.
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.