4

I'm running ubuntu 18.04 and trying to develop a php project using Brackets text editor. But i getting error:

PHP runtime not found.

Then I installed the php7 runtime and update "executablePath" in PHP preferences appropriately. I tried to configured Brackets using custom setting in brackets.json But now i am getting:

"Error Reading Preferences" Your preferences is not valid JSON

I am using XAMPP

Pradeepal Sudeshana
  • 908
  • 2
  • 14
  • 30
Abhishek Aarya
  • 51
  • 1
  • 1
  • 3
  • can you share the code in used in brackets? – Nompumelelo Oct 20 '19 at 20:51
  • 1
    The problem is with your brackets.json file, you put there an invalid JSON structure, check that, it's likely the brackets editor already shows you where the problem is. If you still can't figure it out, post it here so we can help. – catcon Oct 20 '19 at 22:04
  • thanks for quick assist i followed your instruction and right now the error is fixed.. – Abhishek Aarya Oct 22 '19 at 01:47

1 Answers1

5

Based on the issue that appear in here : https://github.com/adobe/brackets/issues/14783

you just have to open your brackets.json file from the Debug tab then open preferences file, and add these following syntax to your brackets.json :

"php": {
    "executablePath": "C:\\xampp\\php\\php.exe"
}

so for me, it will became like this :

{
"brackets-eslint.gutterMarks": true,
"brackets-eslint.useLocalESLint": false,
"fonts.fontSize": "12px",
"fonts.fontFamily": "'SourceCodePro-Medium', MS ゴシック, 'MS Gothic', monospace",
"themes.theme": "dark-theme",
"php": {
    "executablePath": "C:\\xampp\\php\\php.exe"
}

}

then restart your brackets, hope it'll work

Lazy MdE
  • 61
  • 1
  • 2
  • 1
    Gave it a +1 although the question was about Ubuntu (linux). For linux I put `"php": { "executablePath": "/opt/lampp/bin/php" }` - This was the path for me, to get your path, open terminal and type `whereis php` – Onimusha May 11 '21 at 18:43