Jump to content

External Database Login error Wordpress Data Base


Recommended Posts

Posted

Hi I'm trying to create an additional way for people to login using the "External Data" base under "Login Handlers"  I filled out everything correct and matched it to the data base but now I am getting this error message.

IPS\Db\Exception: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 (1064)

What I don't understand is if the problem is in IPB4 or something in the Actually MYSQL data base that i'm trying to reference.  Any insight?

I feel like I'm really close and this shouldn't be that hard.

Posted

Difficult to go on without you providing more detail on what you've actually done......what did you fill out? How did you fill it out? What have you matched to the database (which database?)? And what SQL query is also displayed along with the error message content?

Posted

@Nathan Explosion Right good questions. I uploaded pictures.  In IPB4 I am logged in as an admin going to System>Settings>Login Handlers

Under Longin Handlers section I am clicking on "external database"

The external data base I want to use for people to login in is my Wordpress data base when people sign up as a user on my Wordpress site. 

I basically logged into my "Bluest" panel, wen to the MSQL data base and found all the necessary information and typed it into the screen shot below.  Then I get the red error message

error message.png

IPB login handler form.png

Posted

Hello,

Report as a bug https://invisionpower.com/4bugtrack/

system/Login/External.php

			$result = $this->externalDb()->select( implode( ',', $select ), $this->settings['db_table'], array( $this->settings['db_extra'] ) )->first();

$this->settings['db_extra'] is empty

Temporary solution

Replace above line 

			$result = $this->externalDb()->select( implode( ',', $select ), $this->settings['db_table'], $this->settings['db_extra'] ? array( $this->settings['db_extra'] ) : null )->first();

Or add

1=1

in  Additional clause field

Posted

The query is "SELECT user_pass,user_email FROM wp_gkeu_users WHERE" which fails because it has nothing after the WHERE.

So you give it a 1 = 1 because 1 always equals 1.

Effectively you've tricked the bug to do "SELECT user_pass,user_email FROM wp_gkeu_users"

Posted

@Nathan Explosion thanks for explaining that.  There must be something minor not happening because interesting enough when I go to try and login with a test email and password it recognizes the email but not the password.

I tested by trying a different email and it says "email address and password not found" but when I switch back and use the test email created it just says "password" incorrect.  So something about that password is not pulling......

Arghhhhh so closeeeeeeeeeeeee

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...