Comments (15)
Have you tried "php.validate.executablePath": "/Applications/MAMP/bin/php/php7.0.12/bin/php"
?
from vscode-php-intellisense.
validate
has nothing to do with this extension, but is the built-in validation of VS Code. I would disable that, because you will get duplicate validation.
php.executablePath
should be set to the path of the binary, eg "/Applications/MAMP/bin/php/php7.0.12/bin/php"
.
And it needs to be at least PHP 7.
from vscode-php-intellisense.
Have you tried php.executablePath
instead of php.validate.executablePath
? Even though the settings editor warns it doesn't recognise the configuration setting it does seem to solve the problem.
from vscode-php-intellisense.
"php.executablePath":'/usr/local/bin/php',
I did it as above, but block still not work
from vscode-php-intellisense.
I think this plugin does not detect php on linux environment or cannot use it. Because I set
"php.executablePath": "/usr/bin/php"
and it still does not work.
from vscode-php-intellisense.
I have just updated to macOS Big Sur 11.5.2 and also installed PHPIntellisense. I am not sure what is broken but VSCode seems to be pointing to the wrong PHP.
Its pointing to /usr/bin/php instead of /opt/homebrew/bin/php
I tried editing settings.json changed both php.executablePath and validate.executablePath and none made any difference
I have asked a question here on stack overflow:
from vscode-php-intellisense.
The path needs to point at the php executable. (See https://code.visualstudio.com/Docs/languages/php.)
from vscode-php-intellisense.
From @TRE8 on December 1, 2016 17:43
Thanks, I see in the docs it says
{ "php.validate.executablePath": "c:/php/php.exe" }
But I'm on a Mac :/
Can't seem to figure out where the PHP executable is located.
from vscode-php-intellisense.
From @TRE8 on December 1, 2016 23:43
Good idea and I tried your suggestion but still get the message
The language server needs at least PHP 7 installed. Version found: 5.5.30
I tried adding ~ before "/Application" and got the following message:
"php.validate.executablePath": "~/Applications/MAMP/bin/php/php7.0.12/bin/php"
Cannot validate the php file. The php program was not found. Use the 'php.validate.executablePath' setting to configure the location of 'php'
from vscode-php-intellisense.
@klaasvw - your suggestion of using php.executablePath instead of php.validate.executablePath works in my case. Thanks!
from vscode-php-intellisense.
Same issue here caused by having docker persistent storage in the root of the project.
What I ended up doing was chowning the persistent database folder, opening vs code, confirm it works, and only after that I would spin up my containers. It's annoying, but it works.
Also, this is what I've got in my settings
"php.executablePath": "/usr/bin/php",
"php.validate.enable": true,
"php.validate.run": "onSave",
"php.suggest.basic": false,
from vscode-php-intellisense.
Mac user.
Good evening guys. I am struggling to have xdebug working and I would appreciate some help.
Following this guide I think it is correct to add
"php.executablePath": "/Applications/MAMP/bin/php/php7.3.7/bin/php"
to the settings.json file to override the default values that are described here.
However, when I do try to edit the settings.json file I get a yellow outline saying that something is wrong. If I go to Code > preferences > settings I do not get the whole set of values, instead I get an User Interface that allows me to navigate through both User and Workspace settings. As a consequence, I am not able to find php.executablePath and then edit it.
Furthermore, I would like to disable php.validate.enable: true
as @felixfbecker kindly suggested, but as per the same problem, I cannot find it as well.
All this pain, as I said, in order to have 'listen xdebug' working correctly. So far, it works only if I do restart constantly my MAMP servers.
Thank you so much for your help.
D.
from vscode-php-intellisense.
Within the Terminal, run vim ~/.bash_profile
Typei
and then paste the following at the top of the file:
export PATH=/Applications/MAMP/bin/php/php7.3.8/bin:$PATH
Hit ESC, Type :wq
, and hit Enter
In Terminal, run source ~/.bash_profile
from vscode-php-intellisense.
I thaught I was close but no, Razan, the last was good until /Users/.../.bash_profile:1: permission denied: /Users/.../.profile
...@192 projekt %
from vscode-php-intellisense.
Within the Terminal, run
vim ~/.bash_profile
Type
i
and then paste the following at the top of the file:
export PATH=/Applications/MAMP/bin/php/php7.3.8/bin:$PATH
Hit ESC, Type:wq
, and hit EnterIn Terminal, run
source ~/.bash_profile
THX
from vscode-php-intellisense.
Related Issues (20)
- Extension issue
- Extension issue
- Extension issue
- Keeps popping up with a Warning saying that the extension is not working properly. So I disabled it.
- php intellisense not found in vscode HOT 4
- Extension issue - PHP IntelliSense ver 2.3.14
- Extension issue
- function names inserted as GlobalFunctionName
- Extension issue
- Dependency Dashboard
- Extension issue
- Deprecation notice on start-up
- Go to definition not working on use statements HOT 1
- phpcs: Unable to locate phpcs. Command failed: "C:/Servers/php8" --version '"C:/Servers/php8"' is not recognized as an internal or external command, operable program or batch file.
- Extension issue
- This plugin shows an error when using PHP mixed with HTML
- Is this dead? HOT 2
- Deprecation warning via Github Copilot
- PHP + HTML indentation pattern
- Go To Definition fails with Definition not found HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-php-intellisense.