levidyllan

Q: How to upgrade MAC Server php versin to the latest

I am running Mac Server on Mountain Lion as a local networked server.

 

I would like to upgrade the current PHP 5.3.15 to the latest (5.4.16 at present) but I can update our local / personal macs machines but the mac that we have the server on wil not how can i update this version of PHP.

 

Also should it be time for this type of update to be included with updates...!

 

MAC Pro OS X 10.8.4 running MAC Server v.2.2.1(169).

Posted on Jun 13, 2013 1:37 AM

Close

Q: How to upgrade MAC Server php versin to the latest

  • All replies
  • Helpful answers

  • by Simon Slavin,

    Simon Slavin Simon Slavin Jun 13, 2013 2:54 AM in response to levidyllan
    Level 4 (1,400 points)
    Jun 13, 2013 2:54 AM in response to levidyllan

    Do not upgrade the version of PHP built in to OS X Server.  Other tools and services built into OS X Server use that version of PHP to do parts of their jobs.  A later version of PHP may introduce or fix bugs or otherwise break the things these other facilities use, which would stop them from working properly.

     

    Apple updates the version of PHP supplied with OS X Server when it has had a chance to test all the other facilities which depend on it to make sure they still work with the new version.  This happens more rarely than every PHP version increment.

     

    If you want your server to run a later version of PHP, I recommend you download and install yourself a separate copy, installed in a different place to where the existing copy is.

  • by levidyllan,

    levidyllan levidyllan Jun 13, 2013 3:02 AM in response to Simon Slavin
    Level 1 (1 points)
    Jun 13, 2013 3:02 AM in response to Simon Slavin

    Thanks for the reply.

     

    I have installed a newer version via http://php-osx.liip.ch/

     

    I then have perfomred th e following:

     

          sudo mv /usr/bin/php /usr/bin/php.orig
       sudo ln
    -s /usr/local/php5/bin/php /usr/bin/php

     

    When i get then command line php version it then shows the correct i get the following:

     

          'PHP 5.4.15 (cli) (built: May 20 2013 14:34:36) '

     

    But when i run the php info file i have within the root of my webserver i still get the old version 5.3.15.

     

    So my issue is how can i link the server upto the latest installed version.

     

     


  • by MrHoffman,

    MrHoffman MrHoffman Jun 13, 2013 7:30 AM in response to levidyllan
    Level 6 (15,612 points)
    Mac OS X
    Jun 13, 2013 7:30 AM in response to levidyllan

    Why is the older php shown in Apache?  The following Apache configuration file step was probably missed:

     

    LoadModule php5_module /usr/local/php5/libphp5.so

     

    As was suggested up-thread, I would not encourage modifying the system-installed version — which is what that link does.  I'd undo that.

  • by Levente Orban,

    Levente Orban Levente Orban May 20, 2016 5:31 PM in response to MrHoffman
    Level 1 (9 points)
    May 20, 2016 5:31 PM in response to MrHoffman

    Some applications demand using a version newer than what ships with OS X. For example, ActiveCollab demands at least 5.6.xx but El Capitan comes with 5.4.xx

  • by ledgedog,

    ledgedog ledgedog Aug 30, 2016 7:12 AM in response to levidyllan
    Level 1 (4 points)
    Aug 30, 2016 7:12 AM in response to levidyllan

    There are two installations of PHP  one is used by apache and the other by the CLI or terminal.  To update he one apache uses simply download a bitnami.com or other MAMP installation.  Updating the CLI is much more involved as stated above and has some associated risks.

     

    M