Error after server migration

Hi,
I have migrated my files and database to another server.
The original invoice ninja was created by the softaculous autoinstaller.
So far I have done:
recreate the subdomain it was hosted in.
copied the files
updated the database name, user and password in the env file
dumped the database files in the new database.

I do get the " Whoops, looks like something went wrong." error.
My log files show these errors:

[2021-04-14 17:03:10] production.ERROR: ErrorException [0] : /home/lionti5/URL/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php [Line 138] => unserialize(): Error at offset 0 of 81 bytes {“context”:“PHP”,“user_id”:0,“account_id”:0,“user_name”:"",“method”:“GET”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0”,“locale”:“en”,“ip”:“209.182.204.120”,“count”:1,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:"/"} []
[2021-04-14 17:03:19] production.ERROR: ErrorException [0] : /home/lionti5/URL/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php [Line 138] => unserialize(): Error at offset 0 of 81 bytes {“context”:“PHP”,“user_id”:0,“account_id”:0,“user_name”:"",“method”:“GET”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0”,“locale”:“en”,“ip”:“209.182.204.120”,“count”:1,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:"/"} []
[2021-04-14 17:03:44] production.ERROR: ErrorException [0] : /home/lionti5/URL/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php [Line 138] => unserialize(): Error at offset 0 of 81 bytes {“context”:“PHP”,“user_id”:0,“account_id”:0,“user_name”:"",“method”:“GET”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0”,“locale”:“en”,“ip”:“209.182.204.120”,“count”:1,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:"/"} []

If you could point me towards an article or some other resource to troubleshoot this issue, I’d be very thankful!
Do I need to provide other information to solve this?
Also I have replaced the actual url with “URL” in above error messages, just for context and privacy.

Hi,

If you migrate the app you need to copy over the .env file.

Hi Hillel,

I had copied the complete folder from one server to the other, including the .env file.
On the new server I have replaced the db username, db name and password to match the new database.
Any other pointers?
Thank you very much for your time.

Are you still seeing an error?

yes. It’s live here:
https://xxxxx

Can you please check storage/logs/ for details about the error?

[2021-04-15 19:25:54] production.ERROR: ***ErrorException*** [0] : /home/lionti5/URL/app/Models/Account.php [Line 1126] => Unparenthesized `a ? b : c ?: d` is deprecated. Use either `(a ? b : c) ?: d` or `a ? b : (c ?: d)`  {"context":"PHP","user_id":0,"account_id":0,"user_name":"","method":"GET","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15","locale":"en","ip":"209.182.204.120","count":1,"is_console":"no","is_api":"no","db_server":"mysql","url":"/"} []
[2021-04-15 19:25:55] production.ERROR: ***ErrorException*** [0] : /home/lionti5/URL/app/Models/Account.php [Line 1126] => Unparenthesized `a ? b : c ?: d` is deprecated. Use either `(a ? b : c) ?: d` or `a ? b : (c ?: d)`  {"context":"PHP","user_id":0,"account_id":0,"user_name":"","method":"GET","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15","locale":"en","ip":"209.182.204.120","count":1,"is_console":"no","is_api":"no","db_server":"mysql","url":"/"} []
[2021-04-15 19:25:55] production.ERROR: ***ErrorException*** [0] : /home/lionti5/URL/app/Models/Account.php [Line 1126] => Unparenthesized `a ? b : c ?: d` is deprecated. Use either `(a ? b : c) ?: d` or `a ? b : (c ?: d)`  {"context":"PHP","user_id":0,"account_id":0,"user_name":"","method":"GET","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15","locale":"en","ip":"209.182.204.120","count":1,"is_console":"no","is_api":"no","db_server":"mysql","url":"/"} []
[2021-04-15 19:36:17] production.ERROR: ***ErrorException*** [0] : /home/lionti5/URL/app/Models/Account.php [Line 1126] => Unparenthesized `a ? b : c ?: d` is deprecated. Use either `(a ? b : c) ?: d` or `a ? b : (c ?: d)`  {"context":"PHP","user_id":0,"account_id":0,"user_name":"","method":"GET","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36","locale":"en","ip":"209.182.204.120","count":1,"is_console":"no","is_api":"no","db_server":"mysql","url":"/"} []

Do you also need to see the stacktracer?

Thanks for the error! If you’re using PHP 7.4 then changing to 7.3 should help.

Hi Hillel,
Thanks a lot for the input. I changed the php version and was able to log back in.
Have a great weekend!