Skip to content

[Bug]: "No usable PHP version found" #1249

@MPGs007

Description

@MPGs007

Platform

Windows

Operating system version

Windows 10 Pro 22H2 19045.5371

System architecture

Windows

Herd Version

1.14.0

PHP Version

No response

Bug description

I'm on windows - using VS code and since installing PHP 8.4 through herd get constant error via the _laravel_ide vendor Barry Intelliphense I think

025-01-24 09:31:57.818 [error] ""No usable PHP version found"" "c:\Users\noelm\Herd\mpg\vendor_laravel_ide\discover-de1f506da4a5c2d0d4253f2c83847947.php"
2025-01-24 09:31:57.819 [error] Eloquent Attributes and Relations

'""No' is not recognized as an internal or external command,
operable program or batch file.

Since the install unable to run herd commands in terminal but PHP version is shown
PS C:\Users\noelm\Herd\mpg> herd
"No usable PHP version found"
PS C:\Users\noelm\Herd\mpg> php -v
PHP 8.3.16 (cli) (built: Jan 14 2025 20:07:09) (NTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.3.16, Copyright (c) Zend Technologies
with Zend OPcache v8.3.16, Copyright (c), by Zend Technologies
PS C:\Users\noelm\Herd\mpg> herd list
"No usable PHP version found"

I did check my find-usable-php.php
all seems fine

= 0) { if (file_exists($binPath . '84' . DIRECTORY_SEPARATOR . 'php.exe')) { echo $binPath . '84' . DIRECTORY_SEPARATOR . 'php.exe'; } elseif (file_exists($binPath . '83' . DIRECTORY_SEPARATOR . 'php.exe')) { echo $binPath . '83' . DIRECTORY_SEPARATOR . 'php.exe'; } elseif (file_exists($binPath . '82' . DIRECTORY_SEPARATOR . 'php.exe')) { echo $binPath . '82' . DIRECTORY_SEPARATOR . 'php.exe'; } elseif (file_exists($binPath . '81' . DIRECTORY_SEPARATOR . 'php.exe')) { echo $binPath . '81' . DIRECTORY_SEPARATOR . 'php.exe'; } return; } if (file_exists($binPath . '83' . DIRECTORY_SEPARATOR . 'php.exe')) { echo $binPath . '83' . DIRECTORY_SEPARATOR . 'php.exe'; return; } echo $binPath . '82' . DIRECTORY_SEPARATOR . 'php.exe'; -

I think it is an issue with the settings.json php.executablePath or php.validate.executablePath but I can't find anywhere that tells me the correct values for VS code to use herd PHP - any help on correct setting so I can check would be appreciated - moved from MAMP windows to Herd to use latest PHP as MAMP windows stops at 8.2

Everything was working fine up to a week ago when I installed 8.4 it was working fine with with 8.3 PHP installed via herd

Steps to reproduce

Open a fully working laravel project in VS Code through Herd, upgrade PHP in Herd to 8.4
Herd commands in cli stop working and no useable PHP is found although version is there - intelliphense goes nuts with errors as cant find PHP

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions