FreePBX update to 17.0.19.32 killed logrotate

Hi,

I’ve updated my three FreePBX 17 instances to the latest version 17.0.19.32 yesterday. The update seems to have an issue with logrotate, my monitoring showed that all three instances now have the same issue at midnight when running logrotate:

2025-09-03T00:00:07.428050+02:00 pbx logrotate[3864321]: Whoops\Exception\ErrorException: preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in file /var/www/html/admin/libraries/BMO/View.class.php on line 331
2025-09-03T00:00:07.428755+02:00 pbx logrotate[3864321]: Stack trace:
2025-09-03T00:00:07.428912+02:00 pbx logrotate[3864321]:   1. Whoops\Exception\ErrorException->() /var/www/html/admin/libraries/BMO/View.class.php:331
2025-09-03T00:00:07.429048+02:00 pbx logrotate[3864321]:   2. preg_match() /var/www/html/admin/libraries/BMO/View.class.php:331
2025-09-03T00:00:07.429208+02:00 pbx logrotate[3864321]:   3. FreePBX\View->setLanguage() /var/www/html/admin/bootstrap.php:212
2025-09-03T00:00:07.429370+02:00 pbx logrotate[3864321]:   4. require_once() /etc/freepbx.conf:12
2025-09-03T00:00:07.429506+02:00 pbx logrotate[3864321]:   5. include_once() /var/lib/asterisk/bin/fwconsole:12
2025-09-03T00:00:07.433178+02:00 pbx systemd[1]: dpkg-db-backup.service: Deactivated successfully.
2025-09-03T00:00:07.433641+02:00 pbx systemd[1]: Finished dpkg-db-backup.service - Daily dpkg database backup service.
2025-09-03T00:00:07.439520+02:00 pbx logrotate[3864252]: error: error running shared postrotate script for '/var/log/asterisk/sangomartapi/*.log '
2025-09-03T00:00:07.484162+02:00 pbx systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
2025-09-03T00:00:07.484528+02:00 pbx systemd[1]: logrotate.service: Failed with result 'exit-code'.

I guess I can follow the advise to “set pcre.jit=0 in file /var/www/html/admin/libraries/BMO/View.class.php on line 331”, but not sure about the side effects.

Any ideas?

I would prefer to no edit View.class.php despite that disable PCRE JIT at the php level in php.ini and set pcre.jit=0 after that try restarting php and asterisk services and monitor, thanks

Yap, that’s my plan for now. It’s already set in /apache2/php.ini, but not in cli/php.ini.

As the logrotate service uses CLI, I’ve added it there. Let’s see next midnight if it works now.

(Nevertheless I’m curious what did change with the latest update that triggers this on every machine)

I’ve filed a bugreport: [bug]: Logrotation error after update to 17.0.19.32 · Issue #207 · FreePBX/framework · GitHub

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.