Professional Web Applications Themes

#38805 [NEW]: PDO Truncates Text from SQL Server Text Data Type Field - PHP Bugs

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, ...

  1. #1

    Default #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

  2. #2

    Default #38805 [Opn->Asn]: PDO Truncates Text from SQL Server Text Data Type Field

    ID: 38805
    Updated by: [email]tony2001php.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

  3. #3

    Default #38805 [Asn->Fbk]: PDO Truncates Text from SQL Server Text Data Type Field

    ID: 38805
    Updated by: [email]iliaaphp.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

  4. #4

    Default #38805 [Fbk]: PDO Truncates Text from SQL Server Text Data Type Field

    ID: 38805
    Updated by: [email]wezphp.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]iliaaphp.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

  5. #5

    Default #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]wezphp.net[/email]

    I assume you're using ODBC?

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

    [2006-09-13 15:40:37] [email]iliaaphp.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

  6. #6

    Default #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]wezphp.net[/email]

    I assume you're using ODBC?

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

    [2006-09-13 15:40:37] [email]iliaaphp.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

  7. #7

    Default #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]wezphp.net[/email]

    I assume you're using ODBC?

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

    [2006-09-13 15:40:37] [email]iliaaphp.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

  8. #8

    Default #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]wezphp.net[/email]

    I assume you're using ODBC?

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

    [2006-09-13 15:40:37] [email]iliaaphp.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

  9. #9

    Default #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]wezphp.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

  10. #10

    Default #38805 [Com]: PDO Truncates Text from SQL Server Text Data Type Field

    ID: 38805
    Comment by: kristaps at kraksti dot lv
    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:

    Hello!

    Have you tried $pdo->query('SET TEXTSIZE {number} ');
    Where number is text size (in bytes). Max number is 2 GB in bytes.


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-06-20 13:39:10] mcleod at spaceweb dot nl

    Also on:
    OS: Windows XP Pro
    PHP version: 5.2.5
    MSSQL server 2005
    It worries me that it affects Zend_Db. I experienced it using PDO
    directly.

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

    [2008-06-19 07:01:26] Phil dot H at gmx dot net

    please fix that bug, this is also a problem if you want to use zend_db
    or something like that! This makes the whole zend_db classes useless!

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

    [2008-06-18 12:04:35] me at opensol dot com

    I can confirm this bug in php 5.2.5

    This is a heavy bug, please fix this soon!

    A setting like
    mssql.textlimit = 2147483647
    mssql.textsize = 2147483647
    would be great!

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

    [2008-03-27 08:25:53] andrew-law at yandex dot ru

    It's a pity php developers don't hear their colleagues. This is a
    critical bug and it hasn't fixed yet.

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

    [2008-01-09 15:14:17] rob at tdd dot org dot uk

    I have found that it doesn't get truncted with ODBC, however I have
    found certain stored procedures don't work with ODBC. My solution is to
    create a DAL class which has a factory method to create a PDO connection
    based on driver selection. Then during my testing if I find it to work
    in one and not in another then I switch the database connection over to
    the one that works.

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

    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/38805

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

    kristaps Guest

  11. #11

    Default #38805 [Asn]: 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: 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:

    Trying $pdo->query('SET TEXTSIZE {number}'); did not work...

    $dbh = new PDO($pdo_dsn, $db_user, $db_password);
    $sql = "SELECT the_content, DATALENGTH(the_content) AS d_l FROM content
    WHERE content_id = 578";
    $dbh->query('SET TEXTSIZE 300000');
    $stmt = $dbh->prepare($sql);
    $stmt->execute();
    while ( $row = $stmt->fetch() ) {
    $video_count++;
    echo 'LENGTH: '.strlen($row["the_content"]).', '.$row["d_l"].'<br
    />';
    }

    OUTPUT:

    LENGTH: 4096, 24868


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-07-30 13:18:39] kristaps at kraksti dot lv

    Hello!

    Have you tried $pdo->query('SET TEXTSIZE {number} ');
    Where number is text size (in bytes). Max number is 2 GB in bytes.

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

    [2008-06-20 13:39:10] mcleod at spaceweb dot nl

    Also on:
    OS: Windows XP Pro
    PHP version: 5.2.5
    MSSQL server 2005
    It worries me that it affects Zend_Db. I experienced it using PDO
    directly.

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

    [2008-06-19 07:01:26] Phil dot H at gmx dot net

    please fix that bug, this is also a problem if you want to use zend_db
    or something like that! This makes the whole zend_db classes useless!

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

    [2008-06-18 12:04:35] me at opensol dot com

    I can confirm this bug in php 5.2.5

    This is a heavy bug, please fix this soon!

    A setting like
    mssql.textlimit = 2147483647
    mssql.textsize = 2147483647
    would be great!

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

    [2008-03-27 08:25:53] andrew-law at yandex dot ru

    It's a pity php developers don't hear their colleagues. This is a
    critical bug and it hasn't fixed yet.

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

    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/38805

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

    gkrajci Guest

  12. #12

    Default #38805 [Com]: PDO Truncates Text from SQL Server Text Data Type Field

    ID: 38805
    Comment by: chinnet at 126 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:

    My php version is 5.2.3.
    Now,I use PDO_MSSQL read the image type data from SQL Server 2000.
    But i only get 4096B from the db.

    so what can i do?

    ; Valid range 0 - 2147483647. Default = 4096.
    mssql.textlimit = 2147483647

    ; Valid range 0 - 2147483647. Default = 4096.
    mssql.textsize = 2147483647

    This is supported by php_mssql.dll.But not supported by PDO_MSSQL!

    so it is very important!


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-08-04 12:40:00] gkrajci at arescorporation dot com

    Trying $pdo->query('SET TEXTSIZE {number}'); did not work...

    $dbh = new PDO($pdo_dsn, $db_user, $db_password);
    $sql = "SELECT the_content, DATALENGTH(the_content) AS d_l FROM content
    WHERE content_id = 578";
    $dbh->query('SET TEXTSIZE 300000');
    $stmt = $dbh->prepare($sql);
    $stmt->execute();
    while ( $row = $stmt->fetch() ) {
    $video_count++;
    echo 'LENGTH: '.strlen($row["the_content"]).', '.$row["d_l"].'<br
    />';
    }

    OUTPUT:

    LENGTH: 4096, 24868

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

    [2008-07-30 13:18:39] kristaps at kraksti dot lv

    Hello!

    Have you tried $pdo->query('SET TEXTSIZE {number} ');
    Where number is text size (in bytes). Max number is 2 GB in bytes.

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

    [2008-06-20 13:39:10] mcleod at spaceweb dot nl

    Also on:
    OS: Windows XP Pro
    PHP version: 5.2.5
    MSSQL server 2005
    It worries me that it affects Zend_Db. I experienced it using PDO
    directly.

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

    [2008-06-19 07:01:26] Phil dot H at gmx dot net

    please fix that bug, this is also a problem if you want to use zend_db
    or something like that! This makes the whole zend_db classes useless!

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

    [2008-06-18 12:04:35] me at opensol dot com

    I can confirm this bug in php 5.2.5

    This is a heavy bug, please fix this soon!

    A setting like
    mssql.textlimit = 2147483647
    mssql.textsize = 2147483647
    would be great!

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

    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/38805

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

    chinnet Guest

  13. #13

    Default #38805 [Com]: PDO Truncates Text from SQL Server Text Data Type Field

    ID: 38805
    Comment by: J dot Antonio at jaruz 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:

    This issue is now more then TWO YEARS old. Can "wez" please have a look
    at it?


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-09-18 14:04:18] chinnet at 126 dot com

    My php version is 5.2.3.
    Now,I use PDO_MSSQL read the image type data from SQL Server 2000.
    But i only get 4096B from the db.

    so what can i do?

    ; Valid range 0 - 2147483647. Default = 4096.
    mssql.textlimit = 2147483647

    ; Valid range 0 - 2147483647. Default = 4096.
    mssql.textsize = 2147483647

    This is supported by php_mssql.dll.But not supported by PDO_MSSQL!

    so it is very important!

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

    [2008-08-04 12:40:00] gkrajci at arescorporation dot com

    Trying $pdo->query('SET TEXTSIZE {number}'); did not work...

    $dbh = new PDO($pdo_dsn, $db_user, $db_password);
    $sql = "SELECT the_content, DATALENGTH(the_content) AS d_l FROM content
    WHERE content_id = 578";
    $dbh->query('SET TEXTSIZE 300000');
    $stmt = $dbh->prepare($sql);
    $stmt->execute();
    while ( $row = $stmt->fetch() ) {
    $video_count++;
    echo 'LENGTH: '.strlen($row["the_content"]).', '.$row["d_l"].'<br
    />';
    }

    OUTPUT:

    LENGTH: 4096, 24868

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

    [2008-07-30 13:18:39] kristaps at kraksti dot lv

    Hello!

    Have you tried $pdo->query('SET TEXTSIZE {number} ');
    Where number is text size (in bytes). Max number is 2 GB in bytes.

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

    [2008-06-20 13:39:10] mcleod at spaceweb dot nl

    Also on:
    OS: Windows XP Pro
    PHP version: 5.2.5
    MSSQL server 2005
    It worries me that it affects Zend_Db. I experienced it using PDO
    directly.

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

    [2008-06-19 07:01:26] Phil dot H at gmx dot net

    please fix that bug, this is also a problem if you want to use zend_db
    or something like that! This makes the whole zend_db classes useless!

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

    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/38805

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

    J Guest

  14. #14

    Default #38805 [Com]: PDO Truncates Text from SQL Server Text Data Type Field

    ID: 38805
    Comment by: mario dot estrada at gmail 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:

    Come on guys, please fix this! This is a MAJOR bug and it seems like
    you really don't care!


    Previous Comments:
    ------------------------------------------------------------------------

    [2008-09-19 12:49:17] J dot Antonio at jaruz dot com

    This issue is now more then TWO YEARS old. Can "wez" please have a look
    at it?

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

    [2008-09-18 14:04:18] chinnet at 126 dot com

    My php version is 5.2.3.
    Now,I use PDO_MSSQL read the image type data from SQL Server 2000.
    But i only get 4096B from the db.

    so what can i do?

    ; Valid range 0 - 2147483647. Default = 4096.
    mssql.textlimit = 2147483647

    ; Valid range 0 - 2147483647. Default = 4096.
    mssql.textsize = 2147483647

    This is supported by php_mssql.dll.But not supported by PDO_MSSQL!

    so it is very important!

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

    [2008-08-04 12:40:00] gkrajci at arescorporation dot com

    Trying $pdo->query('SET TEXTSIZE {number}'); did not work...

    $dbh = new PDO($pdo_dsn, $db_user, $db_password);
    $sql = "SELECT the_content, DATALENGTH(the_content) AS d_l FROM content
    WHERE content_id = 578";
    $dbh->query('SET TEXTSIZE 300000');
    $stmt = $dbh->prepare($sql);
    $stmt->execute();
    while ( $row = $stmt->fetch() ) {
    $video_count++;
    echo 'LENGTH: '.strlen($row["the_content"]).', '.$row["d_l"].'<br
    />';
    }

    OUTPUT:

    LENGTH: 4096, 24868

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

    [2008-07-30 13:18:39] kristaps at kraksti dot lv

    Hello!

    Have you tried $pdo->query('SET TEXTSIZE {number} ');
    Where number is text size (in bytes). Max number is 2 GB in bytes.

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

    [2008-06-20 13:39:10] mcleod at spaceweb dot nl

    Also on:
    OS: Windows XP Pro
    PHP version: 5.2.5
    MSSQL server 2005
    It worries me that it affects Zend_Db. I experienced it using PDO
    directly.

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

    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/38805

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

    mario Guest

Similar Threads

  1. i want to display all the data in the database to the text field
    By binglee17@gmail.com in forum Macromedia Director 3D
    Replies: 0
    Last Post: June 23rd, 05:57 AM
  2. Length of column with 'text' data type
    By Blazeix in forum Coldfusion Database Access
    Replies: 5
    Last Post: June 9th, 04:51 PM
  3. Replies: 2
    Last Post: February 22nd, 04:59 PM
  4. text field including text from a text file *.txt
    By Bernd Bach in forum Macromedia Flash
    Replies: 0
    Last Post: April 13th, 09:37 AM
  5. text field that resizes as you type?
    By rickaaa webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 0
    Last Post: June 29th, 11:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139