Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

IDE-PHP could not launch your PHP runtime. No PHP interpreter found at ... #51

Closed
na2axl opened this issue Oct 1, 2017 · 15 comments
Closed

Comments

@na2axl
Copy link

na2axl commented Oct 1, 2017

Hi!
I have an issue trying to set the path of my PHP7 installation. I've tryied several times with the PATH, using the PHP_HOME environment variable, and setting the path directly in Atom settings but nothing. ide-php reports all times the error "IDE-PHP could not launch your PHP runtime. No PHP interpreter found at ..."
I have tried with php7.1.20 both 64 and 32 bits versions.
I'm using Atom 1.21.0-beta-2

@mikebronner
Copy link

Make sure to include the executable file as well, not just the path.

@na2axl
Copy link
Author

na2axl commented Oct 2, 2017

@mikebronner this fixed my problem, thank you... But I've also a question... Why using the PATH seems to not work? I've also tried to include the executable file in the PHP_HOME variable (the path is C:\PHP\php.exe) but nothing... It has worked only when I've set the path to the php executable directly in ide-php settings.

@mikebronner
Copy link

It's been a while, but I believe windows ignores executables in PATH variables. I'll defer to @damieng though, for a final answer. :)

@damieng
Copy link
Contributor

damieng commented Oct 2, 2017

If you have configured a path in ide-php it will attempt to use that binary, e.g. c:\myapps\php7\php.exe

If you haven't then it will look for the PHP_HOME environment folder which points to a directory. It will try and execute php from in there.

If neither of these things are set it just tries to execute php which will search through your PATH. i.e. if you are able to type php --version from the command prompt in Windows and see correct output then you shouldn't need to configure or set anything.

Is found at really "..." on your system? If so I'd recommend going into your settings for ide-php and clearing the "PHP Path" field as it sounds like you have put ... in there by mistake.

@na2axl
Copy link
Author

na2axl commented Oct 2, 2017

@damieng thank you for the answer...

I will explain what I've done exactly:

  1. I've use the PATH environment variable to set the path to php 7 (the path is C:\PHP) but the plugin reports the error "IDE-PHP could not launch your PHP runtime. No PHP interpreter found at php"
  2. I've use the PHP_HOME environment variable to set the same path to my php 7 installation but ide-php reports the same error
  3. I've set the path to php 7 directly in ide-php settings and it reports the error the error "IDE-PHP could not launch your PHP runtime. No PHP interpreter found at C:\PHP\"
  4. With the answer of @mikebronner, I've set the path to my php 7 executable (c:\php\php.exe) directly in ide-php settings and it's work perfectly

@damieng
Copy link
Contributor

damieng commented Oct 2, 2017

  1. That's strange as that's the very configuration I use. Does typing php --version in the command prompt work okay?
  2. Should definitely work - at a loss as to why
  3. If you set the configuration by hand in ide-php it should be fully qualified including the php.exe so c:\PHP\php.exe should do it

I assume that's what you did in 4?

@na2axl
Copy link
Author

na2axl commented Oct 2, 2017

  1. Yes, php -v works in the console
    php
  2. I've tried several times, with x86 and x64 releases of php 7 but nothing
  3. Yes it's exactly what I've done in 4

@damieng
Copy link
Contributor

damieng commented Nov 16, 2017

Given this is working for you I'm going to close down this issue.

@damieng damieng closed this as completed Nov 16, 2017
@madvik
Copy link

madvik commented Dec 18, 2017

I have the same problem.

@rsese
Copy link

rsese commented Dec 18, 2017

What operating system are you running and what's the output of this command @madvik?

php -v

Also, what did you set Settings > Packages > ide-php > PHP Path to?

@madvik
Copy link

madvik commented Dec 19, 2017

Windows 8.1 Entreprise
image

image

@rsese
Copy link

rsese commented Dec 19, 2017

The PHP Path setting should include the .exe file as mentioned in the setting description, can you add \php.exe to the end of your path?

@damieng
Copy link
Contributor

damieng commented Dec 19, 2017

I updated the description for the next version that will clarify the php.exe part should be included.

@ghost
Copy link

ghost commented Apr 22, 2018

hey, I use xampp instead of raw apache installation, how to make atom php ide work with xampp php intrepretor?.

@damieng
Copy link
Contributor

damieng commented Apr 22, 2018

@develsrk The upstream langauge server https://github.com/felixfbecker/php-language-server requires the regular PHP runtime as far as I know but you could ask there.

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

No branches or pull requests

5 participants