-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Still having local issue in msodbcsql17 #25
Comments
Hi @YoEight Thank you for reporting this. We have a fix for this issue after the 17.2 release. Though we have a 17.3 preview for Linux, the 17.2 is the latest version available for Mac. You may have to wait until the next 17.3 RTW release in the early 2019. A possible workaround for now is to change the LC_CTYPE to "en_US.UTF-8". This should eliminate the locale error. Thanks, |
@karinazhou I am having the same issue (using ODBC 17.2.0.1 on MacOS 10.14.2). Except, my locale settings differ in that my LC_CTYPE is already set to en_US.UTF-8:
The error message I get is:
I have tried to explicitly set the locale via
Are there any other potential workarounds we can try until 17.3 is released? Thanks |
Hi @keithbrinks , That looks weird... To investigate it further, could you please check a few more things?
Thanks, |
Hi @karinazhou, This is the result to your first question:
As for the The explicit command I'm using at this point:
And the error log shows the following:
Doing a var_dump of
|
@keithbrinks Fixed it by adding this to AppServiceProvider.php boot method.
|
@patrick0888 Thanks for the tip. I just tried adding that, but I'm getting the same error still. |
@keithbrinks To narrow down the issue a bit, could you please run a simple c++ test on your Mojave and see whether the issue is still happening or not? Please copy the Reproducible code into a cpp file, e.g. locale_test.cpp. And do the following modification:
NOTE: this will show your current LC_ALL string and LC_CTYPE.
After that, run this command line to compile the cpp file: Once you get the locale_test executable, simply run These should return some messages like this:
You may also play around with setlocale() by passing different locale value, e.g. This test will go through the ODBC driver directly and eliminate the impact from PHP stuff. Thanks, |
@karinazhou I followed your steps and am able to reproduce the exact same same result as your example:
It may be worth noting that per this issue I posted earlier today, I am able to connect to the SQL Server fine and able to perform GET, PATCH, and DELETE requests to the application without any issues. However, when performing POST requests, the request goes through to the application fine and is even sent to the database where records are being created. But the issue lies with, what I assume is, the response the database is giving back (or how the ODBC drive is handling it?). Depending on which web server I'm using (Apache or Nginx) I either get a 502 error, or a ERR_EMPTY_RESPONSE. When testing the POST request using Postman, it just says 'Could not get any response'. Neither PHP or my application throw any errors. The only error I get is in the Apache/Nginx error which seems to be eluding to the ODBC driver/locale issue:
Maybe that doesn't help -- I'm just struggling to determine where the issue is actually coming from. |
@keithbrinks The sample code I listed is to test whether the ODBC driver on your side can deal with locale correctly. It looks like that the driver works fine with your locale setting because there is no libc++abi.dylib error returned from the test. The error message you get is probably from the std::locale() call when passing invalid locale value into it. In the driver, we only get the LC_CTYPE and pass it into std::locale(). From your case, it seems to pass Thanks, |
Hi @YoEight and @keithbrinks , I am going to close this issue because there is no updates on this since Dec, 2018. Please feel free to reopen it if you have more questions about this. Thanks, |
Greetings,
I still experiencing the issue mentioned #18.
I used the last driver version:
I got the infamous error:
locale -a
locale
odbcinst -j
I don't have that issue if I use the 13 version.
OSX: 10.14
Thanks for your time.
The text was updated successfully, but these errors were encountered: