php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43517 String longer then 256 mish-mash
Submitted: 2007-12-06 13:50 UTC Modified: 2008-01-29 00:49 UTC
From: gkplus at gmail dot com Assigned:
Status: Not a bug Package: PDO related
PHP Version: 5.2.5 OS: MS Win XP32
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: gkplus at gmail dot com
New email:
PHP Version: OS:

 

 [2007-12-06 13:50 UTC] gkplus at gmail dot com
Description:
------------
String mish-mash. Character string longer then 256 chars mish-mash at the end of the string.
ODBC Driver in other application work ok.
Regulary mish-mash on all strings longer then 256. 

Reproduce code:
---------------
$dsn = "odbc:DRIVER={Progress OpenEdge 10.1A driver};HOST=localhost;DB=soja;UID=abc;PWD=xyz;PORT=23900";
$dbh = new PDO($dsn);
$sql = 'SELECT
  certyfikaty.nr_certyfikatu,
  certyfikaty.zakres,
  firmy.nazwa_firmy 
FROM PUB.certyfikaty, PUB.firmy
  WHERE  certyfikaty.id_firmy = firmy.id_firmy;

$stmt = $dbh->prepare($sql);
$stmt->execute();
$stmt->bindColumn(1, $nr_certyfikatu, PDO::PARAM_STR, 16);
$stmt->bindColumn(2, $zakres, PDO::PARAM_STR, 512);   
$stmt->bindColumn(3, $nazwa_firmy, PDO::PARAM_STR, 64);   

while ($row = $stmt->fetch(PDO::FETCH_BOUND)){
	echo "<td>".$nr_certyfikatu."</td>";
	echo "<td>".$nazwa_firmy."</td>";
	echo "<td>".$zakres."</td>";
	echo "</tr>";}
$dbh = null;


Expected result:
----------------
echo "<td>".$zakres."</td>" 
---------------------------
Dostawy, monta?, uruchamianie i serwis system?w i urz?dze? elektroniki morskiej i l?dowej oraz system?w i urz?dze? dla s?u?b komunalnych i administracyjnych. Przedstawicielstwo handlowe i serwisowe producent?w ww. system?w i urz?dze?. Opracowanie i wykonawanie i wykonawstwo fotoluminescencyjnych system?w oznakowa? bezpiecze?stwa dla obiekt?w l?dowych i morskich.

Actual result:
--------------
echo "<td>".$zakres."</td>";
----------------------------
Dostawy, monta?, uruchamianie i serwis system?w i urz?dze? elektroniki morskiej i l?dowej oraz system?w i urz?dze? dla s?u?b komunalnych i administracyjnych. Przedstawicielstwo handlowe i serwisowe producent?w ww. system?w i urz?dze?. Opracowanie i wykonawanie i wykonawstwo fotoluminescencyjnych system?w oznakowa? bezpiecze?stwa dla obiekt?w l?dowya8?iKdowych i morskich.
                                   -----------------

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-06 21:57 UTC] powszechnie dot znanay at gmail dot com
Similar problem:
#40150 PDO::ODBC Multiple byte letter is destroyed. 
Charcter string is destroyed.
 [2008-01-29 00:49 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 25 17:01:27 2024 UTC