Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jimmitjoo's avatar

Laravel Valet [DomainException] Unable to determine linked PHP

I am having a wierd issue. A week ago when I was working on this machine everything with Laravel Valet worked like a charm. Today I cannot even start it.

I've tried to reinstall both Valet, PHP, nginx and dnsmasq. I have tried to switch between PHP versions as well, but no. I just get the DomainException described in the title.

which valet
/usr/local/bin/valet

which php
/usr/bin/php

php -v
PHP 7.1.8 (cli) (built: Aug  7 2017 15:02:45) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

Everything above seems ok to me?

But then when I want to install valet:

valet install

Stopping nginx....
Installing nginx configuration...
Installing nginx directory...
Updating PHP configuration...
  [DomainException]
  Unable to determine linked PHP.
install

Have anyone else experienced this issue? I cannot find anything valet specific about it when googling, just found a lot of people having this trouble with homestead.

0 likes
5 replies
Simon_G's avatar

I noticed that the references to php has changed since the last update by Homebrew.

This used to be php72, php71, php70, etc. These have been changed to [email protected], [email protected], [email protected], etc.

This means that valet won't recognise your php version to be valid.

You can solve this issue by updating your php changing the supportedPhpVersion() in /Users//.composer/vendor/laravel/valet/cli/Valet/Brew.php to:

function supportedPhpVersions()
    {
        return collect(['[email protected]', '[email protected]', '[email protected]', '[email protected]']);
    }
2 likes

Please or to participate in this conversation.