Oauth login - SQL ERROR [ mysqli ]

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
WelshPaul
Registered User
Posts: 299
Joined: Tue Aug 19, 2014 2:09 pm

Oauth login - SQL ERROR [ mysqli ]

Post by WelshPaul » Fri Jul 14, 2017 11:10 am

So it looks like Oauth is broken for me again. I get the following error when clicking on any of the Oauth buttons (Facebook, Twitter etc). I'm running php 7.1.6 / MySQL(i) 5.7.18.

Code: Select all

SQL ERROR [ mysqli ]

Incorrect integer value: 'ANONYMOUS' for column 'user_id' at row 1 [1366]

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
Any ideas?

User avatar
WelshPaul
Registered User
Posts: 299
Joined: Tue Aug 19, 2014 2:09 pm

Re: Oauth login - SQL ERROR [ mysqli ]

Post by WelshPaul » Fri Jul 14, 2017 12:15 pm

Turns out that david63's "Log user connections" extension is the culprit. I don't seem to be having any luck with his extensions! :cry:

User avatar
Galixte de EzCom
Registered User
Posts: 1028
Joined: Mon Oct 04, 2004 11:14 pm
Location: France
Name: Raphaël M.
Contact:

Re: Oauth login - SQL ERROR [ mysqli ]

Post by Galixte de EzCom » Fri Jul 14, 2017 9:00 pm

More a developer creates extensions, more the support becomes equally difficult. Dmzx extensions are in the same situation.
Communau EzCom
📖 « Traductions d’extensions & styles pour phpBB 3.1.x & 3.2.x ».
📋 Lists of all extensions identified for phpBB 3.1.x & 3.2.x.
📋 Lists of all styles identified for phpBB 3.1.x & 3.2.x.
Image Tu as un forum et tu veux aussi un site web ? Regarde par ici.

User avatar
Leinad4Mind
Translator
Posts: 849
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: Oauth login - SQL ERROR [ mysqli ]

Post by Leinad4Mind » Wed Aug 09, 2017 2:33 am

Open: david63-logconnections/event/listener.php

Find:

Code: Select all

$result['user_row']['user_id'] = (!$result['user_row']['user_id']) ? 'ANONYMOUS' : $result['user_row']['user_id'];
Replace:

Code: Select all

$result['user_row']['user_id'] = (!$result['user_row']['user_id']) ? '1' : $result['user_row']['user_id'];
Try this...
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator

rxu
Extensions Development Team
Posts: 2932
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Oauth login - SQL ERROR [ mysqli ]

Post by rxu » Wed Aug 09, 2017 6:49 am

'ANONYMOUS' just has to be ANONYMOUS (without the quotations), like

Code: Select all

$result['user_row']['user_id'] = (!$result['user_row']['user_id']) ? ANONYMOUS : $result['user_row']['user_id'];

User avatar
Leinad4Mind
Translator
Posts: 849
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: Oauth login - SQL ERROR [ mysqli ]

Post by Leinad4Mind » Wed Aug 09, 2017 1:32 pm

Thats it! I knew something was wrong. And duh it's obvious that without the quotation it will be a variable. Thks rxu!
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator

Post Reply

Return to “[3.2.x] Support Forum”