V18.0.4 turning on debug module crashes Dolibarr with Fatal error: Uncaught Error: Undefined constant "DOL_DATA_ROOT/dolibarr.log" #27280
Labels
Bug
This is a bug (something does not work as expected)
Bug
I had the debug log on under PHP 7.4, Dolibar v15. Upgrading to v18.0.4 and then moving to PHP v8.1 created the crash (home directory redacted):
`
Fatal error: Uncaught Error: Undefined constant "DOL_DATA_ROOT/dolibarr.log" in
/home//sites/doliUSA/core/modules/syslog/mod_syslog_syslog.php:120 Stack trace: #0
/home//sites/doliUSA/core/modules/syslog/mod_syslog_syslog.php(120): constant() #1
/home//sites/doliUSA/core/lib/functions.lib.php(1876): mod_syslog_syslog->export() #2
/home//sites/doliUSA/main.inc.php(973): dol_syslog() #3
/home//sites/doliUSA/admin/modules.php(37): require('
/home//si...') #4 {main} thrown in
/home/********/sites/doliUSA/core/modules/syslog/mod_syslog_syslog.php on line 120
Fatal error: Uncaught Error: Undefined constant "DOL_DATA_ROOT/dolibarr.log" in
/home//sites/doliUSA/core/modules/syslog/mod_syslog_syslog.php:120 Stack trace: #0
/home//sites/doliUSA/core/modules/syslog/mod_syslog_syslog.php(120): constant() #1
/home//sites/doliUSA/core/lib/functions.lib.php(1876): mod_syslog_syslog->export() #2
/home//sites/doliUSA/core/lib/functions.lib.php(502): dol_syslog() #3 [internal function]: dol_shutdown() #4 {main} thrown in
/home/********/sites/doliUSA/core/modules/syslog/mod_syslog_syslog.php on line 120`
If I have just "File" logging enabled it seems to be fine, but with "syslogd" enabled the crash occurs.
Environment Version
18.0.4
Environment OS
Linux citron.o2switch.net 4.18.0-425.19.2.lve.el7h.x86_64 #1 SMP Thu Apr 6 13:40:55 UTC 2023 x86_64
Environment Web server
Apache 2.4.58
Environment PHP
8.1
Environment Database
10.6.16-MariaDB
Environment URL(s)
https://davidolius.leighweb.com
Expected and actual behavior
I would expect that it wouldn't crash.
Steps to reproduce the behavior
Have the syslogd checked in the log module and then change the PHP version to 18.0.4
Attached files
No response
The text was updated successfully, but these errors were encountered: