invoker-community icon indicating copy to clipboard operation
invoker-community copied to clipboard

Laravel Herd created site throws this error when using Invoker

Open StephenGillCoop opened this issue 1 year ago • 7 comments

I create a new site on Laravel Herd, and then load Invoker and choose the directory of the new site (Herd/newsite)


OS: darwin Invoker Version: 2.13.2 Laravel Version: unknown Local project: true PHP Binary: /usr/local/bin/php Route: /home

Error:

Error: spawn /usr/local/bin/php ENOENT

StephenGillCoop avatar Oct 28 '23 05:10 StephenGillCoop

I get this same issue as well


OS: darwin Invoker Version: 2.13.2 Laravel Version: unknown Local project: true PHP Binary: /usr/local/bin/php Route: /home?project=local-qXHN8XYqUQu5DuuF178w1A

Error:

Error: spawn /usr/local/bin/php ENOENT

palmersoft-uk avatar Nov 20 '23 14:11 palmersoft-uk

I also get the same error


OS: darwin Invoker Version: 2.13.2 Laravel Version: unknown Local project: true PHP Binary: /usr/local/bin/php Route: /home

Error:

Error: spawn /usr/local/bin/php ENOENT

rwmatthews avatar Nov 24 '23 11:11 rwmatthews

Go to Invoker Settings and correctly specify the path for the PHP binary and issue should be fixed

ysrdevs avatar Nov 27 '23 05:11 ysrdevs

For new users like me (and having a Windows laptop), the settings are at the bottom left (little gear symbol) and for getting your php path on windows: open a cmd window (in my case git bash) and enter : where php.exe Windows will answer with the full path (including the C:\ ..), just copy it and past it in the Php binary path at the top of the settings.

SolsWebdesign avatar Nov 28 '23 08:11 SolsWebdesign

Go to Invoker Settings and correctly specify the path for the PHP binary and issue should be fixed

@ysrdevs But isn't the point of Herd that you can have a different binary for each site potentially, depending on which version of PHP you want to use. So you would need to change the binary in invoker settings each time you change the site you are working on. If that is the case, ideally Invoker would use the Herd settings to load the relevant binary.

Palmersoft avatar Nov 28 '23 08:11 Palmersoft

Invoker does not read the php binary from the laravel package, it has to be pre-set. I have all projects at same php version (8.3). But if you have multiple versions of Php across different projects with dependencies that would break in newer ones version,you will have to change the binary every time I guess.

ysrdevs avatar Nov 28 '23 11:11 ysrdevs

Invoker does not read the php binary from the laravel package, it has to be pre-set. I have all projects at same php version (8.3). But if you have multiple versions of Php across different projects with dependencies that would break in newer ones version,you will have to change the binary every time I guess.

As both Herd and Invoker are made by BeyondCode - It is not unreasonable to assume that Invoker would be able to read the Herd config for a project folder and load the relevant binary, especially as that binary is managed and installed through Herd.

Palmersoft avatar Nov 28 '23 11:11 Palmersoft