Error spawning PHP: spawn EACCES and Ubuntu
See original GitHub issueHi!
I know this kind of issues are already closed or resolved, but I can’t make it work on my Ubuntu 16.04 😦
Using the "php.executablePath" setting, I tried to put the PHP7 installation (that I downloaded from the official PHP website) on multiple paths, like the C: root, in /usr/bin/, in /home/MYUSERNAME/bin.
For every path, I tried a chown with my username and a chmod 777, but the result is the same: Error spawning PHP: spawn EACCES.
Could you help me to solve this issue?
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Visual Studio Code: Spawn UNKNOWN - Stack Overflow
I was using /opt/lampp/php therefore VSCode was showing Error spawning PHP: spawn EACCES error as soon as my files were loading in the...
Read more >How to fix this Error: spawn EACCES - Edward Beazer Blog
This error comes up when you don't have full permissions to the project folder. You want to run the chmod command in order...
Read more >How to fix this Error: spawn EACCES - Ionic Forum
go to your project folder, right click and get Info ( be sure to aply read & write to all the folders/sub folders...
Read more >Command fails with exit xode1:php.exe is not recognized as a ...
Keep getting a “ERROR SPAWNING PHP: Command fails with exit xode1:php.exe is not ... connect via ssh to our dev env ( Ubuntu...
Read more >Laravel Sail: How to add executablePath in VSCode Settings
It then shows Notification with spawn ./php.bat EACCES , I cannot verify if it worked or not. It does not validate the PHP...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It worked!
After following the instructions, I had to specify
"php.executablePath": "/usr/bin/php7.2"in my VS Code settings. But now it works, and I didn’t break my PHP 5.6 app 😃For future reference, just in case this article could be deleted, here are the main steps:
sudo add-apt-repository ppa:ondrej/phpsudo apt install php7.x(replace x by 0, 1 or 2, depending on what you need)sudo update-alternatives --set php /usr/bin/php5.6You will also need some other commands for your HTTP server, and some
sudo apt updatebut that’s another story.Thanks for your help!
Well, I found this page: How to Install Different PHP (5.6, 7.0 and 7.1) Versions in Ubuntu
I will follow these instructions when I will have some time. I will come back here to tell how it worked or not 😃