MySQL Error when logged in but going to forbidden folder

Discussion in 'Troubleshooting' started by aschechtman, Jan 25, 2009.

  1. aschechtman

    aschechtman Member

    Joined:
    Oct 31, 2007
    Messages:
    51
    Just added some new products and a new protected folder and have a new error.

    Let's say a user (let's call him Joe) has access to protected folderA but not to protected folderB (Products 6 & 7).

    Joe can login to folderA no problem. When he tries to access folderB (for which he doesn't have permission), it goes to the login.php page here:
    http://www.mydomain.com/amember/plugins/protect/new_rewrite/login.php?v=-6,7&url=/folderB/

    It should determine that Joe doesn't have permission and show the login screen for him to enter a username and password. Instead, it pops up a MySQL error as follows:

    MYSQL ERROR:
    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
    in query:
    SELECT * FROM amember_products_links WHERE link_id IN ()​

    Also, if someone tries to login to folderB who doesn't have access to folderA or folderB, they're given the proper response (bad username/password message).

    Another user (let's call her Sue) has permission to access folderB but not folderA. Sue can login to folderB no problem but gets the same mySQL error when trying to go to folderA once she's logged in or when trying to login to folderA from scratch.

    Any ideas what's going on here and how I can fix it?

    Andrew
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    I've seen that error before with the incremental content plugin protecting subdirectories of already protected directories.
    Send in a tech support ticket and they will fix it.

    David
  3. aschechtman

    aschechtman Member

    Joined:
    Oct 31, 2007
    Messages:
    51
    Thanks. Will do.

    Andrew
  4. ntsmedia

    ntsmedia aMember Pro Customer

    Joined:
    Dec 11, 2006
    Messages:
    16
    Same error but on login

    I've been notified that some users are getting the same SQL error ...

    MYSQL ERROR:
    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 in query: SELECT * FROM amember_products_links WHERE link_id IN ()

    ... but it seems to only be appearing when the user tries to login. It is so erratic that I cannot duplicate the error yet and don't know what is the trigger.

    I have only seen it myself ONLY when I have gone to login to a product that is essentially my WordPress admin login and entered the wrong user name by mistake. Instead of getting the normal notice, the SQL error shows. So, since that product uses the same folder (the WP install folder) as the customer's product (also the WP install) which is protected with new_rewrite ... might that be causing the issue?

    Incremental content is used for the customer's product but none of those IC folders are used by or protected again by the IC plugin for the admin login product.

    Thanks
    John
  5. aschechtman

    aschechtman Member

    Joined:
    Oct 31, 2007
    Messages:
    51
    I'm not using the incremental content plugin but Support was able to fix this within a couple days once I submitted a ticket.

    Andrew
  6. dond

    dond New Member

    Joined:
    Aug 8, 2007
    Messages:
    6
    Hi Folks- I had to change the password to my server account and now the MySQL databases are showing errors and won't allow any sort of login. How can I change the password within my amember script to reflect the new password. I thought maybe that could be done at amember HQ but I guess not.

    Any help offered is greatly appreciated.
    DOn
  7. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    dond, on your server edit /amember/config.inc.php

Share This Page