Replies: 3 comments 5 replies
-
I am running into a similar problem. I want to have multiple PHP versions installed. Each with some extra extensions. How can I install them for different versions of PHP? As far as I understand the current approach, I need to reinstall the extensions when I switch the PHP version. |
Beta Was this translation helpful? Give feedback.
-
Same problem here. I need Xdebug for a PHP 8.2 laravel development and a PHP 7.4 magento development. Now we have Herd PRO! Will the pro version be a solution to run PHP 7.4 with Xdebug and PHP 8.2 with Xdebug? |
Beta Was this translation helpful? Give feedback.
-
Closing this discussion since Herd 1.4 comes with built-in xdebug extension already pre-compiled for all availables PHP versions and processors architectures. If you hit this discussion later it may also be applied for any other extension that you would like to install. So if you need to manage different versions from any extension I would recommend you:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Operating system version
macOS Sonoma 14.2.1
System architecture
ARM64 (M1, M2, etc)
Herd Version
1.3.2
PHP Version
PHP 8.2.14
Bug description
I followed the instructions of website/docs to install through
brew
andpecl
and added values tophp.ini
but it doesn't work at all. Xdebug is not loaded.I'm yet using fish shell and I identify that during onboard Herd did not include
HERD_PHP_82_INI_SCAN_DIR
on my environment variables. So I needed to set up manually on~/.config/fish/config.fish
After solved this problem I run
php -v
and got the messages below:What happened is that when I installed PHP through
brew
, as recommended by the docs, it installed PHP 8.3. Then, when I installed Xdebug throughpecl
, it installed a Xdebug version for PHP 8.3. However Herd is using PHP 8.2 version which is incompatible with installed Xdebug.Since PHP 8.2 is the default version of Herd, the docs should instruction the user to install PHP with
brew install [email protected]
and even aware the user of this incompatibility, if it needs Xdebug for other specific version of PHP.To solve the problem I needed to remove Xdebug, remove PHP and then install PHP 8.2 and install Xdebug:
Then I edit Herd
php.ini
file to set the new path withand enabled it as my needs with
Finally when I run
php -v
I got:Steps to reproduce
No response
Relevant log output
No response
Beta Was this translation helpful? Give feedback.
All reactions