Microsoft VS Code: When I try to launch my program error "spawn php ENOENT" shows up

Matthew Armstrong

I am trying to run PHP code on Microsoft VS Code. When I click launch the only thing that happens is an error in the debug console saying "spawn php ENOENT".

To fix this, I have put the dll file for XDebug into the ext folder. I copied php.ini-development into a new file called php.ini and in that file I added this to the end of the file.

zend_extension="[file path]" xdebug.remote_enable = 1 xdebug.remote_autostart = 1

This changed nothing.

Then, I added an inbound rule for my firewall to allow inbound connections on port 9000. Still, nothing changed. How can I fix this.

Ralf

What fixed it for me, was adding this line to user settings:

"phpserver.phpPath": "c:\\Ampps\\php-7.1\\php.exe"

Your path may vary. (-> error occurs, because your php is not found)

phpserver: This is because I use the PHP Server extension. If you use a different extension, you need a different parameter.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

When I try to run my code with the "java" command in the cmd window, I get an error

Shows error "Cannot POST" when I try to submit the HTML form

I get stray '#' in program error when I try to compile this program

VS Code gives me an ssh_askpass error when I try to push the changes to my Github repository using the integrated git

Errors when I try to build my Java project in VS Code

Why do my code changes not compile or show up when I run my MonkeyC program from Eclipse?

when i run the program it throws error and in vs code it is giving "error:location.condition is not callable"

I'm unable to launch my unreal game with error code 5

Shows error “Cannot POST” when I try to submit the HTML form

Error occurred when I try to compile my code

My program throws an error when I try to run it on Linux (works fine on windows)

When I try to install vscode, snapd shows error code 400

Every time I type elif in code it shows error when I start program

Not sure why my program keeps prompting error when I try to close it?

What can I do if code::blocks shows error when I try to use graphics.h for c/c++?

Why this error shows up on mysql code when authentication?

I have been using Visual Studio Code in my Mac. When I try to compile and run the program, it pops a message as 'Permission denied'

the experimental syntax 'decorators-legacy is not supported and shows an error when i try to use mobx tools on my react app

Homework problem on Java: I'm trying to run my program, it shows no error however when I try to run it it doesn't work?

error when I try to activate my code navicat 12

Flutter editor shows an error when I try to add an item to list

Error in my php code when I try to graph my query table

Why MySQL throws Exception when I launch my program first time: Error reading from the stream

Error UnhandledPromiseRejectionWarning when I try to launch my Node.js app

VS Code keeps saying there is not such file when I try to run my code

How do I remove the extra brackets that shows up when I console log my code?

When I try to add "scale_shape_manual", it shows up error "All unnamed arguments must be length 1"

C program compiled file with clang leads to zsh: segmentation fault error when i try to change the assembly code

When I run my while loop, nothing shows up