Set php interpreter which is located on virtual machine

I have a windows desktop as my main computer.  My development environment is on a vmware box running ubuntu.

Now I am trying to set up xdebug etc but phpstorm will not allow me to select my php interpreter (located on the vmware box)

When i try to select the php interpreter (which will be on the virtual machine) in PHP Storm, it is not allowing me to select my php as the /usr/bin directory appears almost empty...

Untitled.png

Its definately not permission as i can open files through the ide which are in the /usr/bin folder:

Untitled.png

Why is this happening and is there a way to solve?

10 comments
Comment actions Permalink

Hi there,

Setting up PHP interpreter makes only sense when you will be running PHP scripts/PHPUnit test/etc on the same computer/environment where PhpStorm is installed. In particular it means: it has to be of the same platform. In your case you run PhpStorm on Windows while trying to point to Linux PHP (there is no php.exe on Linux .. and more importantly, Linux files cannot be executed in Windows).

0
Comment actions Permalink

Yes but phpstorm wont allow me to use xdebug without specifying the interpreter.

I can have this setup fine with netbeans

0
Comment actions Permalink

Hi there,

Yes but phpstorm wont allow me to use xdebug without specifying the interpreter.

I have no idea what are you talking about -- works fine here. Describe what are you doing (where and what it does not allow you to do) and screenshots please.

Also -- double check my message about when specifying php interpreter is required. For ALL other situations you do not need this (unless maybe, you want to debug rempte CLI, but still not sure if it required).

I can have this setup fine with netbeans

Are you using PhpStorm or Netbeans here? I hope you do understand that PhpStorm is not Netbeans, that tehse two products work differently, have their own advantages and restrictions etc etc.

0
Comment actions Permalink

Yes, i do know the difference between netbeans and phpstorm.

I am not sure where your confusion is coming from.

- I have a desktop pc running windows 7.

- I do not want to develop in a windows environment so I have a virtual machine running Ubuntu.

- My development environment is all based on the Ubuntu virtual machine and i access the source files by mapping a drive on the virtual machine.  Therefore my IDE (PHPStorm in this case) is in my windows environment but its actually using the filesystem on the virtual machine.

- The only problem I have is that I now want to setup xdebug from within the ide.  PHPStorm will not allow me to do this without first selecting the php interpreter location - and this is the crux of the problem:  It will not allow me to select the interpreter that is on the virtual machine (Ubuntu) where my development environment is.  It forces the interpreter to be on the local machine and will not accept it if it is on a mapped drive.

I mentioned netbeans as, this allows me to have the setup described above and still allows xdebug to work fine through the IDE.  PHPStorm does not due to no allowing the interpreter to be selected.

I have already uploaded screenshots.

0
Comment actions Permalink

Hi there,

I perfectly understand how your environment is setup (the general idea). But you completely misunderstood my question -- where PhpStorm requires you to provide PHP interpreter, when it is not required for remote debugging (which is your case, since php and webserver are on virtual server)?

Once again: setting up PHP interpreter makes only sense when you will be running PHP scripts/PHPUnit test/etc on the same computer/environment where PhpStorm is installed.

0
Comment actions Permalink

In that case I am missing something fundamental then.

When I click on debug to debug the application, phpstorm will not allow the debugger to run because the interpreter has not been set.

So when i click on debug it will not proceed and considers the fact that there is no interpreter set to be an issue.

I am therefore unable to use xdebug.

0
Comment actions Permalink

Please provide a screenshot of the screen where it asks for PHP interpreter to be set up. Much better -- if you can of course -- small screencast of what are you doing (how do you click debug and what Run/Debug configuration is select at that moment etc).

Right now I can only say -- you doing something wrong. most likely you clicking on Debug button when wrong Run/Debug configuration is selected (that drop down box on the left).

0
Comment actions Permalink

I highly recommend checking the last article/manual on this page (in case you have not done it yet): http://confluence.jetbrains.net/display/WI/Documentation

0
Comment actions Permalink

I know this is an old thread but it is very highly ranked on Google for "phpstorm no interpreter" and "phpstorm interpreter" and appears to be unresolved.

It is not possible to combine a local windows development enviroment with a PHP interperter on a virtual machine. If you must have your PHPStorm on Windows and a Linux interperter, you will have to instal a Cgiwin enviroment.


The most practical thing to do would be to install WAMP or your respective version of PHP from php.net/downloads which matches the version running on your virtual machine.

0
Comment actions Permalink

Hi Charles,

You need to find those types of configuration mentioned by Andriy:
'To debug (launch from IDE and debug, to be precise) script on remote server you will need to create Run/Debug Configuration of different type: either "PHP Remote Debug" or "PHP Web Application".'

More here:
http://devnet.jetbrains.com/thread/452742?tstart=0

0

Please sign in to leave a comment.