Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

martinabel900

macrumors newbie
Original poster
Dec 19, 2016
1
0
Bangkok, Thailand
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
 

RCombs

macrumors newbie
Jul 26, 2012
2
0
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.