Edit report at https://bugs.php.net/bug.php?id=38805&edit=1

 ID:                 38805
 Updated by:         ssuffic...@php.net
 Reported by:        gkrajci at arescorporation dot com
 Summary:            PDO Truncates Text from SQL Server Text Data Type
                     Field
-Status:             Open
+Status:             To be documented
 Type:               Bug
 Package:            PDO related
 Operating System:   Windows NT PBMA-WB2 5.2 build 37
 PHP Version:        5.1.6
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2010-12-17 21:07:48] ka...@php.net

.

------------------------------------------------------------------------
[2010-03-04 20:55:06] juan dot pineda at resultstel dot com

I solved this problem by adding to my php script a TEXTSIZE that is less than 
the allowed memory from the MSSQL server. 

Remember, all the number are in Bytes, so I kept playing with the numbers, 
until this worked:
// ranges from 0 - 3145728 = 3Megabytes.  Default to 4096.
$sql = "SET TEXTSIZE 3145728";
mssql_query($sql, $db) or die(mssql_get_last_message());

Remember to always know what the allowed upload size for your server is.

I hope this helps someone

------------------------------------------------------------------------
[2010-02-12 16:57:02] s...@php.net

Those changes are still in SVN. That means the TEXTLIMIT var is being set to 
its highest possible value, which in turn means that truncation shouldn't be an 
issue now.

$pdo->query('SET TEXTSIZE 300000');

should work from PHP 5.2.11 up, it just needs doccing.

------------------------------------------------------------------------
[2010-02-12 09:05:28] philipp at servicemail24 dot de

This problem is actually fixed in cvs:

http://www.mail-archive.com/php-cvs@lists.php.net/msg40731.html
http://www.mail-archive.com/php-cvs@lists.php.net/msg40711.html

Here is the working source code:

http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_dblib/

I have no idea why these fixes aren't included in the 5.2 and 5.3 releases!

@sfox can you ensure that pdo_dblib is updated with the release of 5.2.13 and 
5.3.2?

------------------------------------------------------------------------
[2010-02-11 15:40:43] philipp at servicemail24 dot de

php 5.3.2 dotdeb still suffers from this problem.

does this fix help?

"Possible fix: remove "case SQLTEXT" from
ext/pdo_dblib/dblib_stmt.c:execute and let it fall though to default."

------------------------------------------------------------------------


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

    https://bugs.php.net/bug.php?id=38805


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=38805&edit=1

Reply via email to