Page 1 of 1

Can't Access admin page after install

Posted: Fri Oct 29, 2021 6:43 pm
by jjohnson
I just ran the setup/index.php (version 3.0.9 stable) and everything appears to have worked. Windows Server 2019, IIS, PHP 8.0. Configuration files created. Database tables created. But when I try to access the admin/index.php file i get the following error:

Fatal error: Uncaught TypeError: phpMyFAQ\Database\Sqlsrv::fetchArray(): Return value must be of type array, null returned in E:\phpMyFAQ\src\phpMyFAQ\Database\Sqlsrv.php:121 Stack trace:
#0 E:\phpMyFAQ\src\phpMyFAQ\Permission\BasicPermission.php(435): phpMyFAQ\Database\Sqlsrv->fetchArray()
#1 E:\phpMyFAQ\src\phpMyFAQ\Helper\AdministrationHelper.php(131): phpMyFAQ\Permission\BasicPermission->getAllRightsData()
#2 E:\phpMyFAQ\admin\header.php(51): phpMyFAQ\Helper\AdministrationHelper->setUser()
#3 E:\phpMyFAQ\admin\index.php(272): require('...')
#4 {main} thrown in E:\phpMyFAQ\src\phpMyFAQ\Database\Sqlsrv.php on line 121


If I try to access the public page I get:

Fatal error: Uncaught TypeError: phpMyFAQ\Database\Sqlsrv::fetchArray(): Return value must be of type array, null returned in E:\phpMyFAQ\src\phpMyFAQ\Database\Sqlsrv.php:121 Stack trace:
#0 E:\phpMyFAQ\src\phpMyFAQ\Category.php(241): phpMyFAQ\Database\Sqlsrv->fetchArray()
#1 E:\phpMyFAQ\src\phpMyFAQ\Category.php(141): phpMyFAQ\Category->getOrderedCategories()
#2 E:\phpMyFAQ\index.php(295): phpMyFAQ\Category->__construct()
#3 {main} thrown in E:\phpMyFAQ\src\phpMyFAQ\Database\Sqlsrv.php on line 121

Re: Can't Access admin page after install

Posted: Sat Oct 30, 2021 4:46 pm
by Thorsten
Hi,

one question: is the table "faqright" filled with data?

This fix might fix the second error: https://github.com/thorsten/phpMyFAQ/co ... 5dd3592471

bye
Thorsten

Re: Can't Access admin page after install

Posted: Mon Nov 01, 2021 1:17 pm
by jjohnson
The faqright table is empty but the link did fix the second issue.

Re: Can't Access admin page after install

Posted: Mon Nov 01, 2021 1:33 pm
by Thorsten
Hi,

it will be easier if you delete the file config/database.php and delete all tables and start the installation with the fixed file again.

bye
Thorsten

Re: Can't Access admin page after install

Posted: Mon Nov 01, 2021 2:21 pm
by jjohnson
Tried that. It's like it never actually finishes the setup. No error message but I also don't get a message that it completed successfully.

Re: Can't Access admin page after install

Posted: Mon Nov 01, 2021 2:24 pm
by Thorsten
Hi,

okay, looks like there's another issue. Could you please try to enble the debug mode in src/Bootstrap.php and try it again?

Thanks for your help!

bye
Thorsten

Re: Can't Access admin page after install

Posted: Mon Nov 01, 2021 2:44 pm
by jjohnson
It's on. No messages when I run setup. Attached file is all I see when I run setup.

Re: Can't Access admin page after install

Posted: Mon Nov 01, 2021 5:07 pm
by jjohnson
It appears to be something with SQL Server. I installed MariaDB and setup ran to completion.