PHP
downloads | documentation | faq | getting help | mailing lists | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

インストール手順> <導入
Last updated: Fri, 14 Nov 2008

view this page in

インストール/設定

目次

要件

Win32 プラットフォームでの要件

この拡張モジュールは、PHP がインストールされているシステムに MS SQL クライアントツールのインストールを要します。クライアントツールは、 MS SQL Server CD か、またはサーバの \winnt\system32 から ntwdblib.dll を PHP システムの \winnt\system32 にコピーすることによりインストール可能です。 ntwdblib.dll のコピーでは、名前付きパイプでのアクセスのみが可能となります。 クライアントの設定には全てのツールのインストールが必要です。

Unix/Linux プラットフォームでの要件

MSSQL 拡張モジュールを Unix/Linux で使用するには、まず最初に FreeTDS ライブラリをビルドしてインストールする必要があります。ソースコードや インストール手順は FreeTDS のホームページ » http://www.freetds.org/ にあります。

注意: Windows では、Microsoft の DBLIB が使用されます。カラム名を返す関数は、 DBLIB の dbcolname() 関数を使用しています。 DBLIB は SQL Server 6.x 用に開発されており、識別子の最大長は 30 です。 そのため、カラム名は最大 30 文字までとなります。FreeTDS を使用する プラットフォーム(Linux)ではこの問題は発生しません。

注意: Windows では、MSSQL 拡張モジュールは SQL Server 2005 以降をサポートしません。 ntwdblib.dll の内部 API が SQL Server 2005 をサポートしていないからです。 SQL Server 2005 以降を使用する場合は ODBC 拡張モジュール を使用する必要があります。



インストール手順> <導入
Last updated: Fri, 14 Nov 2008
 
add a note add a note User Contributed Notes
インストール/設定
robert dot johnson at icap dot com
24-Sep-2008 03:49
Microsoft have provided a PHP driver for SQL Server 2005.

At the time of this note, the link to it is: http://msdn.microsoft.com/en-us/library/cc296221.aspx

If that doesn't work, search MSDN for "SQL Server 2005 Driver for PHP"
ksamuels at pleazNOSPAM dot sportsendeavors dot COM
18-Jun-2008 01:55
I was having a difficult time getting four Windows 2003 Servers to connect to an MSSQL database with PHP 5.2.5 and IIS after already getting one such server to connect with no problems.  I even copied the entire php directory and dlls to the other servers exactly as they were on the working server but continually got "Unable to connect to server" errors.  The fix was to delete the ntwdblib.dll from the PHP directory.  It was already in the C:\windows\system32 directory and this did not cause a problem on the first server but did on all the others.
jklowden at freetds dot org
27-May-2008 10:06
The 30-character limitation  does not apply to the FreeTDS db-lib implementation.  FreeTDS returns column names of any length supported by the server (and protocol).

インストール手順> <導入
Last updated: Fri, 14 Nov 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites