Home > Blockchain >  Php version differs between homebrew and localhost
Php version differs between homebrew and localhost

Time:12-27

I try to update my php to 8.0 using homebrew. The update worked fine. The “php -v” shows that the actual version is 8.0.14. However when I open my localhost and go to “phpinfo.php” it shows the old version 7.4.22. Obviously my server still uses the old one. How to fix this? How to update the server version. I saw several post about similar problem, but the solutions offered didn’t work for me… I’m using Mac. Thanks

CodePudding user response:

So after long searching I finally found this step-by-step tutorial.

https://getgrav.org/blog/macos-monterey-apache-multiple-php-versions

What I did:

  1. I added apache to my server;
  2. I added php to my server (now I no longer need XAMPP);
  3. I followed the step by step configuration to connect apache to php (through updates in httpd.conf file).
  • Related