issue after Ubuntu update 14.04->16.04

Hi,

A friend was working with Dolibarr 3.5.8 on Ubuntu 14.04 since last year until july 2016 and all was ok. As Ubuntu was asking to update, he finally did it. He is now on 16.04 and can’t connect anymore to Dolibarr (local installation), error message is "Unknown column ‘u.fk_societe’ in ‘field list’ "
I know that one of the differences between 14.04 and 16.04 is the version of PHP (5.6 vs 7.0). So after reading post 109404 on askubuntu, i ran the following commands :

sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get upgrade sudo apt-get install php5.6
then after reading post 761713, to switch from PHP 7.0 to 5.6 :

sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0 sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart sudo ln -sfn /usr/bin/php5.6 /etc/alternatives/php
System is now running PHP 5.6 (as php -v is showing) but nothing has changed, i still have the same error message at login.
Please can anybody help my friend to get access to his invoices again ?
Thanks in advance.

  1. NEVER change a properly working system running your business!
  2. He should set-up a fresh 14.04 and copy all data from /var/www/html/dolibarr to the new system (Don’t forget to chmod -R www-data:www-data /var/www/html/dolibarr)
  3. He should then re-create the database used by Dollibar with phpMyAdmin and import the last backup of his Dolibar database onto the new system

Best regards

WARNING: The path to Dolibar could be different. Was /var/www/dolibar in pre 14.04. Change above accordingly

Thank you for the answer.

For sure, he won’t do this again !

I’ll try this.

No backup of the database was made before the update. The only thing he did some times is backing up the system with the “sauvegarde” software (in french), but he doesn’t know where the date is stored on the drive nor how to restore it…

  1. Well, Ubuntu 14.04 and Dolibarr 3.5.8 are now installed on a notebook, beside 16.06 on the desktop computer. i copy the original (desktop) dolibarr folder on my usb key, but i can’t paste it in /var/www/html on the notebook. When exactly do i have to chmod, before or after the copy ? On the source folder (desktop) or on the destination (notebook) ? I tried both and got this error message :

incorrect mode : «www-data:www-data»

  1. When i try to import the database, phpmyadmin displays a 1064 error (sql syntax error). But, as i said, i’m using the back up made AFTER the update.
1 Like

You have to be superuser on the laptop!

Then you can copy to /var/www/html.

Sorry - I used chmod BUT meaning chown …

To use chown you HAVE TO be in /var/www/html, then: chown -R www-data:www-data dolibarr

To import the database you might have to resort to work with mysql directly (database might be to large).

Best regards

Best regards

1 Like

Ok i’ll try the copy tomorrow as superuser.
What do you mean by “have to resort to work with mysql directly” ? I already tried to import the database using phpmyadmin. The original file was 2.5 MB while max is 2.0 MB but i deleted some lines of some tables to get 1.9 MB. So the file size isn’t the problem anymore, it seems i really have a syntax error, but i don’t know sql enough to fix it.

In phpmyadmin create empty database & new user with values from /var/www/html/dolibarr/htdocs/conf(conf.php

Then as superuser change to directory where your dolibarr database backup ist stored, call mysql and execute the following commands accordingly:

Ready to go.

Best regards

PS: Don’t forget to adjust the pathnames in /var/www/html/dolibarr/htdocs/conf(conf.php to reflect the laptop setup.

Finally i did it this way :

  • install Ubuntu 14.04 on a blank disk
  • install Dolibarr 3.5.8
  • import all the tables of the database one after the other
  • Dolibarr now working, export the database

Then back on my friend’s computer (Ubuntu 16.04) :

  • remove Dolibarr
  • install Dolibarr 3.5.8 again
  • import the database
  • adjust a lot of details thanks to your posts and the installation page of Dolibarr.

Thank you again !