Install errors (creation of tables in database ?)

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
camille
Posts: 8
Joined: Thu Feb 25, 2021 4:24 pm

Install errors (creation of tables in database ?)

Post by camille »

Hi,
I'm trying to install phpMyFAQ on a new server (i've already installed it elsewhere and it went well). I want to install the latest stable version (ie 3.0.8). I'm using php_fastcgi in my server configuration and a postgreSQL db.

I keep getting these errors when when going through the install process :

Code: Select all

Notice
: Trying to access array offset on value of type null in
/my/path/phpmyfaq/src/phpMyFAQ/Installer.php
on line
663


Notice
: Trying to access array offset on value of type null in
/my/path/phpmyfaq/src/phpMyFAQ/Installer.php
on line
849


Notice
: Trying to access array offset on value of type null in
/my/path/phpmyfaq/src/phpMyFAQ/Installer.php
on line
856


Notice
: Trying to access array offset on value of type null in
/my/path/phpmyfaq/src/phpMyFAQ/Installer.php
on line
867


Warning
: pg_query(): Query failed: ERROR: relation "faquser_user_id_seq" already exists in
/my/path/phpmyfaq/src/phpMyFAQ/Database/Pgsql.php
on line
103


Warning
: pg_query(): Query failed: ERROR: relation "faqstopwords" does not exist LINE 1: INSERT INTO faqstopwords (id, lang, stopword) VALUES (0, 'cs... ^ in
/my/path/phpmyfaq/src/phpMyFAQ/Database/Pgsql.php
on line
103

INSERT INTO faqstopwords (id, lang, stopword) VALUES (0, 'cs', 'dnes')ERROR: relation "faqstopwords" does not exist LINE 1: INSERT INTO faqstopwords (id, lang, stopword) VALUES (0, 'cs... ^
Warning
: pg_query(): Query failed: ERROR: relation "faquser" does not exist LINE 7: faquser ^ in
/my/path/phpmyfaq/src/phpMyFAQ/Database/Pgsql.php
on line
103


Warning
: pg_num_rows() expects parameter 1 to be resource, bool given in
/my/path/phpmyfaq/src/phpMyFAQ/Database/Pgsql.php
on line
177


Fatal error
: Uncaught TypeError: Return value of phpMyFAQ\Database\Pgsql::numRows() must be of the type int, null returned in /home/ubuntu/sites/phpmyfaq/src/phpMyFAQ/Database/Pgsql.php:177 Stack trace: #0 /my/path/phpmyfaq/src/phpMyFAQ/User.php(597): phpMyFAQ\Database\Pgsql->numRows() #1 /my/pathphpmyfaq/src/phpMyFAQ/User.php(479): phpMyFAQ\User->getUserByLogin() #2 /my/path/phpmyfaq/src/phpMyFAQ/Installer.php(995): phpMyFAQ\User->createUser() #3 /my/path/phpmyfaq/setup/index.php(424): phpMyFAQ\Installer->startInstall() #4 {main} thrown in
/my/path/phpmyfaq/src/phpMyFAQ/Database/Pgsql.php
on line
177
I can't see where it's going wrong. It seems that some tables are not created correctly, but i can't understand why... When i check my database, only "faqconfig" table exists.
Any ideas ? What can i do about it ?
Thanks :)


Update
After starting the install from scratch, i have new errors but that seems to be also linked to database problems :

Code: Select all

Notice
: Trying to access array offset on value of type null in
/my/path/phpmyfaq/src/phpMyFAQ/Installer.php
on line
663


Notice
: Trying to access array offset on value of type null in
/my/path/phpmyfaq/src/phpMyFAQ/Installer.php
on line 849


Notice
: Trying to access array offset on value of type null in
/my/path/phpmyfaq/src/phpMyFAQ/Installer.php
on line 856


Notice
: Trying to access array offset on value of type null in
/my/path/phpmyfaq/src/phpMyFAQ/Installer.php
on line 867


Warning
: pg_query(): Query failed: ERROR: relation "faquser_user_id_seq" already exists in
/home/ubuntu/sites/phpmyfaq/src/phpMyFAQ/Database/Pgsql.php
on line 103


Warning
: pg_query(): Query failed: ERROR: relation "faqstopwords" does not exist LINE 1: INSERT INTO faqstopwords (id, lang, stopword) VALUES (0, 'cs... ^ in
/my/path/phpmyfaq/src/phpMyFAQ/Database/Pgsql.php
on line 103

INSERT INTO faqstopwords (id, lang, stopword) VALUES (0, 'cs', 'dnes')ERROR: relation "faqstopwords" does not exist LINE 1: INSERT INTO faqstopwords (id, lang, stopword) VALUES (0, 'cs... ^
Warning
: pg_query(): Query failed: ERROR: relation "faqconfig" does not exist LINE 2: faqconfig ^ in
/my/path/phpmyfaq/src/phpMyFAQ/Database/Pgsql.php
on line
[.... (same error several times)]
Fatal error
: Uncaught Exception: Error while fetching result: ERROR: relation "faqconfig" does not exist LINE 5: faqconfig ^ in /my/path/phpmyfaq/src/phpMyFAQ/Database/Pgsql.php:146 Stack trace: #0/my/path/phpmyfaq/src/phpMyFAQ/Configuration.php(242): phpMyFAQ\Database\Pgsql->fetchAll() #1 /my/path/phpmyfaq/src/phpMyFAQ/Configuration.php(204): phpMyFAQ\Configuration->getAll() #2 /my/path//phpmyfaq/src/phpMyFAQ/Link.php(218): phpMyFAQ\Configuration->get() #3 /my/path/phpmyfaq/src/phpMyFAQ/Link.php(206): phpMyFAQ\Link->getSystemScheme() #4 /my/path/phpmyfaq/src/phpMyFAQ/Installer.php(990): phpMyFAQ\Link->getSystemUri() #5 /my/path/phpmyfaq/setup/index.php(424): phpMyFAQ\Installer->startInstall() #6 {main} thrown in
/my/path/phpmyfaq/src/phpMyFAQ/Database/Pgsql.php
on line
146

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

Re: Install errors (creation of tables in database ?)

Post by Thorsten »

Hi,

which PHP version do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
camille
Posts: 8
Joined: Thu Feb 25, 2021 4:24 pm

Re: Install errors (creation of tables in database ?)

Post by camille »

I'm using php 7.4.3
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Install errors (creation of tables in database ?)

Post by Thorsten »

Hi,

I'm working on it: https://github.com/thorsten/phpMyFAQ/issues/1907

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
camille
Posts: 8
Joined: Thu Feb 25, 2021 4:24 pm

Re: Install errors (creation of tables in database ?)

Post by camille »

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

Re: Install errors (creation of tables in database ?)

Post by Thorsten »

Hi,

I found the issue, here's the commit: https://github.com/thorsten/phpMyFAQ/co ... 023c5e1fad

We'll release 3.0.9 as soon as possible.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply