Mountain Lion interpreter won't discover php54

/opt/local/bin is where the php file sits (actually a link to the real file)
which is
/opt/local/bin/php54

I've put the "php home" field as both of these and it will not pick it up.  what do I do?

11 comments

no one knows how to do this apparently


0

Hi there,

What PhpStorm version do you use exactly?

One of the possible reasons: misconfiguration of your php.ini which leads to PHP startup errors (e.g. loading non-existing extension or similar).

0

I'm using 6.0.3, xdebug works, the correct php version is selected for version, its just the interpreter that won't work - maybe I don't need that after all?

0

It depends. PHP Interpreter is definitely required for

  • executing scripts locally (in CLI mode; not via browser, unless built-in server is used)
  • executing local PHPUnit tests
  • Mess Detector / CodeSniffer integration
  • and similar (local execution of any supported tool in CLI mode)


What is the name of the actual php executable? Is it php (as expected) or maybe it has different name (e.g. php54 or similar) ?

Maybe you have something like /opt/local/bin/php54/bin ? Since I'm not a Mac user, till now I've seen MAMP installations mostly (e.g. http://devnet.jetbrains.com/message/5467475 ) and they have PHP located in different place.

In any case:

  • Please check idea.log for any possible details ("Help | Show Log in Finder" or similar)
  • please try v7 EAP build (can be installed and run in parallel to v6): http://eap.jetbrains.com/phpstorm
0

/usr/bin/php -> /opt/local/bin/php54

/usr/bin/php links to php54 which is the real executable, phpstorm won't pick up the /usr/bin/php and it won't pick up the /opt/local/bin/php54

thanks for your help!

0

So ... /usr/bin/php is the actual file and NOT folder, right ?

If so --- you need to provide path to the FOLDER and not file in that field. So please try /usr/bin

0

yes I tried that, and the other bin as well, neither work, phpstorm doesn't recognize the file


0

Well .. AFAIK PhpStorm is searching for file named php on MacOS/Linux (php.exe on Window) in the folder you specify. It should work with symbolic links (I would not expect otherwise).

My only other idea would be to make a copy of real file and name it just php and try that path (assuming that it will have correct attributes and permissions).

Other than that -- if nobody else will have any better suggestions in a day or two -- feel free to submit a ticket to the Issue Tracker providing as much details as possible.

0

I can only advise to use homebrew for php and any other linux ports on OS X.

0

Apologies for digging up an old thread but I had the same problem. I am using the MacPorts provided version of PHP 5.4, which installs PHP to /opt/local/bin/php54.

The solution to get the interpreter setting in PhpStorm was quite simple - in Terminal, do something like:

$ cd /opt/local/bin && sudo ln -s php54 php

Then point PhpStorm to /opt/local/bin and hit the reload button. It should then say something like PHP Version 5.4.19.

Bit of a kludge, but works like a charm (for me, anyway).

Hope this is useful for anyone Googling!

0

Please sign in to leave a comment.