1

Topic: PHP Deprecated

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version : 1.6.1
- Deployed with iRedMail Easy or the downloadable installer? Download
- Linux/BSD distribution name and version: Ubuntu 22.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL (Galera cluster)
- Web server (Apache or Nginx): Nguni
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====


Hi All! I have installed on fresh Ubuntu 22.04 latest iRedMail release (1.6.1).
And i have next error:
Sep 28 12:40:33 mail2 roundcube: PHP Deprecated:  Return type of zipdownload_mbox_filter::filter($in, $out, &$consumed, $closing) should either be compatible with php_user_filter::filter($in, $out, &$consumed, bool $closing): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /opt/www/roundcubemail-1.5.3/plugins/zipdownload/zipdownload.php on line 405

Who knows how to fix it?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: PHP Deprecated

Just ignore it, Deprecated just means the used function still works, but will/might be removed in further PHP revisions.

For now, it has no meaning for you at all, it is just a notice.

RoundCube should fix this in new releases and the notice will vanish

3

Re: PHP Deprecated

Cthulhu wrote:

Just ignore it, Deprecated just means the used function still works, but will/might be removed in further PHP revisions.

For now, it has no meaning for you at all, it is just a notice.

RoundCube should fix this in new releases and the notice will vanish

ok. Thanks.
There is the newest version (1.6.0) of roundcube in official site roundcube.net, but iRedMail installer installed version 1.5.3.
Maybe I need to upgrade roundcube version?

4

Re: PHP Deprecated

1.6.0 has issues with php8 (whic is deployed with 22.04), the same reason you get that notice is because on php7 the function is not deprecated

You can safely downgrade to php7 and use 1.6.0 that should work

5

Re: PHP Deprecated

Cthulhu wrote:

1.6.0 has issues with php8 (whic is deployed with 22.04), the same reason you get that notice is because on php7 the function is not deprecated

You can safely downgrade to php7 and use 1.6.0 that should work

Now I have php 8.1 in Ubuntu 22.04.
In system requirements roundcube 1.5.3 - php 8.0…. Maybe it’s a reason of error….

6 (edited by Cthulhu 2022-09-29 10:39:57)

Re: PHP Deprecated

https://github.com/roundcube/roundcubem … quirements

php8 just got newly supported in 1.5

i suggest do just downgrade to php7


add-apt-repository ppa:ondrej/php -y
apt update
apt upgrade

apt install php7.4 php7.4-fpm php7.4-cli -y

systemctl status php7.4-fpm


since it uses a new socket, in your nginx config you need to adjust:

fastcgi_pass unix:/run/php/php7.4-fpm.sock;


you might need other packages:

apt install php7.4-cli php7.4-curl php7.4-mysqlnd php7.4-gd php7.4-opcache php7.4-zip php7.4-intl php7.4-common php7.4-bcmath php7.4-imap php7.4-imagick php7.4-xmlrpc php7.4-readline php7.4-memcached php7.4-redis php7.4-mbstring php7.4-apcu php7.4-xml php7.4-dom php7.4-redis php7.4-memcached php7.4-memcache

7

Re: PHP Deprecated

Cthulhu wrote:

since it uses a new socket, in your nginx config you need to adjust:
fastcgi_pass unix:/run/php/php7.4-fpm.sock;

Better simply copy /etc/php/7.4/fpm/pool.d/www.conf to /etc/php/8.1/fpm/pool.d/www.conf, then restart php8.1-fpm service.