Bug #24244 [Com]: odbc_errormsg() sometimes returns a bad string when no error occurs

From: Date: Thu, 12 Feb 2015 16:33:18 +0000
Subject: Bug #24244 [Com]: odbc_errormsg() sometimes returns a bad string when no error occurs
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190631@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=24244&edit=1

 ID:                 24244
 Comment by:         vaughng at dmsllconline dot net
 Reported by:        bl at btn dot de
 Summary:            odbc_errormsg() sometimes returns a bad string when
                     no error occurs
 Status:             No Feedback
 Type:               Bug
 Package:            ODBC related
 Operating System:   Red Hat Linux
 PHP Version:        4.3.2
 Block user comment: N
 Private report:     N

 New Comment:

@requinix After more searching I think my issue is likely closely related to a poorly documented
error in the the way my ODBC driver vendor returns information to SQLGetInfo function, as I think
odbc_errormsg calls SQLGetInfo. So no error in the odbc_errormsg function. Thanks for looking at my
mistaken post though.


Previous Comments:
------------------------------------------------------------------------
[2015-02-09 19:31:25] requinix@php.net

@vaughng: Yes, quite old. Since this bug report seems to have lost its information, can you create a
new one?

------------------------------------------------------------------------
[2015-02-09 13:56:12] vaughng at dmsllconline dot net

I know this is a old but but it still seems to be popping up in the latest versions
(5.4.36-0+deb7u3) Jan 9th build Debain 7.8 OS, it seems to still be quite intermittent, the same
functions will trigger one run but not the next, with the same input. The returned string is ether
"?" (minus the quotes) or a non printing char.

------------------------------------------------------------------------
[2006-09-15 20:36:56] bruno dot faust at ig dot com dot br

Hi
I'm having the same problem with de lastest version of php on iseries 550.

The odbc_error function sometimes return ascii(001) and the odbc_errormsg returns bad string.

php version: 5.1.6 and lastest in cvs today.
OS: Windows XP lastest updates.

------------------------------------------------------------------------
[2005-01-31 04:20:04] zoop at lone dot ath dot cx

I thought I did have a problem running odbc_error() but it looks like it's been clean everytime
but as you can see the errormsg seems to get random stuff.   I'll post to this bug if I see the
problem again while useing odbc_error()


I've just ran into this problem myself.  it's with db2. the error is usually less frequent
for me but sometimes it will happen many times in a row.

this is the code I used to get the random garbage.

$conn_id = odbc_connect("netmap","user","pass");
$err=odbc_errormsg($conn_id);
if($err) {
        var_dump(odbc_error());
        print ">".$err."<";
}


this is the output of an error.
>@\y—¶Öçù 5Kbz“­Èä>^o”¨½Óê5Pl‰§Ææ÷
>0E[rŠ£½Øô/Nn‘¤¸Íãú+E`|™·Öö,@Uk‚š³Íè!?^~¡´ÈÝó ";UpŒ


This also happens: I just added the var_dump(odbc_error())here: 

string(0) "" >My Company Ltd [SSL_SERVER_I_DN_CN] => zoop@lone.ath.cx
[SSL_SERVER_I_DN_EMAILADDRESS] => zoop@lone.ath.cx [SSL_SERVER_M_SERIAL] => 05
[SSL_SERVER_V_START] => Oct 13 22:08:48 2004 GMT [SSL_SERVER_V_END] => Oct 13 22:08:48 2005
GMT [SSL_SERVER_M_VERSION] => 3 [GATEWAY_INÉ 


this one is also odd it seems to be loading other php files and spitting them out here not sure how.
this page wasn't being accessed when this error occured. this is an a line for another .php
file on the system.

string(0) "" >r:cwa2.jar:. blueAuth ".escapeshellcmd($user)."
".escapeshellcmd($pass)." \"".escapeshellcmd($group) 3

Another:
string(0) "" >ÿÿ

I now changed the script to be a connect of course first.:

var_dump(odbc_error());
$err=odbc_errormsg($conn_id);
if($err) {
        print ">".$err."<";
}

string(0) "" >ÿÿ

------------------------------------------------------------------------
[2003-08-01 06:09:31] sniper@php.net

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.



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


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

    https://bugs.php.net/bug.php?id=24244


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


Thread (13 messages)

« previous php.bugs (#190631) next »