Ask a Question related to PHP Bugs, Design and Development.
-
gkrajci at arescorporation dot com #1
#38805 [NEW]: PDO Truncates Text from SQL Server Text Data Type Field
From: gkrajci at arescorporation dot com
Operating system: Windows NT PBMA-WB2 5.2 build 37
PHP version: 5.1.6
PHP Bug Type: PDO related
Bug description: PDO Truncates Text from SQL Server Text Data Type Field
Description:
------------
When using PDO to retrieve text from a SQL Server text data type field the
text is truncated when I display it on a Web page
PDO Transcript length = 4096 (truncated)
PEAR Transcript length = 6139(full text)
Using SQL Server 2000
Reproduce code:
---------------
$sql = "SELECT title AS VideoTitle, transcript_text AS TranscriptText FROM
video WHERE video_id = 324";
$dbh = new PDO($pdo_dsn, $db_user, $db_password);
$transcript_q = $dbh->query($sql);
$transcript_rs = $transcript_q->fetch();
$pear_dsn = "$db_type://$db_user:$db_password@$db_host/$db_name";
require_once( 'DB.php' );
$db = DB::connect( $pear_dsn, true );
if ( DB::isError($db) ) die( $db->getMessage() );
$res = $db->query($sql);
$row = $res->fetchRow();
Expected result:
----------------
The text in TranscriptText to be the text and the same length.
Actual result:
--------------
See Description for this bug report.
--
Edit bug report at [url]http://bugs.php.net/?id=38805&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=38805&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=38805&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=38805&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=38805&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=38805&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=38805&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=38805&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=38805&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=38805&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=38805&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=38805&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=38805&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=38805&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=38805&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=38805&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=38805&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=38805&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=38805&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=38805&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=38805&r=mysqlcfg[/url]
gkrajci at arescorporation dot com Guest
-
Length of column with 'text' data type
Hi. I'm getting various data about columns in a table by using sp_column. Everything is working as I expected, except one thing. When I get the... -
#25972 [Ver->Ana]: ODBC truncates multi-byte text (w/ MSSQL)
ID: 25972 Updated by: moriyoshi@php.net Reported By: phpbug at chipple dot net -Status: Verified +Status: ... -
#25972 [Opn]: ODBC truncates multi-byte text (w/ MSSQL)
ID: 25972 User updated by: phpbug at chipple dot net Reported By: phpbug at chipple dot net Status: Open Bug Type: ... -
#25972 [NEW]: ODBC truncates multi-byte text (w/ MSSQL)
From: phpbug at chipple dot net Operating system: Win2K 5.00.2195 SP4 PHP version: 4.3.4RC2 PHP Bug Type: ODBC related Bug... -
text field that resizes as you type?
> So could flash make a text box that is one line wide and one line high, then when you type it grows in height not Your advice would be very... -
tony2001@php.net #2
#38805 [Opn->Asn]: PDO Truncates Text from SQL Server Text Data Type Field
ID: 38805
Updated by: [email]tony2001@php.net[/email]
Reported By: gkrajci at arescorporation dot com
-Status: Open
+Status: Assigned
Bug Type: PDO related
Operating System: Windows NT PBMA-WB2 5.2 build 37
PHP Version: 5.1.6
-Assigned To:
+Assigned To: wez
Previous Comments:
------------------------------------------------------------------------
[2006-09-13 13:06:35] gkrajci at arescorporation dot com
Description:
------------
When using PDO to retrieve text from a SQL Server text data type field
the text is truncated when I display it on a Web page
PDO Transcript length = 4096 (truncated)
PEAR Transcript length = 6139(full text)
Using SQL Server 2000
Reproduce code:
---------------
$sql = "SELECT title AS VideoTitle, transcript_text AS TranscriptText
FROM video WHERE video_id = 324";
$dbh = new PDO($pdo_dsn, $db_user, $db_password);
$transcript_q = $dbh->query($sql);
$transcript_rs = $transcript_q->fetch();
$pear_dsn = "$db_type://$db_user:$db_password@$db_host/$db_name";
require_once( 'DB.php' );
$db = DB::connect( $pear_dsn, true );
if ( DB::isError($db) ) die( $db->getMessage() );
$res = $db->query($sql);
$row = $res->fetchRow();
Expected result:
----------------
The text in TranscriptText to be the text and the same length.
Actual result:
--------------
See Description for this bug report.
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=38805&edit=1[/url]
tony2001@php.net Guest
-
iliaa@php.net #3
#38805 [Asn->Fbk]: PDO Truncates Text from SQL Server Text Data Type Field
ID: 38805
Updated by: [email]iliaa@php.net[/email]
Reported By: gkrajci at arescorporation dot com
-Status: Assigned
+Status: Feedback
Bug Type: PDO related
Operating System: Windows NT PBMA-WB2 5.2 build 37
PHP Version: 5.1.6
Assigned To: wez
New Comment:
what PDO driver are you using?
Previous Comments:
------------------------------------------------------------------------
[2006-09-13 13:06:35] gkrajci at arescorporation dot com
Description:
------------
When using PDO to retrieve text from a SQL Server text data type field
the text is truncated when I display it on a Web page
PDO Transcript length = 4096 (truncated)
PEAR Transcript length = 6139(full text)
Using SQL Server 2000
Reproduce code:
---------------
$sql = "SELECT title AS VideoTitle, transcript_text AS TranscriptText
FROM video WHERE video_id = 324";
$dbh = new PDO($pdo_dsn, $db_user, $db_password);
$transcript_q = $dbh->query($sql);
$transcript_rs = $transcript_q->fetch();
$pear_dsn = "$db_type://$db_user:$db_password@$db_host/$db_name";
require_once( 'DB.php' );
$db = DB::connect( $pear_dsn, true );
if ( DB::isError($db) ) die( $db->getMessage() );
$res = $db->query($sql);
$row = $res->fetchRow();
Expected result:
----------------
The text in TranscriptText to be the text and the same length.
Actual result:
--------------
See Description for this bug report.
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=38805&edit=1[/url]
iliaa@php.net Guest
-
wez@php.net #4
#38805 [Fbk]: PDO Truncates Text from SQL Server Text Data Type Field
ID: 38805
Updated by: [email]wez@php.net[/email]
Reported By: gkrajci at arescorporation dot com
Status: Feedback
Bug Type: PDO related
Operating System: Windows NT PBMA-WB2 5.2 build 37
PHP Version: 5.1.6
Assigned To: wez
New Comment:
I assume you're using ODBC?
Previous Comments:
------------------------------------------------------------------------
[2006-09-13 15:40:37] [email]iliaa@php.net[/email]
what PDO driver are you using?
------------------------------------------------------------------------
[2006-09-13 13:06:35] gkrajci at arescorporation dot com
Description:
------------
When using PDO to retrieve text from a SQL Server text data type field
the text is truncated when I display it on a Web page
PDO Transcript length = 4096 (truncated)
PEAR Transcript length = 6139(full text)
Using SQL Server 2000
Reproduce code:
---------------
$sql = "SELECT title AS VideoTitle, transcript_text AS TranscriptText
FROM video WHERE video_id = 324";
$dbh = new PDO($pdo_dsn, $db_user, $db_password);
$transcript_q = $dbh->query($sql);
$transcript_rs = $transcript_q->fetch();
$pear_dsn = "$db_type://$db_user:$db_password@$db_host/$db_name";
require_once( 'DB.php' );
$db = DB::connect( $pear_dsn, true );
if ( DB::isError($db) ) die( $db->getMessage() );
$res = $db->query($sql);
$row = $res->fetchRow();
Expected result:
----------------
The text in TranscriptText to be the text and the same length.
Actual result:
--------------
See Description for this bug report.
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=38805&edit=1[/url]
wez@php.net Guest
-
gkrajci at arescorporation dot com #5
#38805 [Fbk->Opn]: PDO Truncates Text from SQL Server Text Data Type Field
ID: 38805
User updated by: gkrajci at arescorporation dot com
Reported By: gkrajci at arescorporation dot com
-Status: Feedback
+Status: Open
Bug Type: PDO related
Operating System: Windows NT PBMA-WB2 5.2 build 37
PHP Version: 5.1.6
Assigned To: wez
New Comment:
Microsoft SQL Server connections
PHP.INI
---------------------------
extension=php_pdo.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
PDO
PDO support enabled
PDO drivers mssql, mysql
pdo_mssql
PDO Driver for MSSQL DB-lib enabled
Flavour MSSQL_70
pdo_mysql
PDO Driver for MySQL, client library version 5.0.22
Previous Comments:
------------------------------------------------------------------------
[2006-09-13 15:45:31] [email]wez@php.net[/email]
I assume you're using ODBC?
------------------------------------------------------------------------
[2006-09-13 15:40:37] [email]iliaa@php.net[/email]
what PDO driver are you using?
------------------------------------------------------------------------
[2006-09-13 13:06:35] gkrajci at arescorporation dot com
Description:
------------
When using PDO to retrieve text from a SQL Server text data type field
the text is truncated when I display it on a Web page
PDO Transcript length = 4096 (truncated)
PEAR Transcript length = 6139(full text)
Using SQL Server 2000
Reproduce code:
---------------
$sql = "SELECT title AS VideoTitle, transcript_text AS TranscriptText
FROM video WHERE video_id = 324";
$dbh = new PDO($pdo_dsn, $db_user, $db_password);
$transcript_q = $dbh->query($sql);
$transcript_rs = $transcript_q->fetch();
$pear_dsn = "$db_type://$db_user:$db_password@$db_host/$db_name";
require_once( 'DB.php' );
$db = DB::connect( $pear_dsn, true );
if ( DB::isError($db) ) die( $db->getMessage() );
$res = $db->query($sql);
$row = $res->fetchRow();
Expected result:
----------------
The text in TranscriptText to be the text and the same length.
Actual result:
--------------
See Description for this bug report.
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=38805&edit=1[/url]
gkrajci at arescorporation dot com Guest
-
ritch at bugsoftware dot co dot uk #6
#38805 [Com]: PDO Truncates Text from SQL Server Text Data Type Field
ID: 38805
Comment by: ritch at bugsoftware dot co dot uk
Reported By: gkrajci at arescorporation dot com
Status: Assigned
Bug Type: PDO related
Operating System: Windows NT PBMA-WB2 5.2 build 37
PHP Version: 5.1.6
Assigned To: wez
New Comment:
I'm also suffering this problem after changing my database connection
type to PDO.
I'm running PHP 5.1.2 on Windows server 2003 with MSSQL 2005.
In the old mssql ext. you had to specificaly tell the configure it in
php.ini to bring back larger text fields:
; Valid range 0 - 2147483647. Default = 4096.
mssql.textlimit = 2147483647
; Valid range 0 - 2147483647. Default = 4096.
mssql.textsize = 2147483647
I have not found the same for the new PDO extension - so I'm assuming
this has some thing to do with the problem. (My text fields are also
truncated to 4096)
Help with this issue would be greatley appreciated.
Previous Comments:
------------------------------------------------------------------------
[2006-09-14 11:47:26] gkrajci at arescorporation dot com
Microsoft SQL Server connections
PHP.INI
---------------------------
extension=php_pdo.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
PDO
PDO support enabled
PDO drivers mssql, mysql
pdo_mssql
PDO Driver for MSSQL DB-lib enabled
Flavour MSSQL_70
pdo_mysql
PDO Driver for MySQL, client library version 5.0.22
------------------------------------------------------------------------
[2006-09-13 15:45:31] [email]wez@php.net[/email]
I assume you're using ODBC?
------------------------------------------------------------------------
[2006-09-13 15:40:37] [email]iliaa@php.net[/email]
what PDO driver are you using?
------------------------------------------------------------------------
[2006-09-13 13:06:35] gkrajci at arescorporation dot com
Description:
------------
When using PDO to retrieve text from a SQL Server text data type field
the text is truncated when I display it on a Web page
PDO Transcript length = 4096 (truncated)
PEAR Transcript length = 6139(full text)
Using SQL Server 2000
Reproduce code:
---------------
$sql = "SELECT title AS VideoTitle, transcript_text AS TranscriptText
FROM video WHERE video_id = 324";
$dbh = new PDO($pdo_dsn, $db_user, $db_password);
$transcript_q = $dbh->query($sql);
$transcript_rs = $transcript_q->fetch();
$pear_dsn = "$db_type://$db_user:$db_password@$db_host/$db_name";
require_once( 'DB.php' );
$db = DB::connect( $pear_dsn, true );
if ( DB::isError($db) ) die( $db->getMessage() );
$res = $db->query($sql);
$row = $res->fetchRow();
Expected result:
----------------
The text in TranscriptText to be the text and the same length.
Actual result:
--------------
See Description for this bug report.
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=38805&edit=1[/url]
ritch at bugsoftware dot co dot uk Guest
-
mark dot pearson at capita dot co dot uk #7
#38805 [Com]: PDO Truncates Text from SQL Server Text Data Type Field
ID: 38805
Comment by: mark dot pearson at capita dot co dot uk
Reported By: gkrajci at arescorporation dot com
Status: Assigned
Bug Type: PDO related
Operating System: Windows NT PBMA-WB2 5.2 build 37
PHP Version: 5.1.6
Assigned To: wez
New Comment:
I have found the same problem with PHP 5.1.6 running on Windows XP Pro
SP2 and MS SQL Server 2000 (using the pdo_mssql driver).
I also tried to solve it by setting the mssql.textlimit and
mssql.textsize INI options, since that used to cause the same problem
in the mssql extension but it doesn't have any effect on the values
returned by PDO.
Previous Comments:
------------------------------------------------------------------------
[2006-09-26 16:22:57] ritch at bugsoftware dot co dot uk
I'm also suffering this problem after changing my database connection
type to PDO.
I'm running PHP 5.1.2 on Windows server 2003 with MSSQL 2005.
In the old mssql ext. you had to specificaly tell the configure it in
php.ini to bring back larger text fields:
; Valid range 0 - 2147483647. Default = 4096.
mssql.textlimit = 2147483647
; Valid range 0 - 2147483647. Default = 4096.
mssql.textsize = 2147483647
I have not found the same for the new PDO extension - so I'm assuming
this has some thing to do with the problem. (My text fields are also
truncated to 4096)
Help with this issue would be greatley appreciated.
------------------------------------------------------------------------
[2006-09-14 11:47:26] gkrajci at arescorporation dot com
Microsoft SQL Server connections
PHP.INI
---------------------------
extension=php_pdo.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
PDO
PDO support enabled
PDO drivers mssql, mysql
pdo_mssql
PDO Driver for MSSQL DB-lib enabled
Flavour MSSQL_70
pdo_mysql
PDO Driver for MySQL, client library version 5.0.22
------------------------------------------------------------------------
[2006-09-13 15:45:31] [email]wez@php.net[/email]
I assume you're using ODBC?
------------------------------------------------------------------------
[2006-09-13 15:40:37] [email]iliaa@php.net[/email]
what PDO driver are you using?
------------------------------------------------------------------------
[2006-09-13 13:06:35] gkrajci at arescorporation dot com
Description:
------------
When using PDO to retrieve text from a SQL Server text data type field
the text is truncated when I display it on a Web page
PDO Transcript length = 4096 (truncated)
PEAR Transcript length = 6139(full text)
Using SQL Server 2000
Reproduce code:
---------------
$sql = "SELECT title AS VideoTitle, transcript_text AS TranscriptText
FROM video WHERE video_id = 324";
$dbh = new PDO($pdo_dsn, $db_user, $db_password);
$transcript_q = $dbh->query($sql);
$transcript_rs = $transcript_q->fetch();
$pear_dsn = "$db_type://$db_user:$db_password@$db_host/$db_name";
require_once( 'DB.php' );
$db = DB::connect( $pear_dsn, true );
if ( DB::isError($db) ) die( $db->getMessage() );
$res = $db->query($sql);
$row = $res->fetchRow();
Expected result:
----------------
The text in TranscriptText to be the text and the same length.
Actual result:
--------------
See Description for this bug report.
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=38805&edit=1[/url]
mark dot pearson at capita dot co dot uk Guest
-
frank at interlevel dot com #8
#38805 [Com]: PDO Truncates Text from SQL Server Text Data Type Field
ID: 38805
Comment by: frank at interlevel dot com
Reported By: gkrajci at arescorporation dot com
Status: Assigned
Bug Type: PDO related
Operating System: Windows NT PBMA-WB2 5.2 build 37
PHP Version: 5.1.6
Assigned To: wez
New Comment:
Seems I am not alone on this. I have also tried altering the PHP.ini
with no result. IS there an update to this PDO?
Previous Comments:
------------------------------------------------------------------------
[2006-11-08 14:30:06] mark dot pearson at capita dot co dot uk
I have found the same problem with PHP 5.1.6 running on Windows XP Pro
SP2 and MS SQL Server 2000 (using the pdo_mssql driver).
I also tried to solve it by setting the mssql.textlimit and
mssql.textsize INI options, since that used to cause the same problem
in the mssql extension but it doesn't have any effect on the values
returned by PDO.
------------------------------------------------------------------------
[2006-09-26 16:22:57] ritch at bugsoftware dot co dot uk
I'm also suffering this problem after changing my database connection
type to PDO.
I'm running PHP 5.1.2 on Windows server 2003 with MSSQL 2005.
In the old mssql ext. you had to specificaly tell the configure it in
php.ini to bring back larger text fields:
; Valid range 0 - 2147483647. Default = 4096.
mssql.textlimit = 2147483647
; Valid range 0 - 2147483647. Default = 4096.
mssql.textsize = 2147483647
I have not found the same for the new PDO extension - so I'm assuming
this has some thing to do with the problem. (My text fields are also
truncated to 4096)
Help with this issue would be greatley appreciated.
------------------------------------------------------------------------
[2006-09-14 11:47:26] gkrajci at arescorporation dot com
Microsoft SQL Server connections
PHP.INI
---------------------------
extension=php_pdo.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
PDO
PDO support enabled
PDO drivers mssql, mysql
pdo_mssql
PDO Driver for MSSQL DB-lib enabled
Flavour MSSQL_70
pdo_mysql
PDO Driver for MySQL, client library version 5.0.22
------------------------------------------------------------------------
[2006-09-13 15:45:31] [email]wez@php.net[/email]
I assume you're using ODBC?
------------------------------------------------------------------------
[2006-09-13 15:40:37] [email]iliaa@php.net[/email]
what PDO driver are you using?
------------------------------------------------------------------------
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
[url]http://bugs.php.net/38805[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=38805&edit=1[/url]
frank at interlevel dot com Guest
-
matt at educause dot edu #9
#38805 [Com]: PDO Truncates Text from SQL Server Text Data Type Field
ID: 38805
Comment by: matt at educause dot edu
Reported By: gkrajci at arescorporation dot com
Status: Assigned
Bug Type: PDO related
Operating System: Windows NT PBMA-WB2 5.2 build 37
PHP Version: 5.1.6
Assigned To: wez
New Comment:
I too can reproduce this problem ... a critical hurdle for us.
Previous Comments:
------------------------------------------------------------------------
[2006-12-06 14:50:17] frank at interlevel dot com
Seems I am not alone on this. I have also tried altering the PHP.ini
with no result. IS there an update to this PDO?
------------------------------------------------------------------------
[2006-11-08 14:30:06] mark dot pearson at capita dot co dot uk
I have found the same problem with PHP 5.1.6 running on Windows XP Pro
SP2 and MS SQL Server 2000 (using the pdo_mssql driver).
I also tried to solve it by setting the mssql.textlimit and
mssql.textsize INI options, since that used to cause the same problem
in the mssql extension but it doesn't have any effect on the values
returned by PDO.
------------------------------------------------------------------------
[2006-09-26 16:22:57] ritch at bugsoftware dot co dot uk
I'm also suffering this problem after changing my database connection
type to PDO.
I'm running PHP 5.1.2 on Windows server 2003 with MSSQL 2005.
In the old mssql ext. you had to specificaly tell the configure it in
php.ini to bring back larger text fields:
; Valid range 0 - 2147483647. Default = 4096.
mssql.textlimit = 2147483647
; Valid range 0 - 2147483647. Default = 4096.
mssql.textsize = 2147483647
I have not found the same for the new PDO extension - so I'm assuming
this has some thing to do with the problem. (My text fields are also
truncated to 4096)
Help with this issue would be greatley appreciated.
------------------------------------------------------------------------
[2006-09-14 11:47:26] gkrajci at arescorporation dot com
Microsoft SQL Server connections
PHP.INI
---------------------------
extension=php_pdo.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
PDO
PDO support enabled
PDO drivers mssql, mysql
pdo_mssql
PDO Driver for MSSQL DB-lib enabled
Flavour MSSQL_70
pdo_mysql
PDO Driver for MySQL, client library version 5.0.22
------------------------------------------------------------------------
[2006-09-13 15:45:31] [email]wez@php.net[/email]
I assume you're using ODBC?
------------------------------------------------------------------------
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
[url]http://bugs.php.net/38805[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=38805&edit=1[/url]
matt at educause dot edu Guest



Reply With Quote

