|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-10-17 22:19 UTC] brendan at msu dot edu
Built with:
(edited config template to remove uneccessary sybase libs that are not included with freetds -lsybtcl -lcomn -lcs )
./configure --prefix=/home/username/php --with-sybase-ct=../../freetds --with-pgsql=/home/postgres/pgsql --with-apache=../../apache_1.3.22 -enable-track-vars --with-imap=../../imap
make
make install
FreeTDS verified functional using test scripts, and functional through Perl to same DB that PHP is connected to.
Problem: Text type returns only first 255 chars
Expected: >540 chars (can retrieve through FreeTDS/Perl)
php.ini contains uncommented lines:
mssql.textlimit=8192
mssql.textsize=8192
Query to MSSQL Server:
SELECT @@TEXTSIZE
Returns: 4096
Expected: 8192 (due to php.ini settings?)
Query to MSSQL Server:
SET TEXTSIZE 8192 SELECT @@TEXTSIZE
Returns: 8192
Expected: 8192
Suspect: php.ini not being read
But: other setting changes show up on php_info()
Suspect: mssql settings not being read properly from
php.info?
Query to MSSQL Server:
SET TEXTSIZE 8192 SELECT our_col FROM our_table;
Returns: only first 255 chars of our_col
Expected: all 500+ chars in field
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 13:00:01 2025 UTC |
As of version 4.2.1, this issue has still not been corrected. Perhaps the problem lies with FreeTDS. Apparently neither the CT-Lib and DB-Lib for Sybase have no use for this property (MSSQL TEXT SIZE). If you must connect to MS SQL Server from PHP, I would suggest creating an include file that is included at the top of any PHP script that needs to access the MS SQL Server. Let the include file open a connection and call a query to "set textsize 65536" or to whatever limit you want. e.g. <?php // include file for MS SQL server $HOSTNAME = "SQLServer70"; $USERNAME = "sa"; $PASSWORD = "??"; $conn = mssql_pconnect($HOSTNAME, $USERNAME, $PASSWORD); if ($conn) { mssql_query("SET TEXTSIZE 65536"); mssql_select_db("whatever", $conn); } ?> Kelly Akins