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.
NEVER change a properly working system running your business!
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)
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
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…
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»
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.
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.