phplinuxvisual-studio-codexamppphp-extension

VsCode php.validate.executablePath, after insalled XAMPP


i'm trying to set the certain path for the php extension in my vscode (using linux)

i started installing the XAMPP and after it..i tried to use the extension writing some php scripts(php extension INTELLISENSE and DEBUG), but the extension is not working properly and it's showing that error:

Cannot validate since /usr/bin/php is not a valid php executable. Use the setting 'php.validate.executablePath' to configure the PHP executable.

i tried to set it using que path which is provided by vscode documentation, but it's still no working.

Can anyone help me !! please!!!


Solution

  • I found a solution, typing in terminal

    'whereis php'

    that returns the absolute path for set it in the vscode extension

    /opt/lampp/bin/php

    Then, setting the path in the follow line

    php.validate.executablePath: "/opt/lampp/bin/php",
    

    So, I hope this solution is helping someone behind the screen.