Migration to new server - domain

Hello,

I am trying to move self hosted invoiceninja from https://billing.domain1.com to https://billing.domain2.com.
I take a dump of the DB and import it to the new server.
I copy the files from one server to the other.
I edit properly the .env file in home directory.
But when i try to login to the new domain at https://billing.domain2.com i get redirected to https://billing.domain2.com/setup with all the details prefilled (even the passwords).
Why is this happening?

Even when i press the “Submit” button to see if something works, i get redirected to the same page https://billing.domain2.com/setup again with the prefilled values.

Any help please ?

Thank you.

If you see /setup it means the app can’t find the initialized database, I suggest double checking that the database is setup and the credentials in the .env file are correct.

But when i check the connection with the database in the dilspayed setup page, i get “success” without changing anything in the preselected values.

Found it !!
The DB password started with “=” and i missconfigered the .env file.
Stupid mistake :slight_smile:

Thank you

Awesome, glad to hear it’s working!

And all of a sudden i get now…

Warning: Unsupported declare ‘strict_types’ in /home/public_html/ninja/vendor/sabre/uri/lib/functions.php on line 1

Parse error: syntax error, unexpected ‘:’, expecting ‘{’ in /home/public_html/ninja/vendor/sabre/uri/lib/functions.php on line 23

I tried php 7.0, 7.1, 7.2 but nothing.
You think it might be a caching issue ?

I suggest using a phpinfo page to check the PHP version the web server is using.

I set the php version from cpanel, so there is no dought about it.

Sorry, I’m not sure. In most other cases a similar error was related to the PHP version.

PHP logo
PHP Version 7.2.18

Maybe try 7.1 to see if it helps

I tried 7.0 first since this was the version on the previous server, then 7.1… but nothing.

without cahnging anything… it works now.
I will let you know if i see this again.

Ok, glad to hear it works!