Roundcube Community Forum

 

FreeBSD php81-filter - undefined function error

Started by cbrace, August 03, 2023, 02:23:22 PM

Previous topic - Next topic

cbrace

Hi all,

On my FreeBSD VPS (v13.2) I upgraded PHP from v8.0 to v8.1. To update my roundcube installation, I deleted the roundecube-php80 flavor and installed the roundecube-php81 pkg. That deleted the php80 dependencies and installed the necessary php81 equivalents.

Unfortunately, something broke roundcube. I now see the following error in /var/log/httpd-error.log:

[php:error] [pid 22356] [client ##.###.####.###] PHP Fatal error:  Uncaught Error: Call to undefined function filter_var() in /usr/local/www/roundcube/program/lib/Roundcube/bootstrap.php:49\nStack trace:\n#0 /usr/local/www/roundcube/program/include/iniset.php(78): require_once()\n#1 /usr/local/www/roundcube/index.php(40): require_once('/usr/local/www/...')\n#2 {main}\n  thrown in /usr/local/www/roundcube/program/lib/Roundcube/bootstrap.php on line 49

A websearch returns a single hit here, posted by someone encountered the same error message a couple of years ago: Call to undefined function filter_var()

There was one reply:
QuoteThis function is part of php-filter extension which is usually enabled. You're the first person with this disabled/not-installed. I guess, we should mention that in the INSTALL file.

I definitely have this installed:
$ pkg info php81-filter
php81-filter-8.1.20
Name           : php81-filter
Version        : 8.1.20
Installed on   : Thu Jul 27 17:12:30 2023 CEST
Origin         : security/php81-filter


Double-checked, it's enabled in httpd.conf
LoadModule filter_module libexec/apache24/mod_filter.so

apache sees it:
$ sudo apachectl -M|grep filter
filter_module (shared)


Running Apache24 v2.4.57_1

I tried asking about this in the FreeBSD forum but no luck there. Really hope someone here has some ideas for me to try.

TIA





anarrov

I have a similar configuration and faced the same problem. Help greatly appreciated!

cbrace

Thank you for "bumping" this topic. Really really hope we can solve this soon.

SKaero

You may have better luck asking this on a FreeBSD forum since this is really a PHP packaging problem not a Roundcube problem. According to the PHP documentation the filter extension is enabled by default https://www.php.net/manual/en/filter.installation.php so for some reason the FreeBSD package is disabling it.

cbrace

Solved! If anyone else running FreeBSD encounters this error, the solution is in this thread on the FreeBSD forum: roundcube-php81 + php81-filter error msg