Upgrade from 2.9.10 to 3.1.7 throws error

All about webserver configurations, PHP and databases.

Moderator: Thorsten

Post Reply
edc_jelie
Posts: 3
Joined: Thu Oct 27, 2022 8:16 pm

Upgrade from 2.9.10 to 3.1.7 throws error

Post by edc_jelie »

Code: Select all

phpMyFAQ Fatal error
Uncaught exception: 'TypeError'

Message: 'Return value of phpMyFAQ\Configuration::isLdapActive() must be of the type bool, null returned'

Stack trace:

#0 /var/www/phpmyfaq/src/Bootstrap.php(148): phpMyFAQ\Configuration->isLdapActive()
#1 /var/www/phpmyfaq/setup/update.php(36): require('/var/www/phpmyf...')
#2 {main}
Thrown in '/var/www/phpmyfaq/src/phpMyFAQ/Configuration.php' on line 350
I followed the original documentation here: https://www.phpmyfaq.de/docs/3.1

We only have default templates and we have no attachments, data or images. Those folders do not even exist in our installation.

I copied the database.php and ldap.php to the new ./config/ folder, but when going to http://server/setup/update.php we get the error.

PHP 7.4.32 is installed.

Should I upgrade to the latest version of 2.9 or perhaps 3.0 first, or is there something else I should look at? Thank you!
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Upgrade from 2.9.10 to 3.1.7 throws error

Post by Thorsten »

Hi,

let me check the code. Do you use LDAP?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
edc_jelie
Posts: 3
Joined: Thu Oct 27, 2022 8:16 pm

Re: Upgrade from 2.9.10 to 3.1.7 throws error

Post by edc_jelie »

Hello,

Yes, we do.

Thanks!
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Upgrade from 2.9.10 to 3.1.7 throws error

Post by Thorsten »

Hi,

okay, this explains the error.

We added a new LDAP configuration frontend with phpMyFAQ 3.0 and we moved the LDAP configuration from the old config/ldap.php file to the admin configuration the backend.

Here's the fix: please disable the LDAP support for the upgrade, then add the configuration in the admin configuration panel and enable LDAP support again.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
edc_jelie
Posts: 3
Joined: Thu Oct 27, 2022 8:16 pm

Re: Upgrade from 2.9.10 to 3.1.7 throws error

Post by edc_jelie »

Sorry for the late response, thank you for your help. I was able to complete the upgrade.
Post Reply