Question

IntelliJ will not detect installed PHP even though it does exist and can be used from the command line. I have installed php via brew install php54. Below is a screenshot of my issue along with evidence that it does exist. I've tried clicking the refresh button many times, but it will not pick up the binary.

picture of issue

Was it helpful?

Solution 4

I've just now come back to this after some time and it looks like the latest version IntelliJ works with PHP installed via Homebrew. So I'm going to mark this as resolved.

OTHER TIPS

I just had the same problem. Through some hackery, I discovered it was due to some ansi escape sequences in my prompt. From your screenshot it looks like you might have the same or a similar issue.

Essentially, IntelliJ uses a php script to create an XML string out of some PHP configuration items, including $_SERVER. The $_SERVER superglobal contains environment variables and therefore picked up the escape character (0x1b) in the sequence. Since the escape character is invalid in XML, IntelliJ rejected the output and concluded the PHP interpreter was bad.

Once I removed the ansi sequences from my prompt, IntelliJ recognized the PHP interpreter right away.

Hope this helps.

I had the same issue, and it turned out my Homebrew install was severely out of date when I installed PHP. To fix it, I ran:

brew update && brew upgrade

With some quick help from jetbrains support, the latest EAP version fixed it for me: http://confluence.jetbrains.com/display/IDEADEV/IDEA+14+EAP

http://youtrack.jetbrains.com/issue/WI-23045

If you prefer to keep investigating the issue, see Chris' answer and search the idea.log for something like:

INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/php.xml file is null

idea.log locations

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top