Reputation: 5849
I installed the SublimeLinter plugin for Sumblime-text-2 in Ubuntu 12.04.
The PHP linting does not work. After an exhaustive search on the internet, I found out that I have to give the path to PHP in the sublimeLinter settings as below:
"sublimelinter_executable_map":
{
"php":"/usr/share/php"
},
This was the path in the line include_path I found in the phpInfo(). But it does not work. I tried escaping the special characters, and other paths like /usr/share/php5, /usr/lib/php5, but nothing seems to work.
Can anyone help with the correct configuration, so that I can get the linter functionality to work?
Note: There has been a previous unanswered question here. I thought maybe I should ask it again, in a little more detail.
UPDATE: The original question has been answered and solves this question as well.
Upvotes: 13
Views: 20343
Reputation: 1625
For ubuntu system type in terminal:
which php
and use the result in your php path (Preferences->Package Settings->SublimeLinter->Settings -User).
In my case it's:
{
"sublimelinter_executable_map": {
"php": "/usr/bin/php"
}
}
Upvotes: 4
Reputation: 4798
1- Install node.js. Which, by the way, is pretty darn awesome in its own right.
2- Open up Sublime Text, and close all open files.
3- Head to Preferences->Package Settings->SublimeLinter->Settings – User (it will be empty if you haven’t messed with it before), and insert the following:
{
"sublimelinter_executable_map":
{
"javascript":"C:/Program Files/nodejs/node.exe",
"css":"C:/Program Files/nodejs/node.exe",
"php":"C:/wamp/bin/php/php5.4.3/php.exe"
}
}
This is also where you’d put paths to, say, php for linting. Make sure you get the path to node correct – this is the default location on a Windows 7 install. Save the file, close the file, and restart Sublime Text.
sources: http://fuzzytolerance.info/blog/2012/05/14/2012-05-15-getting-sublimelinter-running-on-windows/
Upvotes: 20
Reputation: 1
php-win.exe file path on Windows 7 didn't do the trick for me!!!
"sublimelinter_executable_map":
{
"javascript":"C:/Program Files/nodejs/node.exe",
"php":"C:/xampp/php/php-win.exe",
"css":"C:/Program Files/nodejs/node.exe"
}
Upvotes: 0
Reputation: 14634
php.exe file path on Windows 7 didn't do the trick for me, while php-win.exe did:
{
"sublimelinter_executable_map":
{
"php":"C:/php/php-win.exe"
}
}
Upvotes: 1