Apple Intelligence is now available on iPhone, iPad, and Mac!

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

What version of PHP is being used by OSX Server?

I am running OSX Server 3.x under Mavericks, mainly to use as Time Machine service for the other macs on my network. First question, I want to have PHP 5.6 with various extensions, which don't appear to be included with 10.9 nor with OSX Server. The web service in OSX Server has a checkbox to enable PHP. Ok, but where is that being used from? Is OSX Server providing some version of PHP somewhere, and if so where it is kept in the file system?


A particular PHP based portal I want to use needs some PHP extensions. Installing the full and latest php5.6 puts PHP into a new place, user /usr/local/php5. But whatever OSX Server is doing it appears to be using some other distribution of PHP from somewhere and I guess has its own configuration for apache to use from that other place, wherever it is...


Does anyone have any information about this..or suggestions about whether I should just turn off this service in OSX Server and install or configure apache more directly as if OSX Server isn't there, or how I can update PHP for use within OSX Server's web service?


I'm also going to ignore OSX Server's FTP and use pure-ftpd. There is nothing else in OSX Server I plan to use, I really only need it for Time Machine...so I wish there was a lighter weight way to do that, but it appears there is not.

Posted on Mar 28, 2016 1:36 PM

Reply
9 replies

Mar 29, 2016 7:47 AM in response to pterobyte

I made the decision to use a 6tb drive on an old Mac Pro that needed a purpose and handle time machine with it, rather then $400 for a 3Tb time capsule and still more $$ to expand it to bigger. plus I was not able to find any information about whether time capsule had the capability to restrict the time machine backup usage space to a certain max size per client, which is possible with OS X server. maybe it's possible but I was not able to ascertain that. Hardware is purchased, decision is made. Ultimately an OS X server is more flexible then time capsule and i am using the machine for other duties. I don't see OS X as being all that difficult compared to linux for setting up Apache or ftp or php. The only thing I'm trying to ascertain at this point is whether I can use what comes included with OSX or OSX Server including if I need to update PHP and install some PHP extensions.......or if I must turn off the built ins and install everything myself. I don't intend to use mac ports, fink or homebrew, nor do I think it's neccessary. There is a simple PHP 5.6 installer that will install it into /usr/local but I guess somehow I have to configure Server's Apache configuration in order to get it from there. I am sure that is solvable but just looking for people with experience configuring Server for stuff like that or does everyone really just throw their hands up in the air and say it's too much of a black box? If you install a pre packaged web stack then all those kinds of headaches are removed. So I could turn off Server's web services and just install one of the web stacks floating around. They have those for OSX too. But my needs are simple and that seems like overkill. The only reason I need a php extension is to run pydio. Want to keep the setup simple as possible

Mar 29, 2016 9:41 AM in response to Dewdman42

Nobody is throwing their hands up here, but from your original statement, my suggestion seemed the easier way to go.


That said, if you stay on Server 3, all you need to do is install some packaged PHP version of your liking and change a parameter in apache's configuration file httpd.conf from:

LoadModule php5_module libexec/apache2/libphp5.so

to:

LoadModule php5_module wherever/your/new/php/is


If you plan to move to El Capitan and Server 5, things are a bit more complicated since Server.app implemented a new configuration based on proxying. This is done because in Server 5, Apache is used for a few system relevant services. So updating PHP while maintaining stock Apache can cause some headaches. While possible to manage you are probable better off with an entire new stack including Apache.


Alternatively, if all you need are a few extra extensions for PHP, you could simply compile and add those to the stock PHP. I have never used pydio, so I don't know what the exact requirements are.

Mar 29, 2016 9:54 AM in response to pterobyte

Good to know about El Capitan. I don't intend to upgrade to El Capitan, especially not this box. But there are a few reasons why I'm staying on Mavericks until I'm absolutely forced by Apple kicking, screaming and clawing, to move forward and by then it will be several versions after El Cap...so we'll see what that entails when the time comes. This server box may not leave 10.9 for many years to come. my desktops are staying on Mavericks for as long as I can get away with it.


You might be right that it may just be easier to shutdown the built in web server and install one of the web stacks, guess I was just trying to see if I could make this work without a lot of bloat. Its too bad there isn't a lighter weight software product to run the Time machine aspect of Server, then I would just use that and uninstall Server altogether, and use one of those web stacks for everything else. Most NAS boxes now are using a netatalk version of time machine server. To my knowledge, the only thing like that for OSX, is basically Server.app. If there was something like that for OSX I'd use it, and then forget about Server.app.


Pydio basically needs the MCrypt PHP extension, which is not included in OSX. Apparantly if I upgrade PHP to 5.6, then MCrypt (and some other common extensions), are included. I could also just try to find MCrypt and keep using PHP 5.3 that is built in, and probably it will work fine... I'm also kind of asking these questions to understand better whether moving forward I would be better off avoiding Server's web services and just go my own way with a typical web stack...and....I'm kind of getting the feeling..if I have absolutely simple web needs, then Server is fine..otherwise...just turn it off and use a more universal web stack.

Mar 29, 2016 10:15 AM in response to pterobyte

right.. well that is good to know and gets me back to the original idea of just trying to make Server.app work and if every once in a while I need to roll up my sleeves and tweak a config file somewhere within /Library/Server/ or /etc/apache to make it behave for some web app I want to host, then fine... Sounds like you've had decent success with that!


thanks for the pointer to the MCrypt installer info that will probably do the trick without having to upgrade PHP, I will try that for sure to get pydio working...and honestly...that may be all I need to do for quite some time...


The problem with macPorts and Fink is that they almost always force so much unix-esque structure to everything that in order to get something working it has to install a bunch of dependencies and before you know it you have this MacPorts bloat and in some cases conflicts with what is already installed in OSX. I nearly always try to avoid those. I don't mind installing a web stack, though I don't need MySQL and a lot of that stuff either, but for me personally, I avoid macPorts and Fink like the plaque. If there is any other alternative I will use it, and there usually always is. I think the typical web stacks ultimately are just as complicated to configure as Server.app is, but I think the reason people gravitate to it is because when you install a typical web stack it comes preconfigured with MySQL, the latest PHP, a bunch of common extensions, etc.. Basically it comes preconfigured with a bunch of stuff that 99% of web apps need and use, so you're ready to go. I guess with Server.app, we just have to dig into a little Apache and PHP configuration in some cases, but otherwise it can do all the same stuff, its just not pre-configured to do it like the popular web stacks are.

What version of PHP is being used by OSX Server?

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