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

2006-09-15 Thread bruno dot faust at ig dot com dot br
 ID:   24244
 Comment by:   bruno dot faust at ig dot com dot br
 Reported By:  bl at btn dot de
 Status:   No Feedback
 Bug Type: ODBC related
 Operating System: Red Hat Linux
 PHP Version:  4.3.2
 New Comment:

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.


Previous Comments:


[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] => [EMAIL PROTECTED]
[SSL_SERVER_I_DN_EMAILADDRESS] => [EMAIL PROTECTED]
[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] [EMAIL PROTECTED]

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.





[2003-07-27 13:19:29] [EMAIL PROTECTED]

Actually I wanted to see the error id not the error message. So please
tell me what is the output of:
var_dump(odbc_error())



[2003-06-26 18:23:37] [EMAIL PROTECTED]

Do not add comments to your own report, use this link:
http://bugs.php.net/bug.php?id=24244&edit=2




[2003-06-26 04:07:16] mb at btn dot de

Output of var_dump(odbc_errormsg()) as follows:

string(146)
"31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:"

string(122)
"1:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:"

These are only two examples. I had to reproduce the error in a small
script to generate these. That's why the variety is not that great like
in our production environment where we currently use a dirty workaround.



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
http://bugs.php.net/24244

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


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

2005-01-30 Thread zoop at lone dot ath dot cx
 ID:   24244
 Comment by:   zoop at lone dot ath dot cx
 Reported By:  bl at btn dot de
 Status:   No Feedback
 Bug Type: ODBC related
 Operating System: Red Hat Linux
 PHP Version:  4.3.2
 New Comment:

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] => [EMAIL PROTECTED]
[SSL_SERVER_I_DN_EMAILADDRESS] => [EMAIL PROTECTED]
[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) "" >ÿÿ


Previous Comments:


[2003-08-01 06:09:31] [EMAIL PROTECTED]

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.





[2003-07-27 13:19:29] [EMAIL PROTECTED]

Actually I wanted to see the error id not the error message. So please
tell me what is the output of:
var_dump(odbc_error())



[2003-06-26 18:23:37] [EMAIL PROTECTED]

Do not add comments to your own report, use this link:
http://bugs.php.net/bug.php?id=24244&edit=2




[2003-06-26 04:07:16] mb at btn dot de

Output of var_dump(odbc_errormsg()) as follows:

string(146)
"31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:"

string(122)
"1:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:"

These are only two examples. I had to reproduce the error in a small
script to generate these. That's why the variety is not that great like
in our production environment where we currently use a dirty workaround.



[2003-06-18 10:24:52] [EMAIL PROTECTED]

What does var_dump(odbc_error()) return after a valid query?



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
http://bugs.php.net/24244

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


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

2003-10-15 Thread thorsten at rinne dot info
 ID:   24244
 Comment by:   thorsten at rinne dot info
 Reported By:  bl at btn dot de
 Status:   No Feedback
 Bug Type: ODBC related
 Operating System: Red Hat Linux
 PHP Version:  4.3.2
 New Comment:

Hi,

I'm using PHP 4.3.3 on W2K with a IBM DB2 database version 8.1. If an
error occured, I got a normal error code in odbc_error() and
odbc_errormsg(). After that, I execute a correct SQL statement and the
error messages are still left in odbc_error() and odbc_errormsg().
There are also junk messages after some correct and successfull queries
in odbc_error() and odbc_errormsg().

This seems to be an OS independent bug in PHP.


Previous Comments:


[2003-08-01 06:09:31] [EMAIL PROTECTED]

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.





[2003-07-27 13:19:29] [EMAIL PROTECTED]

Actually I wanted to see the error id not the error message. So please
tell me what is the output of:
var_dump(odbc_error())



[2003-06-26 18:23:37] [EMAIL PROTECTED]

Do not add comments to your own report, use this link:
http://bugs.php.net/bug.php?id=24244&edit=2




[2003-06-26 04:07:16] mb at btn dot de

Output of var_dump(odbc_errormsg()) as follows:

string(146)
"31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:"

string(122)
"1:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:"

These are only two examples. I had to reproduce the error in a small
script to generate these. That's why the variety is not that great like
in our production environment where we currently use a dirty
workaround.



[2003-06-18 10:24:52] [EMAIL PROTECTED]

What does var_dump(odbc_error()) return after a valid query?



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
http://bugs.php.net/24244

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


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

2003-06-26 Thread mb at btn dot de
 ID:   24244
 Comment by:   mb at btn dot de
 Reported By:  bl at btn dot de
 Status:   Feedback
 Bug Type: ODBC related
 Operating System: Red Hat Linux
 PHP Version:  4.3.2
 New Comment:

Output of var_dump(odbc_errormsg()) as follows:

string(146)
"31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:"

string(122)
"1:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:"

These are only two examples. I had to reproduce the error in a small
script to generate these. That's why the variety is not that great like
in our production environment where we currently use a dirty
workaround.


Previous Comments:


[2003-06-18 10:24:52] [EMAIL PROTECTED]

What does var_dump(odbc_error()) return after a valid query?



[2003-06-18 06:54:21] bl at btn dot de

sorry ... one more thing ...

in my "Actual Results" section I forgot to remove the "or"'s ...

So of course the "or"'s are not part of the string which is returned by
odbc_errormsg() ...



[2003-06-18 06:50:30] bl at btn dot de

Description:

We use the IBMDB2 database on our systems. The following bug occured
while writing a class supposed to halt the code on database exceptions.


While checking for strlen(odbc_errormsg())==0 for aborting the routine
PHP sometimes (about once in four calls) returns Bad Strings (see
below).

Maybe the "message" is taken from an unallocated space on PHP's heap
?!?

It's not that much of a problem to come up with a workaround but PHP
shouldn't return random bits of the memory.



Reproduce code:
---
$link = odbc_connect("mydb", "myusr","mypwd");
$sql = "[INSERT FLAWLESS STATEMENT HERE]";
odbc_exec($link,$sql)
if(strlen(odbc_errormsg())>0) {
echo "SQL-Error " . odbc_errormsg();
}
odbc_close($link);



Expected result:

If $sql contains a valid statement odbc_errormsg() should return an
empty string (according to the PHP-Documentation)

Actual result:
--
Sometimes parts of the outstream, a URL, short binary data,
PHP-Variable names anything might happen ... as I mentioned above, the
data might be part of PHP's heap. Some Examples:

T_URI (?) or

(a variable name ?)

ze:12px; } .menue_common{ [... here it goes on for quite a while ...]
width: 140px; margin-bottom: 2p 

(part of our stylesheet) or

ÿÿ or

(junk)

Àò or

(more junk)

aten_I or

(I have that somewhere earlier but I can't remember)

-urlencoded

(this shouldn't be an errormsg)






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