Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0b4

Bug #9410 fread() truncates after execute()
Submitted: 2006-11-21 19:59 UTC
From: blair dot chesnut at duke dot edu Assigned: davidc
Status: Bogus Package: MDB2_Driver_mssql (version 2.3.0)
PHP Version: 5.1.2 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 33 + 4 = ?

 
 [2006-11-21 19:59 UTC] blair dot chesnut at duke dot edu (Blair Chesnut)
Description: ------------ After executing $db->excute() with parameterized query, output from fread() is truncated to 8192 bytes. Works fine with no placeholder/parameter. MDB2 2.3.0 MDB2_Driver_mssql 1.1.0 Test script: --------------- <?php require_once "MDB2.php"; $fh = fopen('bigfile.txt', 'r'); $contents = fread($fh, filesize('bigfile.txt')); print "Contents = " . strlen($contents) . "\n"; $dsn = "mssql://user:passwd@server/db"; $dbh = MDB2::factory($dsn); $query = "select * from sysobjects where name like ?"; $sth = $dbh->prepare($query); $res = $sth->execute('A%'); $fh = fopen('bigfile.txt', 'r'); $contents = fread($fh, filesize('bigfile.txt')); print "Contents = " . strlen($contents) . "\n"; ?> Expected result: ---------------- Contents = 10000 Contents = 10000 Actual result: -------------- Contents = 10000 Contents = 8192

Comments

 [2006-12-25 19:16 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-01-03 14:38 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-01-03 15:29 UTC] blair dot chesnut at duke dot edu
David, what exactly should I get from cvs? Would you post the cvs commands?
 [2007-01-03 21:34 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-01-16 03:24 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-01-19 15:24 UTC] blair dot chesnut at duke dot edu
Thanks, David. Installed MDB2_Driver_mssql-1.1.2, but still have the same problem. Perhaps it's FreeTDS. Is there a way to run a placeholder query using PHP's mssql functions?
 [2007-01-22 05:09 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!