PHPInfo / Valet - Two different PHP versions

oliverbj picture oliverbj · Dec 10, 2018 · Viewed 14.2k times · Source

OK so I am experiencing something quite odd. My phpinfo() shows one version while php -v shows another.

I am running locally on a MacBook Air (Mojave), with Laravel and Valet.

phpinfo():

PHP Version 7.2.13

Configuration File (php.ini) Path   /usr/local/etc/php/7.2
Loaded Configuration File   /usr/local/etc/php/7.2/php.ini
Scan this dir for additional .ini files /usr/local/etc/php/7.2/conf.d

While in my terminal, it shows:

php -v

PHP 7.3.0 (cli) (built: Dec  7 2018 11:00:11) ( NTS )

Now, if I do a which php I get this:

/usr/local/bin/php

In my ~/.bash-profile, I have this:

export "PATH=~/.composer/vendor/bin:$PATH"

I have tried to:

How can I get my actual valet site to use [email protected]?

Answer

Chk picture Chk · Jul 24, 2020

Below simple fix worked for me.

rm ~/.config/valet/valet.sock
valet restart