WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: External DB authentication] "SET NAMES 'utf8'" causes SQL Server to die (5 posts)

  1. outspaced
    Member
    Posted 4 years ago #

    I use this plugin to do authentication with an external SQL Server database.

    I upgraded to v3.15 today and it caused my login page to break completely. The problem is lines 347-8 - the UTF-8 query. This isn't valid in SQL Server and causes an error.

    I commented those lines out and it works again.

    http://wordpress.org/extend/plugins/external-database-authentication/

  2. charlener
    Member
    Posted 4 years ago #

    Hi outspaced,

    Do you know what the SQL server equivalent query may be for setting UTF-8? It does affect import of fields, and I'd prefer this to work across all setups.

    Or do you know if unicode fields were already importing correctly with SQL Server?

  3. gdean2323
    Member
    Posted 4 years ago #

    I had the same problem, I do not believe anything special needs to be done on MSSQL to support unicode. However, I have not tested it

  4. Soonki Ji
    Member
    Posted 4 years ago #

    I got the same problem today.

    This problem was reported two month ago, but the same problem is still happening. Interesting.

    Please make the code working only for MySQL if you are not sure about the compatibility.

    from

    $utfquery = "SET NAMES 'utf8'";
    $resultutf = db_functions($driver,"query",$resource,$utfquery);

    to

    if ($driver == "MySQL")
    {
    $utfquery = "SET NAMES 'utf8'";
    $resultutf = db_functions($driver,"query",$resource,$utfquery);
    }

  5. krimos
    Member
    Posted 3 years ago #

    After 8 month, same bug with MS SQL Server. Thanks Snooki for fix.

    Don't forgot that for next update please ;)

    if ($driver == "MySQL")
    {
    $utfquery = "SET NAMES 'utf8'";
    $resultutf = db_functions($driver,"query",$resource,$utfquery);
    }

    Thank you !!

Topic Closed

This topic has been closed to new replies.

About this Topic