Error spawning PHP: spawn EACCES and Ubuntu

See original GitHub issue

Hi!

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:closed
  • Created 5 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
JonGarbayocommented, Apr 25, 2018

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:

  • add the Ondřej Surý PPA: sudo add-apt-repository ppa:ondrej/php
  • Install PHP7: sudo apt install php7.x (replace x by 0, 1 or 2, depending on what you need)
  • Set PHP5.6 as default PHP version: sudo update-alternatives --set php /usr/bin/php5.6

You will also need some other commands for your HTTP server, and some sudo apt update but that’s another story.

Thanks for your help!

0reactions
JonGarbayocommented, Apr 24, 2018

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 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found