Hi,
I was on v15 (some point version) and between the last time I installed Dolibarr and this month’s end-of-month billing where I use Dolibarr, I’d changed from PHP 7.4 to 8.1 because other sites on my server needed it. I went into Dolibarr and was having weird problems (still v15) so I noticed that the world had moved on to v18.0.4. So I went through the process of migrating from v15 to v18.0.4. This migration was done on PHP v8.1. My v18.0.4 was basically giving me 500 errors left and right and finally just gave me white screens.
I bumped my PHP back to 7.4 and I could re-log into my dolibarr v18.0.4.
The problem is that I can’t stay on PHP 7.4 I need to move to v8.1 for my other sites.
So my question is, did my Dolibarr migration from v15 to v18.0.4 get messed up because I did it on PHP v8.1? If so, is there a way to fix things? I needed to get my billing out so I went ahead and did it on the Dolibarr 18.0.4 running on PHP 7.4. If I restore from backup BEFORE I migrated to v18.0.4 I won’t have my new invoices on it.
Any thoughts from any experts out there as to what I could look at or steps I could take to get out of this mess?
Many thanks!
Hi @dleigh
If everything works with PHP 7.4 I think there is no problem with your installation.
You can use PHP 7.4 only for Dolibarr until v 19.0.0 is out!
You have to create a .htaccess file with content like this
Thank you so much for your reply. I really need to go to PHP 8.1 so I don’t want to stay on 7.4 if I don’t have to. I just tried going back to 8.1 and it’s a white screen again. So I’m stuck on 7.4 unless someone can tell me what to change to make 8.1 work for 18.0.4 'cause it’s not working for me.
Sorry I wasn’t clear enough, this way you keep server on PHP 8.1 and only Dolibarr on PHP 7.4
You have to check your logs to see what is wrong with PHP 8.1 maybe an external module is causing the problem!
No, you were very clear - sorry. I just read it too fast. Excellent idea. Thanks!
I wasn’t seeing anything in the logs (that I could find) that told me anything. I think I’ll have to open a ticket with my hosting company to ask about that.
Thanks again!
So, I was able to go to my cPanel and change the PHP options to “display errors” and, with the PHP version of 8.1, I saw this: (my 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
So I switched back to PHP 7.4 and switched off the debug logging module (which was listed as version 18.0.4) and then I could leave PHP version 8.1 in place.
I don’t really need debug logging right now, but hopefully I won’t until that gets fixed.
At any rate, I’m good now with version 18.0.4 of Dolibarr working with PHP v8.1