• The new versions of UAM are breaking my nginx install. Everytime I update a post, or edit a user, I get a 502 bad gateway error.

    After checking the error in the nginx logs, its apparent what the problem is.

    I have an apostraphe (‘) in my description of the user groups. And it is not being sanitized before adding to the database. So it breaks the SQL statement.

    Here is the error:

    2015/03/31 10:00:08 [error] 1126#0: *825 FastCGI sent in stderr: "PHP message: WordPress database 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 's friends, none of the other.',
      ' at line 3 for query UPDATE w1_uam_accessgroups
                    SET groupname = 'Friends_Dave',
                        groupdesc = 'Dave's friends, none of the other.',
                        read_access = 'group',
                        write_access = 'group',
                        ip_range = ''
                    WHERE ID = 5 made by........(truncated the rest)
    ....

    You can tell it is the apostrophe s (‘s) from Dave’s that is breaking the SQL. This should be a fairly simple fix I would think.

    For now I’ve just taken out all the apostrophes, and I’m not getting errors.

    https://www.ads-software.com/plugins/user-access-manager/

  • The topic ‘Database Error, get nginx bad gateway’ is closed to new replies.