Jump to content

PHP directly in VS Code


Recommended Posts

I hope this is the right place for this post, if not I apologize but it's not immediately obvious given my question.

I 'm trying to set up VS Codium to be able to run PHP interactively. I've installed the Code Runner extension and applied the following JSON settings:

    "editor.minimap.enabled": true,
    "window.menuBarVisibility": "toggle",
    "window.zoomLevel": 0,
    "window.titleBarStyle": "native",
    "workbench.colorTheme": "Default Dark+",
    "php.validate.executablePath": "/usr/bin/php"

When I go to test it I get the following error:

[Running] php "/opt/lampp/htdocs/cms/test.php"

/bin/sh: line 1: php: command not found


[Done] exited with code=127 in 0.047 seconds


It's just a simple echo so I didn't make any typos and I'm assuming it's a problem with the $PATH even though a 'which' query on the CLI gives the path I used above. I'm really reluctant to start messing around with $PATH related things without knowing more. Can someone give me some guidance on how to sort out this issue please?!


Link to comment
Share on other sites

I ran flatpak list from the CLI -  Yes, it says that VSCodium is installed through it


EDIT: apologies for how stupid my last comment sounded, I had just opened my eyes from napping, I should have waited until I could have put in more effort to the response. My negligence, my error, apologies

Edited by TechnoDiver
Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.