April 2, 2016 in Technical Problems
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.
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?
@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
Report as a bug https://invisionpower.com/4bugtrack/
$result = $this->externalDb()->select( implode( ',', $select ), $this->settings['db_table'], array( $this->settings['db_extra'] ) )->first();
$this->settings['db_extra'] is empty
Replace above line
$result = $this->externalDb()->select( implode( ',', $select ), $this->settings['db_table'], $this->settings['db_extra'] ? array( $this->settings['db_extra'] ) : null )->first();
in Additional clause field
@newbie LAC I added 1 = 1 and it took. I will am going to add a user to the wordpress data base and test the login and see if it works.
But I'm curious what does 1 = 1 mean, what did we just tell the system by typing 1 = 1?
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"
@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
This topic is now archived and is closed to further replies.
Started Thursday at 01:08 PM
Started November 8
Started November 29