Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find 'PHP'. The program may not be installed. #1727

Closed
johanvanhelden opened this issue Jun 19, 2017 · 2 comments
Closed

Could not find 'PHP'. The program may not be installed. #1727

johanvanhelden opened this issue Jun 19, 2017 · 2 comments
Assignees
Milestone

Comments

@johanvanhelden
Copy link

johanvanhelden commented Jun 19, 2017

Upon beautifying the file, I get an error telling me that PHP may not be installed.

I do have the proper path set in the package config executable's section, and I do have PHP in my path. Because it used to work fine before the update.

I just can not see what I am doing wrong.

whatisgoingonhere

I also rebooted Atom after setting the executable's path.

Could not find 'PHP'. The program may not be installed.

See http://php.net/manual/en/install.php for program installation instructions.
You can configure Atom Beautify with the absolute path to 'php' by setting 'Executable - PHP - Path' in the Atom Beautify package settings.
Your program is properly installed if running 'which PHP' in your Terminal returns an absolute path to the executable. If this does not work then you have not installed the program correctly and so Atom Beautify will not find the program. Atom Beautify requires that the program be found in your PATH environment variable. 
Note that this is not an Atom Beautify issue if beautification does not work and the above command also does not work: this is expected behaviour, since you have not properly installed your program. Please properly setup the program and search through existing Atom Beautify issues before creating a new issue. See https://github.com/Glavin001/atom-beautify/search?q=PHP&type=Issues for related Issues and https://github.com/Glavin001/atom-beautify/tree/master/docs for documentation. If you are still unable to resolve this issue on your own then please create a new issue and ask for help.

Hide Stack Trace

Error: Could not find 'PHP'. The program may not be installed.
    at Function.Executable.commandNotFoundError (/xxx/.atom/packages/atom-beautify/src/beautifiers/executable.coffee:272:14)
    at HybridExecutable.Executable.commandNotFoundError (/xxx/.atom/packages/atom-beautify/src/beautifiers/executable.coffee:264:18)
    at /xxx/.atom/packages/atom-beautify/src/beautifiers/executable.coffee:115:25
    at tryCatcher (/xxx/.atom/packages/editorconfig/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/xxx/.atom/packages/editorconfig/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/xxx/.atom/packages/editorconfig/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/xxx/.atom/packages/editorconfig/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/xxx/.atom/packages/editorconfig/node_modules/bluebird/js/release/promise.js:689:18)
    at Async._drainQueue (/xxx/.atom/packages/editorconfig/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/xxx/.atom/packages/editorconfig/node_modules/bluebird/js/release/async.js:143:10)
    at Async.drainQueues (/xxx/.atom/packages/editorconfig/node_modules/bluebird/js/release/async.js:17:14)
    at process._tickCallback (internal/process/next_tick.js:103:7)

Workaround:
For now I downgraded using:
apm install atom-beautify@0.29.26
And ran the "Atom beautify - migrate settings" tool.

So this confirms the latest version is the issue here.

@ghost
Copy link

ghost commented Jun 19, 2017

Same here after upgrading to 0.30.0. Problem still exists after upgrading to 0.30.1. Downgraded to 0.29.26 and it works fine again.

Using Ubuntu 16.04.2 64bit. Path to php executable is /usr/bin/php. I configured it manually in Executables -> PHP but still no luck.

@Glavin001
Copy link
Owner

Closing as a duplicate of #1725

Please see my #1725 (comment) .

I hope to get this resolved very soon. I need more information from users. Specifically your debug.md Gist (see https://github.com/Glavin001/atom-beautify/blob/master/docs/troubleshooting.md for help).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants