I have an old server running ubuntu 18 (which I cannot upgrade) and PHP 7.3.
lsb_release -a
No LSB modules are available. Distributor ID: Ubuntu Description:
Ubuntu 18.04.6 LTS Release: 18.04 Codename: bionic
php -v
PHP 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Sep 2 2019 12:54:24) ( NTS )
I need imap extension for PHP 7.3 but cannot install it through apt, php-imap would give me 7.2 version and php7.3-imap is not found.
apt search php-imap
php-imap/bionic,now 1:7.2+60ubuntu1 all [installed]
apt search php7.3-imap
Sorting... Done Full Text Search... Done
apt search php7.3
libapache2-mod-php7.3/now 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,local] server-side, HTML-embedded scripting language (Apache 2 module)
php7.3/now 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 all [installed,local] server-side, HTML-embedded scripting language (metapackage)
php7.3-bz2/now 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,local] bzip2 module for PHP
php7.3-cli/now 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,local] command-line interpreter for the PHP scripting language
php7.3-common/now 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,local] documentation, examples and common module for PHP
php7.3-curl/now 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,local] CURL module for PHP
php7.3-gd/now 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,local] GD module for PHP
php7.3-json/now 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,local] JSON module for PHP
php7.3-mbstring/now 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,local] MBSTRING module for PHP
php7.3-mysql/now 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,local] MySQL module for PHP
php7.3-opcache/now 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,local] Zend OpCache module for PHP
php7.3-readline/now 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,local] readline module for PHP
php7.3-xml/now 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,local] DOM, SimpleXML, WDDX, XML, and XSL module for PHP
php7.3-zip/now 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,local] Zip module for PHP
What would be my options?
Could I install it manually and enable it through php.ini? Or would there be any repo that has it and still works for ubuntu 18? I also have ppa:ondrej/php installed, but required module is not there.
Thank you in advance.