php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5172 conversion of hex syskeys in prepared statements
Submitted: 2000-06-21 16:31 UTC Modified: 2000-07-31 21:49 UTC
From: k dot kleist at mediatransfer dot de Assigned:
Status: Closed Package: Adabas-D related
PHP Version: 4.0.0 Release OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
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:
12 - 4 = ?
Subscribe to this entry?

 
 [2000-06-21 16:31 UTC] k dot kleist at mediatransfer dot de
The conversion of an Adabas-D syskey in prepared statements don't work since php4.0RC1.
The following code discribes the problem:

$syskey = "00000000005A59AA"; // hex representation of an char(8)byte syskey

$query = "insert into table (id) values ( ?)";
$pre = odbc_prepare($conn, $query);
$data[0] = $syskey;
$result = odbc_execute($pre, $data);

The odbc_execute command will produce the following error:
source: [SOFTWARE AG][ODBCLIB A][ADABAS]
message: INPUT STRING VARIABLE TOO LONG.
               String data, right truncated
error-code: 743
State: 01004

When I'm inserting a substring of the key ($data[0] = substr($syskey, 8) it works, but it isn't the same key!!!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-31 21:49 UTC] waldschrott@php.net
As I can figure out, you?ve choosen the column width 8, in
fact it has to be longer. Your 8Byte syskey is of course
8Bytes long, but your representation is 16 chars long (count
your chars).
This is no PHP bug. Extend you col size.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 09:01:28 2024 UTC