Sublime Forum

WARNING: php cannot locate 'php'

#1

Hi all. I’ve installed a PHP linter into SublimeLinter: SublimeLinter-php. But on startup, the console displays an error SublimeLinter: WARNING: php cannot locate 'php' How do I resolve this? Specifically, this SublimeLinter troubleshooting page says I need to add a path to the ‘linter executable.’ But how do I locate that path?

I didn’t think it would work, but since I knew the path of php.exe, as a test I added that path to the SublimeLinter settings, but that didn’t seem to work (screenshot).

My OS is Windows.

Thanks in advance.

0 Likes

#2

I don’t use SublimeLinter, but the default configuration for paths says this:

// Provide extra paths to be searched when locating system executables.
"paths": {
    "linux": [],
    "osx": [],
    "windows": []
},

In your screenshot above, you specified the path including the php.exe for the executable, but based on the comment the path should just contain the list of extra paths to search, not the thing being searched for explicitly.

As such the first thing I’d try is remove the php.exe from the path you have configured and see if that makes a difference.

0 Likes

#3

Great, that did the trick–thanks.

Man I swear I tried that before and it didn’t work.

0 Likes