|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17140 connected to DB2: odbc_error() gives strange results
Submitted: 2002-05-10 09:01 UTC Modified: 2002-05-21 23:32 UTC
From: ernst at paradigma dot net Assigned:
Status: Not a bug Package: ODBC related
PHP Version: 4.1.2 OS: AIX 4.3.3
Private report: No CVE-ID: None
 [2002-05-10 09:01 UTC] ernst at paradigma dot net
Trying odbc_error and odbc_errormsg I got strange strings back instead of the actual error messages; after saving again and reloading I got the correct Error/Message; after new reload I got Strange results again.


function printerror($code, $msg, $method="array") {
print "<h2>An Error has occured</h2><table border=0><tr><td><b>Code: $code</b></td><td>Message: $msg</td></tr></table>";}

$res = odbc_prepare($conn, $stmt);
if(!(odbc_execute($res))) printerror(odbc_error($conn),odbc_errormsg($conn));

Code: %?t % Message: ?? $?D ?H 
Code: %?` % Message: ?t %?? %?? 
Code: hp    Message: major 

It seems I get parts of my Scripts back...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-21 23:32 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Jan 26 09:03:33 2022 UTC