Sublime Text 3 Sublimelinter phplint and php not found?

Andy picture Andy · Dec 17, 2013 · Viewed 35.3k times · Source

I have been playing with this for over an hour to get the sublimelinter working.

So I now have the following packages installed:

  • SublimeLinter
  • SublimeLinter-php
  • SublimeLinter-phplint

Does someone know why it still does not lint the PHP I write?

I am working on Windows and cannot find any docs relating to sublime 3 and windows.

The console reads:

SublimeLinter: cannot locate 'phplint' 

SublimeLinter: cannot locate 'php'

Answer

jmk picture jmk · Dec 19, 2013

I had the same problem and FINALLY figured out, how to get SublimeLinter to work in SublimeText 3. After installing SublimeLinter and SublimeLinter-php it kept telling me SublimeLinter: cannot locate 'php'. (No surprise, PHP isn't in my PATH on purpose).

After adding the path of my PHP installation to the SublimeLinter User Settings (Preferences -> Package Settings -> SublimeLinter -> Settings - User), and a restart of SublimeText everything is working as expected now.

Here is the relevant part:

"paths": {
    "linux": [],
    "osx": [],
    "windows": [
        "C:/Program Files (x86)/PHP/php-5.4/"
    ]
},

I didn't have to change anything else.