Login leads to HTTP Error 500 / unknown column login_attempts

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
ZagorianBeatle
Posts: 8
Joined: Wed Oct 28, 2009 4:08 pm

Login leads to HTTP Error 500 / unknown column login_attempts

Post by ZagorianBeatle »

Hi,

I'm not able to login anymore. I'm using 3.0.9 with PHP 8.2. No changes have been made in server configuration.

Fatal error: Uncaught mysqli_sql_exception: Unknown column 'login_attempts' in 'field list' in /var/www/vhosts/faq.xyz.de/httpdocs/src/phpMyFAQ/Database/Mysqli.php:334 Stack trace: #0 /var/www/vhosts/faq.xyz.de/httpdocs/src/phpMyFAQ/Database/Mysqli.php(334): mysqli->query() #1 /var/www/vhosts/faq.xyz.de/httpdocs/src/phpMyFAQ/User/CurrentUser.php(716): phpMyFAQ\Database\Mysqli->query() #2 /var/www/vhosts/faq.xyz.de/httpdocs/src/phpMyFAQ/User/CurrentUser.php(152): phpMyFAQ\User\CurrentUser->isFailedLastLoginAttempt() #3 /var/www/vhosts/faq.xyz.de/httpdocs/admin/index.php(156): phpMyFAQ\User\CurrentUser->login() #4 {main} thrown in /var/www/vhosts/faq.xyz.de/httpdocs/src/phpMyFAQ/Database/Mysqli.php on line 334

I'm grateful for any help.

Regards,

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

Re: Login leads to HTTP Error 500 / unknown column login_attempts

Post by Thorsten »

Hi Ralph,

did you upgrade from a previous version?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ZagorianBeatle
Posts: 8
Joined: Wed Oct 28, 2009 4:08 pm

Re: Login leads to HTTP Error 500 / unknown column login_attempts

Post by ZagorianBeatle »

Hi Thorsten,

no, that happened suddenly.

Maybe it helps if I include the missing column manually? Can you tell me the specific position?

Regards,

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

Re: Login leads to HTTP Error 500 / unknown column login_attempts

Post by Thorsten »

Hi Ralph,

this is how the CREATE TABLE looks like for 3.0.x:

Code: Select all

CREATE TABLE faquser (
            user_id INT(11) NOT NULL,
            login VARCHAR(128) NOT NULL,
            session_id VARCHAR(150) NULL,
            session_timestamp INT(11) NULL,
            ip VARCHAR(15) NULL,
            account_status VARCHAR(50) NULL,
            last_login VARCHAR(14) NULL,
            auth_source VARCHAR(100) NULL,
            member_since VARCHAR(14) NULL,
            remember_me VARCHAR(150) NULL,
            success INT(1) NULL DEFAULT 1,
            is_superadmin INT(1) NULL DEFAULT 0,
            login_attempts INT(1) NULL DEFAULT 0,
            PRIMARY KEY (user_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
You should upgrade to 3.2 as soon as possible as 3.0 is out of support for some time now.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ZagorianBeatle
Posts: 8
Joined: Wed Oct 28, 2009 4:08 pm

Re: Login leads to HTTP Error 500 / unknown column login_attempts

Post by ZagorianBeatle »

I've added the column login_attempts.

Thanks - you made my day!

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

Re: Login leads to HTTP Error 500 / unknown column login_attempts

Post by Thorsten »

Hi Ralph,

was it really missing?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ZagorianBeatle
Posts: 8
Joined: Wed Oct 28, 2009 4:08 pm

Re: Login leads to HTTP Error 500 / unknown column login_attempts

Post by ZagorianBeatle »

Hi Thorsten,

yes, this column was missing suddenly. No update has been made before.

Anyway - now it works and I will update soon. Thanks again!

Regards,

Ralph
Post Reply