Can't connect PHP to my Visual Studio Code

146 Views Asked by At

I got stuck while setting up PHP on my Mac. I downloaded it via brew and I have it on my computer.

PHP 8.0.26 (cli) (built: Nov 23 2022 05:33:21) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.26, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.26, Copyright (c), by Zend Technologies

this is what i get when I type php --ini in Terminal:

Configuration File (php.ini) Path: /opt/homebrew/etc/php/8.0
  Loaded Configuration File:         /opt/homebrew/etc/php/8.0/php.ini
  Scan for additional .ini files in: /opt/homebrew/etc/php/8.0/conf.d
  Additional .ini files parsed:      /opt/homebrew/etc/php/8.0/conf.d/ext-opcache.ini

I tried to add /opt/homebrew/etc/php/8.0 into my settings.json but it didn't work out. I appreciate any help!

I tried to change path of PHP to MAMP's PHP, but it did not apply. Also I have phpinfo.php file that is located in: /Library/WebServer/Documents/phpinfo.php

0

There are 0 best solutions below