naomichi-y / php_syntax_checker

This package is plugins for Sublime Text 2 and 3. When you save PHP file, perform syntax check of PHP
39 stars 14 forks source link

/bin/sh: php command not found error #22

Open sheriffderek opened 2 years ago

sheriffderek commented 2 years ago

Recently, I had some students install this package and many of them are getting this error on save.

/bin/sh: php command not found

Since this package hasn't been updated (because it likely doesn't have any reason to be) in three years, I can only guess that it has something to do with a change in Sublime / or more likely - a change with the most recent MacOS Mojave and/or MAMP.

So, it's not able to find PHP. That's likely because the new OS doesn't ship with PHP. So, it looks like if people run into this, they'll need to install PHP. https://formulae.brew.sh/formula/php

But - here's this little story for when many people inevitably end up here. : )

aserra commented 2 years ago

Same happens to me: macOS Monterey 12.1

ozws commented 2 years ago

New to Monterey (from Mojave). Installing PHP via Brew fixed it up. Didn't know it wasn't on there.

Thanks @sheriffderek