I'm trying to set up the PhpStorm CLI interpreter on my New M1 Mac Book. PHP 8.0 itself is running fine, but I cannot add it as a CLI Interpreter within PhpStorm.
// installation commands
brew install php
brew link [email protected]
// which php
/opt/homebrew/bin/php
// php -v
PHP 8.0.2 (cli) (built: Feb 4 2021 12:48:26) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.2, Copyright (c) Zend Technologies
with Zend OPcache v8.0.2, Copyright (c), by Zend Technologies
sebastian@nbch003 ~ %
// php --ini
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/error_log.ini,
/opt/homebrew/etc/php/8.0/conf.d/ext-opcache.ini,
/opt/homebrew/etc/php/8.0/conf.d/php-memory-limits.ini
Usually, within the PhpStorm CLI Interpreter Settings, I map just the Path to the Current PHP Installation, but this time, PhpStorm does not recognize the PHP 8.0 Interpreter.
Compared to my old setup, on this path, no bin
folder is present to select.
Any ideas?
The "PHP Executable" path in PhpStorm is not for the configuration directory, it's for the "php" binary itself.
Running which php
on your terminal should reveal the linked interpreter path.
It's probably something like /opt/homebrew/bin/php
.
the php executable path is in /opt/homebrew/Cellar/php/8.1.7/bin/php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With