Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Can't get php to work on web sites

I have turned on the Enable PHP switch in the Server Application (and turned the Websites service button off and on), but can't get php to work. The php scripts used to work before I upgraded from OS X 10.8 (Server version 2) to OS X 10.10.5 (Server version 5.0.15), so I don't think there's anything wrong with the scripts. The scripts are simply ignored in the html pages when they are displayed. Suggestions?

Mac mini, OS X Yosemite (10.10.5), Mac mini (Late 2009)

Posted on Nov 28, 2015 2:26 PM

Reply
2 replies

Nov 28, 2015 2:56 PM in response to HumanPotential

There are php changes within the jump from OS X 10.8 to 10.10 — I don't remember the php versions involved off-hand, but some older php code might toss errors on the newer releases — so check the Apache logs for any php-related errors reported there.


Are the php files involved readable to the web server, and marked as executable? (I've had several OS X updates change the settings on the local web files, so I now have a bash script that will "unrepair" the ownership and the file protection changes, and get the sites working again.)

Can't get php to work on web sites

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.