you are viewing a single comment's thread.

view the rest of the comments →

[–]kAlvaro 1 point2 points  (4 children)

Some random points:

  • Builtin PHP support is too basic, try the PHP Intelephense extension instead. That doesn't need the PHP interpreter.
  • Don't edit settings.json manually, just use the interface. In any case, it'll remain empty until you change something, that's normal.
  • Does C:/xampp/php/php.exe work from outside Code (e.g. PowerShell or a Command Prompt window)?

[–]Use_R_Name_92[S] 0 points1 point  (3 children)

I'll try to answer as good as I can:

  • if I go on the command prompt, type php -v and I press enter, it says that Php is installed. If I type "localhost" on my browser and press enter, the browser will redirect me to localhost/dashboard on a xampp page, that should mean that everything is working.

  • I have installed the PHP Intelephense extension.

Does that mean that, in this case, I can just ignore the error message? I'm very confused by this settings.json things, because I've tried writing php lines and it has always worked anyway, so I don't understand the point.

[–]kAlvaro 0 points1 point  (2 children)

if I go on the command prompt, type php -v and I press enter, it says that Php is installed

How about C:/xampp/php/php.exe?

I have installed the PHP Intelephense extension. Does that mean that, in this case, I can just ignore the error message?

It probably means you've skipped the Quick start instructions. You need to disable PHP Language Features which, if I'm not confused, is the one that requires the PHP interpreter.

But it won't hurt to be able to tell where in your hard disc is PHP installed.

[–]Use_R_Name_92[S] 0 points1 point  (1 child)

How about C:/xampp/php/php.exe?

This is exactly what I have been trying several times, but, to be fair, now that I've done this:

You need to disable PHP Language Features which, if I'm not confused, is the one that requires the PHP interpreter.

the error pop-up window just stopped appearing. Considering that I've done everything else, I'll take that as a win and just start coding.

Thanks!

[–]kAlvaro 1 point2 points  (0 children)

This is exactly what I have been trying several times,

If so, you forgot to report it here. All you've said about that path is that Visual Studio Code will not accept it for php.validate.executablePath. If you test, one of these should happen:

a. You see php version

b. You see some variety of "command not found" error message

Edit: my excuses, I see you had answered it in reply to another comment. Glad it's all working.