Page 1 of 1

PHP Fatal error when upgrading from 1.45 to 1.50

Posted: 15 Nov 2022, 13:07
by wvv
I did as suggested in the INSTALL.TXT: overwrite all files except database.inc. When I now try to access the planning website, the browser window remains empty and in my apache error.log I find the following error:

PHP Fatal error: Uncaught mysqli_sql_exception: Duplicate column name 'date_creation' in /var/www/html/soplanning/includes/db_wrapper.inc:58\nStack trace:\n#0 /var/www/html/soplanning/includes/db_wrapper.inc(58): mysqli_query()\n#1/var/www/html/soplanning/includes/class_version.inc(197): db_query()\n#2 /var/www/html/soplanning/includes/class_version.inc(20): Version->upgradeVersion()\n#3/var/www/html/soplanning/www/install/index.php(10): Version->checkInstall()\n#4 {main}\n thrown in /var/www/html/soplanning/includes/db_wrapper.inc on line 58, referer: http://planprod/www/index.php

How do I fix this?

Re: PHP Fatal error when upgrading from 1.45 to 1.50

Posted: 15 Nov 2022, 14:22
by soplanning
Hello
Very strange.
It seems your install is "in between", some of the databse upgrades seems to be already applied.
Maybe a previous update stopped during the process ?
Could you please run line by line the SQL updates located in /soplanning/sql/update/v1.50.00.txt in your database (by command line or via phpmyadmin).
If you have an error on a line, please remove it and continue with the next one.
At the end the solution should work.

If still not working after this manual process, please send us your database (only the database, not files), we'll upgrade if for you. Send it to support@soplanning.org

Re: PHP Fatal error when upgrading from 1.45 to 1.50

Posted: 15 Nov 2022, 14:53
by wvv
Your suspicion seems to be the case. I think after the upgrade on a new server, the (production) database was accessed by the old 1.45 version on the old server, which downgraded the version number in the database, but didn't (of course) reverse the changes in the database structures.

The manual method worked. Thanks!