Each time I save my .php file in Sublime this pops up:
Can't find PHP binary file at { "php_bin":"/usr/local/bin/php" }
I've done everything I know, so far I'm doing research for the answer.
For me it was phpfmt extention that could not find php.
In Sublime Text > Preferences > Package Settings > phpfmt > Settings - Default it showed:
{
"version": 4,
"php_bin":"/usr/bin/php",
"format_on_save":false,
"option": "value"
}
I did a which php in my terminal and it displayed
/usr/local/bin/php
So my php is not in /usr/bin/php
To change this I opened
Sublime Text > Preferences > Package Settings > phpfmt > Settings - User
to set my personal preferences.
{
"php_bin":"/usr/local/bin/php",
"format_on_save":true,
}
Saved that and t was fixed. No more pop-up, and formatted on save.
/opt/homebrew/bin/php.which php will tell you where your php is. With homebrew it can be in /opt/homebrew/bin/php ... today :) ... Another new issue can be that pmpfmt does not like your version of php. I think there is an update for ST4 php8.xMake sure that you have right path on php. To find out enter command line
which php
if the result is
/usr/bin/php
place the above path in the sublime configuration
php -vin the console/terminal ?