PHP on Mac OS 10 server

Discussion in 'Mac OS X Server, Xserve, and Networking' started by martinabel900, Dec 19, 2016.

Tags:
  1. martinabel900 macrumors newbie

    martinabel900

    Joined:
    Dec 19, 2016
    Location:
    Bangkok, Thailand
    #1
    Good day to you all.

    I am trying to install PHP7.1 to my Mac OS X server. I have followed all the steps, however, it still doesn't work. I can see v7.1 when I use the Terminal, but the I use the web browser it still sees php 5.34

    I would appreciate and suggestions.

    Thank you
     
  2. RCombs macrumors newbie

    Joined:
    Jul 26, 2012
    #2
    This is what I did and it worked. I used php7.0 but you can use php7.1.

    If you have not installed brew follow the link http://brew.sh/
    php
    brew unlink php55
    brew install homebrew/php/php70

    It runs php55 by default, get it run php70 instead.
    This is what I did
    cd /Library/Server/Web/Config/apache2/
    sudo cp httpd_server_app.conf httpd_server_app.conf.bak
    sudo nano httpd_server_app.conf
    Comment out LoadModule php5_module
    Replace it with -
    LoadModule php7_module /usr/local/Cellar/php70/7.0.7/libexec/apache2/libphp7.so
    Duplicate <IfModule php5_module> <IfModule php7_module>
    Now restart the machine and it starts with PHP Version 7.0.7
     

Share This Page