There are similar topics about this, but everyone fails to answer the question. So to set up the php on visual studio code, using Linux Ubuntu 20.04, I have to set the exectubale Path. This should be:
"php.validate.executablePath": "/usr/bin/php"
Unfortunately Visual Studio Code keeps returning the error: "Cannot validate since /usr/bin/php is not a valid php executable. Use the setting 'php.validate.executablePath' to configure the PHP executable."
So, I also tried to dissable the @Builtin as stated by the PHP Intelehense. But than I continuously get the error 'PHP not found'. I tried setting the path in every possible parameter and I tried several paths, also invoking php.ini file direct (/etc/php/8.1/apache2), which also didn't make a difference.
I tried every possible path that "whereis php" returns. None of them is good for visual studio code. I tried reinstalling php, but it makes no sense cause ubuntu has a standard php inbuild. Neverthelles I am sure there is a php version running. I notice on the github page from brapifra that a lot of people have problems with this.
Why doesn't Visual Studio Code accept the correct path and how can I make it accept the correct path?