Valet: Valet does not change PHP version

Created on 11 May 2018  路  4Comments  路  Source: laravel/valet

I updated my PHP version but I didn't got the new version in valet. I tried everything without any luck so I started to uninstall everything to start from scratch but got same result. I think it was running an older PHP version with config files from a newer version since valet and console was loading the same.

After som digging I found out that Nginx is loading ~/.valet/valet.sock. My solution was:

  1. valet uninstall
  2. rm ~/.valet/valet.sock
  3. valet install

After that it works!

Most helpful comment

I am using Laravel Valet 2.9.0.

rm ~/.valet/valet.sock

gave me the following error:

rm: /Users/debiprasad/.valet/valet.sock: No such file or directory

So, I ran the following:

rm -rf ~/.config/valet

Installed Valet again (valet install) and it works for me.

I hope this will help others who come across similar issues.

All 4 comments

Thanks, you're awesome! Finally, after digging for a while...

Ran into this issue today and after trying the usual methods of reinstalling php via homebrew and reinstalling valet, the key was to delete that valet.sock file.

If you shut down valet (er, well PHP really) before changing PHP versions, then the valet.sock file will automatically be removed. And then when you restart valet, or re-install valet, the valet.sock will be regenerated and connected to the new PHP version.

A reboot will also reset it.

This issue can probably be closed IMO.

I am using Laravel Valet 2.9.0.

rm ~/.valet/valet.sock

gave me the following error:

rm: /Users/debiprasad/.valet/valet.sock: No such file or directory

So, I ran the following:

rm -rf ~/.config/valet

Installed Valet again (valet install) and it works for me.

I hope this will help others who come across similar issues.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexVipond picture AlexVipond  路  4Comments

dustinleblanc picture dustinleblanc  路  4Comments

VinceG picture VinceG  路  3Comments

dannygsmith picture dannygsmith  路  5Comments

eberkund picture eberkund  路  4Comments