Brackets: Error code null encountered while starting the PHP process

Created on 17 Dec 2020  路  14Comments  路  Source: adobe/brackets

Description

As soon as I open any of my PHP files I receive this error message

Schermata 2020-12-17 alle 14 43 32

Versions

OS:
macOS BigSur 11.1
Brackets:
Release 1.14 build di rilascio 1.14.2-17770 (release-1.14.2 f71f00acc)
build timestamp: Tue Mar 31 2020 00:41:05 GMT-0700

Most helpful comment

Finally I get it works again by installing another version of PHP, for who wish to tackle it out:

1) install php 7.3 with brew
brew tap shivammathur/php
brew install shivammathur/php/[email protected]

2) After installed, run
brew link shivammathur/php/[email protected]
If error, run brew doctor, fix one by one

3) Then
which php
to get a new PHP path, it would like /usr/local/bin/php, copy it and replace in "executablePath" in brackets.json in @NYC-Jim 's solution.

4) Confirm there is "enablePhpTooling": true setting in brackets.json

5) Restart Brackets, it should not have any errors, and all the _Code Hints, Parameter Hints, Linting, Jump To Definition, Find References, Find Document/Project Symbols features_ were back

Hope this help. :)

All 14 comments

Me too! I changed my brackets.json file to point to the PHP identified by the "which php" command, but that did not change the error. What am I doing wrong? Is Brackets not intended ro run on MacOS?
{
"brackets-eslint.gutterMarks": true,
"brackets-eslint.useLocalESLint": false,
"fonts.fontSize": "15px",
"fonts.fontFamily": "'SourceCodePro-Medium', 锛汲 銈淬偡銉冦偗, 'MS Gothic', monospace",
"healthData.healthDataTracking": false,
"linting.JSLint.collapsed": false,
"externalApplications": {
"jpg": "Preview",
"jpeg": "Preview",
"png": "Preview",
"svg": "Brackets",
"psd": "Adobe Photoshop 2021",
"ai": "Adobe Photoshop 2021"
},
"linting.collapsed": true,
"php": {
"enablePhpTooling": true,
"executablePath": "/usr/bin/php",
"memoryLimit": "4095M",
"validateOnType": "false"
}
}

@NYC-Jim I added the same thing as you did and the error was gone after restarting Brackets

@enricotedoldi add the php block that NYC Jim shows in his example to brackets.json, restart Brackets and see if the error disappears

Done, but it gives me the same error I posted

@enricotedoldi - yeah, same here. it was fine for the first restart and then came back the next time I opened it. back to square 1 I guess.

Ok temporary gone after using @NYC-Jim solution but with:
"enablePhpTooling": false,
And restarting.

@sidelux yeah, changing that value and the error is gone now. Thanks.

ok, but if that is set to "false" you won't have any of these: _Code Hints, Parameter Hints, Linting, Jump To Definition, Find References, Find Document/Project Symbols features._
Am I wrong?

I'm getting the same error.
Is it due to updating macOS to Big Sur?
I want to know a better solution.

@enricotedoldi Exactly.
@asako08 Probably yes, i think a definitive solution will be available on official update...

I was able to resolve it by adding executablePath to brackets.json.

@asako08 You were? I've tried adding the executablePath '/usr/bin/php' to brackets.json (as @NYC-Jim did) but it hasn't solved the error. Did you specifically install PHP separately?

@theanorak-keith I use MAMP. So I specified the php in MAMP as executablePath.I think executablePath will be different depending on the environment.

I think the following page will be helpful.
https://github.com/adobe/brackets/wiki/PHP-Support-in-Brackets

Finally I get it works again by installing another version of PHP, for who wish to tackle it out:

1) install php 7.3 with brew
brew tap shivammathur/php
brew install shivammathur/php/[email protected]

2) After installed, run
brew link shivammathur/php/[email protected]
If error, run brew doctor, fix one by one

3) Then
which php
to get a new PHP path, it would like /usr/local/bin/php, copy it and replace in "executablePath" in brackets.json in @NYC-Jim 's solution.

4) Confirm there is "enablePhpTooling": true setting in brackets.json

5) Restart Brackets, it should not have any errors, and all the _Code Hints, Parameter Hints, Linting, Jump To Definition, Find References, Find Document/Project Symbols features_ were back

Hope this help. :)

Seems like @efhkapp's solution works.
I have installed php version 7.4 and my executablePath is /usr/local/bin/php.

Was this page helpful?
0 / 5 - 0 ratings