{"id":190,"date":"2018-06-15T09:43:47","date_gmt":"2018-06-15T07:43:47","guid":{"rendered":"http:\/\/fred151.net\/site\/?p=190"},"modified":"2021-03-30T11:48:27","modified_gmt":"2021-03-30T09:48:27","slug":"php-access-to-an-mssql-database-from-debian-with-odbc-and-freetds","status":"publish","type":"post","link":"https:\/\/fred151.net\/site\/2018\/06\/15\/php-access-to-an-mssql-database-from-debian-with-odbc-and-freetds\/","title":{"rendered":"PHP Access To An MSSQL Database From Debian with ODBC And FreeTDS"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you upgrade OpenProject from 6 to 7 maybe you will have some trouble with SSL certificate.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Symptons<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u2013 can\u2019t login into openproject with LDAP method configured<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After the upgrade the log reports:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\"NET::LDAP:Error (hostname \"yourhostname\" does not match the server certificate)\".<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After some emails with openporject support we did not find any solutions, so i decided to investigate and find a workaround. I had a server CentOS 7 with openproject 6 and a self signed certicate installed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to fix<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To fix the login error i have commented the line 291 in the file \/opt\/openproject\/vendor\/ruby-2.4.4\/lib\/ruby\/2.4.0\/ssl.rb near the line \u201craise SSLError\u2026\u201d<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Unless OpenSSL::SSL.verify_certificate_identity(peer_cert, hostname)\n# raise SSLError, \"hostname \\\"#{hostname}\\\" does not match the server certificate\"\nend<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">So i do not throw the exception if the SSL is not valid. The best solution is to investigate how the check\u2019s function works but if you do not have time the workaround is helpfulest.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you upgrade OpenProject from 6 to 7 maybe you will have some trouble with SSL certificate. Symptons \u2013 can\u2019t login into openproject with LDAP method configured After the upgrade the log reports: &#8220;NET::LDAP:Error (hostname &#8220;yourhostname&#8221; does not match the server certificate)&#8221;. After some emails with openporject support we did not find any solutions, so [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[25,22,24,23],"class_list":["post-190","post","type-post","status-publish","format-standard","hentry","category-sysadmin","tag-free-tds","tag-linux","tag-ms-sql","tag-php"],"_links":{"self":[{"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/posts\/190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/comments?post=190"}],"version-history":[{"count":3,"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/posts\/190\/revisions"}],"predecessor-version":[{"id":459,"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/posts\/190\/revisions\/459"}],"wp:attachment":[{"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/media?parent=190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/categories?post=190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/tags?post=190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}