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

ChristopherSFSD's avatar

Laravel Official VS Code Extension & PHP binary

I have the Official Laravel VS Code extension installed but it constantly errors as follows:

/bin/sh: php: command not found

I don't have PHP installed on the host but I do have it installed in a Docker container. Can I tell VS Code or the Official Laravel Extension to use the php that's in the Docker container? And if so, how?

0 likes
1 reply
AlexBohdjalian's avatar

If you have php installed via brew like me, this may fix your problem:

Go to Laravel Extension Settings > Look for "Laravel: PHP Command" > Enter the path of where you have php installed.

Your php location is probably "/opt/homebrew/bin/php" but you can verify by running "whereis php"

Please or to participate in this conversation.