Upgrade from 2.8.1 to 3.0.2 - database error

All about webserver configurations, PHP and databases.

Moderator: Thorsten

Post Reply
ppasch
Posts: 2
Joined: Thu May 07, 2020 8:34 am

Upgrade from 2.8.1 to 3.0.2 - database error

Post by ppasch »

Hi,
i try to upgrade my faq from 2.8.1 to 3.0.2 following intructions given in the documentation :
I delete all files except:
- database.php in the directory config/
- all files in the directory assets/template/
- the directory attachments/
- the directory data/
- the directory images/
Copy the 3.0.2 source files in my existing faq dir.

When I run the setup/update.php, I've got the folling database error :
The connection to the database server could not be established.
The error message of the database server:


I use a postgresql 9.6 database.
I've checked the logs (postgresql/apache), nothing appear.

Could you please help me ?
Thanks a lot.
Regards.
Thorsten
Posts: 15620
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Upgrade from 2.8.1 to 3.0.2 - database error

Post by Thorsten »

Hi,

please try to enable the debug log in src/Bootstrap.php and check if there are more errors.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ppasch
Posts: 2
Joined: Thu May 07, 2020 8:34 am

Re: Upgrade from 2.8.1 to 3.0.2 - database error

Post by ppasch »

Hi Thorsten,
thanks for the tip, it pointed me out that the $DB['port'] variable was missing in my database.php file.
Now i can launch my update process but in step 3, I've got the foollowing error:

Fatal error: Uncaught TypeError: Return value of phpMyFAQ\Configuration::delete() must be of the type bool, resource returned in /var/www/phpmyfaq/src/phpMyFAQ/Configuration.php:444 Stack trace: #0 /var/www/phpmyfaq/setup/update.php(358): phpMyFAQ\Configuration->delete('cache.varnishEn...') #1 {main} thrown in /var/www/phpmyfaq/src/phpMyFAQ/Configuration.php on line 444

I can't delete row in faqconfig table, my database user has the rights to delete on that table.

Thanks for help.
Regards.
Post Reply