How to add a php version? #164
-
The menu shows php 8.0 and 8.1, but it doesn't show the version 7.4 which I should have installed. How can I add that version to the menu? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Sometimes, Homebrew might unlink installed versions of PHP when you upgrade the currently linked version. (Upgrading dependents can happen when you run Here's what I usually do:
This will halt the Valet services and make it easier to reinstall/uninstall specific PHP versions on Valet 3.1 and up. Then, reinstall PHP 7.4:
And then restart Valet:
That usually fixes it. Here's how it works under the hood... PHP Monitor scans the following directories:
Please note that the binaries must exist for PHP Monitor to identify the version of PHP. On my system, I have PHP 7.4 installed in: |
Beta Was this translation helpful? Give feedback.
Sometimes, Homebrew might unlink installed versions of PHP when you upgrade the currently linked version. (Upgrading dependents can happen when you run
brew upgrade
, which may result in an older version of PHP breaking. I've experienced this myself too.)Here's what I usually do:
This will halt the Valet services and make it easier to reinstall/uninstall specific PHP versions on Valet 3.1 and up.
Then, reinstall PHP 7.4:
And then restart Valet:
That usually fixes it.
Here's how it works under the hood... PHP Monitor scans the following directories:
/opt/homebrew/Cellar
for directories starting withphp
(on Apple M1 Macs)/usr/local/Cellar
…