久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<legend id='HtXfe'><style id='HtXfe'><dir id='HtXfe'><q id='HtXfe'></q></dir></style></legend>

    <small id='HtXfe'></small><noframes id='HtXfe'>

        <bdo id='HtXfe'></bdo><ul id='HtXfe'></ul>

      1. <tfoot id='HtXfe'></tfoot>
        <i id='HtXfe'><tr id='HtXfe'><dt id='HtXfe'><q id='HtXfe'><span id='HtXfe'><b id='HtXfe'><form id='HtXfe'><ins id='HtXfe'></ins><ul id='HtXfe'></ul><sub id='HtXfe'></sub></form><legend id='HtXfe'></legend><bdo id='HtXfe'><pre id='HtXfe'><center id='HtXfe'></center></pre></bdo></b><th id='HtXfe'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='HtXfe'><tfoot id='HtXfe'></tfoot><dl id='HtXfe'><fieldset id='HtXfe'></fieldset></dl></div>

        使用 PDO_DBLIB 連接到 MS SQL 數據庫的 PHP 錯誤

        PHP error connecting to MS SQL database using PDO_DBLIB(使用 PDO_DBLIB 連接到 MS SQL 數據庫的 PHP 錯誤)
        <legend id='O3Rzf'><style id='O3Rzf'><dir id='O3Rzf'><q id='O3Rzf'></q></dir></style></legend>
            <tbody id='O3Rzf'></tbody>

            1. <i id='O3Rzf'><tr id='O3Rzf'><dt id='O3Rzf'><q id='O3Rzf'><span id='O3Rzf'><b id='O3Rzf'><form id='O3Rzf'><ins id='O3Rzf'></ins><ul id='O3Rzf'></ul><sub id='O3Rzf'></sub></form><legend id='O3Rzf'></legend><bdo id='O3Rzf'><pre id='O3Rzf'><center id='O3Rzf'></center></pre></bdo></b><th id='O3Rzf'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='O3Rzf'><tfoot id='O3Rzf'></tfoot><dl id='O3Rzf'><fieldset id='O3Rzf'></fieldset></dl></div>

              <tfoot id='O3Rzf'></tfoot>
                <bdo id='O3Rzf'></bdo><ul id='O3Rzf'></ul>

                <small id='O3Rzf'></small><noframes id='O3Rzf'>

                  本文介紹了使用 PDO_DBLIB 連接到 MS SQL 數據庫的 PHP 錯誤的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試使用 PHP 的 PDO_DBLIB 驅動程序連接到遠程數據庫,但遇到了一些問題.

                  I am attempting to use PHP's PDO_DBLIB driver to connect to a remote database and am having some issues.

                  可以使用 telnet 和 SQL 客戶端通過相同的環境連接數據庫.但是,在 PHP 中使用以下代碼進行連接不起作用:

                  The database is connectable via the same environment using telnet and a SQL client. However, connecting using the following code in PHP does not work:

                  <?php
                  $conn = new PDO('dblib:dbname=TestDB;host=RemoteServer;charset=utf8', 'my_user', 'my_pass');
                  

                  運行此代碼,無論是從命令行還是 Apache,都會產生以下錯誤:

                  Running this code, whether it be from the command line or Apache, yields the following error:

                  致命錯誤:未捕獲的異常PDOException",消息為SQLSTATE[HY000] 無法連接:Adaptive Server 不可用或不存在(嚴重性 9)"

                  Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does not exist (severity 9)'

                  我能夠在不同的 Web 服務器上使用相同的代碼連接到數據庫,這讓我相信這是一個配置問題.兩臺服務器上的 php.ini 文件看起來相對相同.它們都啟用了相同的 PDO 庫,并配置了相同的選項.

                  I am able to connect to the database using the same code on a different web server, which leads me to believe that it's a configuration issue. The php.ini files on the two servers look relatively the same. They each have the same PDO libraries enabled with the same options configured.

                  有人知道為什么會發生這種情況嗎?

                  Does anyone have any idea why this could be happening?

                  推薦答案

                  事實證明,這是一個比我想象的要簡單得多的問題.無論出于何種原因,開發服務器沒有使用端口 1433 作為連接中的默認端口,而是使用端口 4000.

                  Turns out that it was a much simpler issue than I thought. For whatever reason, the development server was not using Port 1433 as the default port in the connection and was instead using Port 4000.

                  我通過啟用 freetds.conf 文件中的日志并在我發出請求時監控它們發現了這一點.

                  I discovered this by enabling the logs in the freetds.conf file and monitoring them as I was making the request.

                  另外,有一點需要注意:DBLIB 擴展使用冒號 (:) 作為主機和端口之間的分隔符,而不是逗號.不幸的是,您在使用逗號時收到的錯誤描述性不強,因此希望有人能從這一發現中受益.

                  Also, something to note: The DBLIB extension uses a colon (:) as a separator between the host and the port instead of the comma. Unfortunately, the error that you receive when you use a comma isn't very descriptive, so hopefully someone benefits from this discovery.

                  這篇關于使用 PDO_DBLIB 連接到 MS SQL 數據庫的 PHP 錯誤的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                    • <tfoot id='Qn0FI'></tfoot>

                          <small id='Qn0FI'></small><noframes id='Qn0FI'>

                            <tbody id='Qn0FI'></tbody>
                          <legend id='Qn0FI'><style id='Qn0FI'><dir id='Qn0FI'><q id='Qn0FI'></q></dir></style></legend>
                            <bdo id='Qn0FI'></bdo><ul id='Qn0FI'></ul>
                          • <i id='Qn0FI'><tr id='Qn0FI'><dt id='Qn0FI'><q id='Qn0FI'><span id='Qn0FI'><b id='Qn0FI'><form id='Qn0FI'><ins id='Qn0FI'></ins><ul id='Qn0FI'></ul><sub id='Qn0FI'></sub></form><legend id='Qn0FI'></legend><bdo id='Qn0FI'><pre id='Qn0FI'><center id='Qn0FI'></center></pre></bdo></b><th id='Qn0FI'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Qn0FI'><tfoot id='Qn0FI'></tfoot><dl id='Qn0FI'><fieldset id='Qn0FI'></fieldset></dl></div>
                            主站蜘蛛池模板: 日本免费视频在线观看 | 午夜精品一区二区三区在线视频 | 国产一区欧美 | 亚洲成人观看 | 九一视频在线播放 | 黄色毛片一级 | 国产日韩视频 | 日本精品一区二区三区视频 | 欧美精品一区二区三区在线 | 亚洲成人中文字幕 | 国产精品久久久久久久久久久久久 | 精品视频一区二区三区在线观看 | www.色综合 | 精品成人在线观看 | 日本在线看片 | av手机在线看 | 欧美成人性生活 | 久久精品视频12 | 91精品国产综合久久久动漫日韩 | 精品国产乱码久久久久久88av | 欧美一区视频 | av一二三区 | 一级黄色片在线免费观看 | 欧美久久一区二区 | 久久一区视频 | 亚洲av一级毛片 | 一区二区视频在线 | 国产精品久久久免费 | 超碰在线人人 | 欧美色性 | 亚洲免费在线 | 国产欧美一区二区三区国产幕精品 | 成人精品一区二区 | 国产精品免费看 | 久久精品国产一区老色匹 | 日韩中文在线视频 | 欧美福利视频一区 | 福利电影在线 | 一区二区三区久久久 | 国产在线永久免费 | 午夜免费观看体验区 |