piler 1.4.4 does not work with PHP 8

Issue #1338 closed
int created an issue

I upgraded my installation of piler from 1.3.8 to the most recent version 1.4.4 from the download page https://www.mailpiler.org/download.html
piler-1.4.4 (~5.7 MB), 2023.09.04. SHA256: 547052e4b3da6d17a63dd5b0aa717f0f23cd61825de2afdca28adc19c36bafd5

I also upgraded the OS from CentOS7 to Alma Linux8

Since the Installation manual https://www.mailpiler.org/installation/ states that mailpiler does support PHP 8.x
I switched the PHP installation to version 8.2 from the REMI EL8 repository

But when piler is run with PHP 8 the login page works, but after entering the login credentials it crashes with these errors:

 thrown in /var/www/piler/system/language.php on line 56
[06-Dec-2023 10:16:03 Europe/Budapest] PHP Fatal error:  Uncaught Error: Call to undefined function each() in /var/www/piler/system/language.php:56
Stack trace:
#0 /var/www/piler/system/language.php(18): Language->get_preferred_languages()
#1 /var/www/piler/index.php(21): Language->__construct()
#2 {main}
  thrown in /var/www/piler/system/language.php on line 56
[06-Dec-2023 10:17:10 Europe/Budapest] PHP Fatal error:  Uncaught Error: Call to undefined function each() in /var/www/piler/system/database/mysql.php:56
Stack trace:
#0 /var/www/piler/system/db.php(23): MySQL->query()
#1 /var/www/piler/model/user/auth.php(91): DB->query()
#2 /var/www/piler/controller/login/login.php(48): ModelUserAuth->checkLogin()
#3 /var/www/piler/system/front.php(36): ControllerLoginLogin->index()
#4 /var/www/piler/system/front.php(14): Front->execute()
#5 /var/www/piler/index.php(113): Front->dispatch()
#6 {main}
  thrown in /var/www/piler/system/database/mysql.php on line 56

I switched to PHP version 8.0 from the REMI EL8 repository as well as PHP 8.0 from the Alma Linux system repository but got the same errors.

When I use PHP 7.4 piler works fine.

Comments (3)

  1. Janos SUTO repo owner

    Your upgrade might be incomplete. By default piler installs the gui to /var/piler/www, but you are using (probably the previous piler release) from /var/www/piler. Version 1.4.4 has no each( ) calls.

  2. int reporter

    The wrong install path was indeed the cause of issue. I overlooked that the path changed from /var/www/piler to /var/piler/www and adjusted the Apache configuration accordingly. Many thanks for the quick and helpful feedback.

  3. Log in to comment