note 34371 added to ref.mssql
| From: | yu at NOSPAM dot burgiss dot com | Date: | Fri, 25 Jul 2003 05:54:57 +0000 |
| Subject: | note 34371 added to ref.mssql | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-52604@lists.php.net to get a copy of this message | ||
Linux users connecting MS SQL Server thru FreeTDS:
If you are using FreeTDS version 0.61, which is the lastest at this point (July 25, 2003), you must
comment out mssql.textlimit in your php.ini.
I found this info on freetds mailing list.
http://lists.ibiblio.org/pipermail/freetds/2003q3/013323.html
Because of this bug, I wasted nights and nights trying to connect to MS SQL.
Here's the combination that worked on my redhat.
apache_1.3.28, freetds-0.61, and php-4.3.2.
Download the tarballs, and expand them in /usr/src.
cd /usr/src/apache_1.3.28
./configure --prefix=/www --enable-module=so
make; make install; make clean
cd /usr/src/freetds-0.61
./configure --prefix=/usr/share/freetds --sysconfdif=/www/conf --with-tdsver=7.0 --enable-msdblib
make; make install; make clean
cd /usr/src/php-4.3.2
./configure --prefix=/www --with-mysql --with-mssql=/usr/share/freetds --with-apxs=/www/bin/apxs
--enable-track-vars --with-config-file-path=/www/conf
make; make install; make clean
I found it convenient to put config files under /www/conf/.
Add the following to your freetds.conf and you won't need the "1.2.3.4:1433" stuff
that was posted by others.
[MsSqlServer]
host = 1.2.3.4
port = 1433
tds version = 7.0
text size = 147483647
You can use "MsSqlServer" to connect.
I had problem mssql_bind, so I gave "EXEC ProcedureFoo @Foo = 'foo';" to
mssql_query and it worked.
Like others have mentioned, you would want to change the text size in order to get anything bigger
than 4kb.
I made my mssql.textsize = 147483647.
I hope this helps.
----
Manual Page -- http://www.php.net/manual/en/ref.mssql.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34371
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34371&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34371&report=yes