Installed PHP 7.3 phpinfo() shows 7.1

I am on Mojave. I installed PHP 7.3 but then when I run phpinfo() It shows I am still on 7.1. After installing 7.3 how do I tell the computer to actually use php version 7.3

Posted on Apr 26, 2019 9:41 AM

Reply
5 replies

Apr 26, 2019 11:28 AM in response to Mark Woods1

Mark Woods1 wrote:

I installed php7.3 twice using that procedure. The php-conf file still shows 7.1.23


version php7.3


It seems there is some known issues here:


Detected macOS Mojave 10.14. There are serious issues with it, due to the original apache not loading

foreign libraries anymore. PHP within apache will most certainly not work anymore if you proceed!

The cli version still will. See this issue at https://github.com/liip/php-osx/issues/249 for details and discussion

Apr 26, 2019 11:00 AM in response to Mark Woods1

Mark Woods1 wrote:

I installed php7.3 twice using that procedure. The php-conf file still shows 7.1.23


reference: https://apple.stackexchange.com/questions/171682/php-version-shown-in-command-line-differs-from-phpinfo-in-localhost8000




From terminal what does it show:

php -v



Did you run the command line:


curl -s https://php-osx.liip.ch/install.sh | bash -s force 7.3

Apr 27, 2019 10:43 AM in response to Mark Woods1

I just used Homebrew to update to PHP 7.3.4. Of course, I had the same issue of the CLI showing a different PHP version than phpinfo(). I solved the problem, though. Here's what I did. I simply added the path of the new php executable to my .bash_profile.


Homebrew installs php in /usr/local/Cellar/. This is what I added to the .bash_profile. After restarting terminal, CLI worked correctly.


export PATH=/usr/local/Cellar/php/7.3.4_1/bin:$PATH



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Installed PHP 7.3 phpinfo() shows 7.1

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