Tuesday, 8 October 2019

phpinfo() not updating to terminal version?

My phpinfo() shows the version to be 7.1.23. But when I execute php -v on terminal, it shows the version to be 7.3.10. How do I get the phpinfo version to be the same as the CLI/terminal? I followed the steps by user corretge on this question: different result between phpinfo.php and php-v which I assumed would resolve the issue, but it didn't. I also added these lines to my httpd.conf file:

LoadModule php7_module /usr/local/opt/php71/libexec/apache2/libphp7.so
<FilesMatch .php$>
    SetHandler application/x-httpd-php
</FilesMatch>

I added all the above code right below the last LoadModule (etc etc etc) text. The location of my httpd.conf is:

/etc/apache2/httpd.conf

So doing all that for whatever reason did not work. I installed via Curl at first, it didn't update the phpinfo version, and did the same just now via Homebrew, and same - no updated result.

I am using macOS High Sierra 10.13.6

When I run this command:

/usr/local/bin/php -v

the result is:

PHP 7.3.10

When I run this command:

/usr/bin/php -v

the result is:

PHP 7.1.23


from phpinfo() not updating to terminal version?

No comments:

Post a Comment