Search code examples
phpubuntuphp-extensionphp-amqp

How to configure a PHP extension for multiple PHP versions?


Using ondrej repository on Ubuntu Focal, I have installed PHP from 5.6 to 7.4.

When I install an extension, for example php-amqp in my case with apt install php-amqp, the extension is only configured for the default PHP version 7.4.

When looking for amqp.so in my system, it's only available in the PHP 7.4 extension folder /usr/lib/php/20190902.

How can I make it available in all my PHP version (and same for others extension like php-geoip for example)?


Solution

  • I'm so dumb. When I upgraded to Ubuntu Focal, ondrej's repository was not ready for it, stuck with Eoan.

    Now, I have update the repository because Focal is available and after a apt update && apt upgrade, all my PHP extensions have been reconfigured and are available in all my PHP versions.