#13722 [Fbk->NoF]: mssql text type returns only 255 char

From: Date: Sat, 14 Sep 2002 06:00:01 +0000
Subject: #13722 [Fbk->NoF]: mssql text type returns only 255 char
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-19332@lists.php.net to get a copy of this message
ID: 13722 Updated by: php-bugs@lists.php.net Reported By: brendan@msu.edu -Status: Feedback +Status: No Feedback Bug Type: Sybase-ct (ctlib) related Operating System: Solaris 2.7 PHP Version: 4.2.1 New Comment: No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". Previous Comments: ------------------------------------------------------------------------ [2002-08-13 23:41:55] kalowsky@php.net updating version as well. ------------------------------------------------------------------------ [2002-08-13 23:41:36] kalowsky@php.net try doing a "SET TEXTSIZE <some really large number here>" in an exec command. ------------------------------------------------------------------------ [2002-07-26 23:42:43] systematic11@comcast.net 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 ------------------------------------------------------------------------ [2002-05-21 11:52:51] vedran@quark.fsb.hr I have 4.1.2 and It's still not fixed. Running my .php that has a query "SELECT sometexttypefield FROM sometable"; with /usr/bin/php4 results in ;FATAL: emalloc(): Unable to allocate -2147483648 bytes. So it's definately some a bug and it probably can be solved if we know where this mailloc is called. ------------------------------------------------------------------------ [2001-10-19 13:01:39] brendan@msu.edu Then there still exists a problem with the sybase-ct support for mssql, in that there is no way to specify a TEXTSIZE that allows PHP to support MSSQL 7.0's TEXT type. Is there not? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/13722 -- Edit this bug report at http://bugs.php.net/?id=13722&edit=1

« previous php.bugs (#19332) next »