Can't Access admin page after install

All about webserver configurations, PHP and databases.

Moderator: Thorsten

Post Reply
jjohnson
Posts: 5
Joined: Fri Oct 29, 2021 6:25 pm

Can't Access admin page after install

Post 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
Thorsten
Posts: 15620
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Can't Access admin page after install

Post 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
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
jjohnson
Posts: 5
Joined: Fri Oct 29, 2021 6:25 pm

Re: Can't Access admin page after install

Post by jjohnson »

The faqright table is empty but the link did fix the second issue.
Thorsten
Posts: 15620
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Can't Access admin page after install

Post 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
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
jjohnson
Posts: 5
Joined: Fri Oct 29, 2021 6:25 pm

Re: Can't Access admin page after install

Post 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.
Thorsten
Posts: 15620
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Can't Access admin page after install

Post 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
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
jjohnson
Posts: 5
Joined: Fri Oct 29, 2021 6:25 pm

Re: Can't Access admin page after install

Post by jjohnson »

It's on. No messages when I run setup. Attached file is all I see when I run setup.
You do not have the required permissions to view the files attached to this post.
jjohnson
Posts: 5
Joined: Fri Oct 29, 2021 6:25 pm

Re: Can't Access admin page after install

Post by jjohnson »

It appears to be something with SQL Server. I installed MariaDB and setup ran to completion.
Post Reply