Because I rolled back to a server back-up it’s now working again on v4.5.19 there would be no upgrade error in laravel-error.log unless I repeat the upgrade again.
I might setup a staging version to try out the upgrade again.
On another note would upgrading to V5 be the better option? I looked at the documentation and when clicking on Start Migration the next step is also broken for me, I have Invoice Ninga installed in a sub directory like:
I setup a staging site and tried the upgrade again, here’s what happened.
On the staging site there was the option to upgrade to v4.5.21 so I proceeded. Upon upgrade I got the same error message:
Had a look at storage/logs/laravel-error.log which revealed the following:
[2020-11-08 12:20:54] production.ERROR: ***ErrorException*** [0] : /home/root/public_html/invoiceninja/app/Models/Account.php [Line 1126] => Unparenthesizeda ? b : c ?: dis deprecated. Use either(a ? b : c) ?: dora ? b : (c ?: d) {"context":"PHP","user_id":1,"account_id":"1","user_name":"","method":"GET","user_agent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36","locale":"en","ip":"","count":4,"is_console":"no","is_api":"no","db_server":"mysql","url":"/"} []
Through trial and error I managed to fix the issue at line 1126 by putting parenthesis around this:
Hi @hillel, That sorted out the issues. I am running PHP 7.4 accross the server but added this to Invoice Ninja .htaccess file to run independently at PHP 7.3
# Use PHP73 as default AddHandler application/x-httpd-php73 .php <IfModule mod_suphp.c> suPHP_ConfigPath /opt/php73/lib </IfModule>
Hi @hillel I’ve finally managed to upgrade to V5, it’s blazingly fast comapred to V4, thanks.
I’m a bit stuck on the cron job, from the dashboard I’m getting “The crons need to be enabled” I’m using cPanel to add/edit cron jobs. After V5 installation I checked and the following command was added:
Sorry but unfortunately things have taken a dip, my V5 installation has gone down, it’s just a blank page now. I’ve enabled APP_DEBUG=true in the .env file. Don’t know what to do from here.