Unable to login after moving to cloudron

Hello.
I have Dolibarr installed on my Qnap Linuxstation 18.04. In order to upgrade I installed a new “real” Linux VM on which I also installed Cloudron, which should make it easier to stay up to date with Dolibarr and another app I’m using.
After installing Dolibarr I dropped all the tables in the Database and imported the dump I made from my other installation. (This worked fine for my other app).
When I try to login to dolibarr, I get an error message that the table “dolibarr_user” could not be found. This is normal, since the table prefix in my other database is “llx”.
I did change the prefix in the config file from “dolibarr” to “llx” but the error stays the same.

Any idea where else I have to change the table prefix or what I can do to fix the problem?

One more info. On my “old” system I use the version 14.0.5 and cloudron uses the version 16.0.2.

Hope you can help me getting the system to run.

Bob

Hi,

Installing a new dolibarr and then restoring old tables to the new database seems to me dangerous.
Did you tried to restore your original dolibarr to the new host plateform (file+database) ?
If this work well, then it will probably more easyer to update dolibarr.

Regards,

Hi,

maybe you miss the “_”
At our installtion the prefix is defined as
→ $dolibarr_main_db_prefix=‘llx_’;

Regards

Hi.
Thanks for your reply. This was not the problem.
I found a solution and I will post it as a reply.

Bob

Hi,
I know that this is not the best practice, but since the installation under Cloudron is not the standard installation, I was not able to do it differently.
I did not find a way to install an older version of dolibarr.
In the end I found a solution which I will post in a separate reply.

Thanks for your help.

Bob

I found a solution, which I will describe in some detail below. Maybe this can help somebody else in the future.

The solution that worked for me was renaming all the tables by replacing the table-prefix from “llx_” to “dolibarr_”. The later one was expected by the system in Cloudron. I did not find any place where I could modify that, so I tried this.
In order to do so, I used the following script in the terminal of Cloudron, which produced the update statements for the database:

SELECT
concat(
"RENAME TABLE ",
TABLE_NAME,
" TO ",
replace(TABLE_NAME, ‘llx_’, ‘dolibarr_’),
‘;’
) AS “SQL”
FROM information_schema.TABLES WHERE TABLE_SCHEMA = ‘DATABASE_NAME’;

I then run the “RENAME” commands in the terminal as well.

When I tried to connect me to dolibarr afterwards, I saw the update screen of the application and was able to upgrade from V14 to 15 and after that from 15 to 16. Worked like a charm.

After that the database was up to date and I copied the documents and now the system is up and running.

Have a good day.

Bob

Thanks for reporting that.
It is Cloudron specific, because normaly dolibarr takes the prefix from it’s conf/conf.php file.