Xeshing
Xeshing

Reputation: 1

PHP not detected by Vscode

Vscode does not detect my php.

I have installed :

PHP 8.2.6 (cli) (built: May 11 2023 12:51:38) (NTS) Copyright (c) The PHP Group Zend Engine v4.2.6, Copyright (c) Zend Technologies with Zend OPcache v8.2.6, Copyright (c), by Zend Technologies

And i also installed PHP Debug on vscode but it still not work.

Installed PHP Debug Installed PHP IntelliSense Checked echo $PATH

Upvotes: 0

Views: 137

Answers (1)

Xeshing
Xeshing

Reputation: 1

Fixed it, downloaded php with homebrew

  1. open terminal and type: which php
  2. copy: /opt/homebrew/bin/php
  3. open vscode and open settings with command+, and search for php.executablePath
  4. add these two lines : "php.executablePath": "/opt/homebrew/bin/php", "php.validate.executablePath": "/opt/homebrew/bin/php"

Save and restart vscode.

Upvotes: 0

Related Questions