ID:               35945
 User updated by:  dbaffaleuf at ixis-cib dot com
 Reported By:      dbaffaleuf at ixis-cib dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         Sybase-ct (ctlib) related
 Operating System: Linux 2.6.9-22 RedHat AMD64
 PHP Version:      4.4.2RC2
 New Comment:

Hi, thx for your reply.

Though, it does not work either with the 5.1. CVS snapshot you
provided. I get exactly the same error message:

Warning: sybase_query(): Sybase:  Client message:  (): user api layer:
internal common library error: The bind of result set item 1 resulted
in truncation. (severity 116) in
/msmorzine/sgbd/contrib/src/php5.1-200601110930/MKTEST/bin/test_sybase_ct.php
on line 4
resource(4) of type (sybase-ct link)
bool(false)

Warning: sybase_fetch_row(): supplied argument is not a valid Sybase
result resource in
/msmorzine/sgbd/contrib/src/php5.1-200601110930/MKTEST/bin/test_sybase_ct.php
on line 8


Previous Comments:
------------------------------------------------------------------------

[2006-01-09 18:18:20] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip

There is no real 64bit support in PHP 4. It came with PHP 5..

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

[2006-01-09 16:17:45] dbaffaleuf at ixis-cib dot com

Description:
------------
Acutally I have the problem both in PHP 4.4.1 and 4.4.2RC3


Always returns a correct resource id for the handler, but FALSE for the
query (see the following code)

The Sybase OpenClient warning code suggest an overflow in the
CS_DATAFMT.maxlength C struct. When returning, the datalength is sized
whether the type is CS_NUMERIC, CS_MONEY, etc... in the
php_sybase_fetch_result_set() fonction (src: php_sybase_ct.c). 

Works fine in DB-LIB.

The configure :

./configure     \
       
--prefix=/msmorzine/sgbd/contrib/src/php4-STABLE-200601091335/MKTEST   
\
       
--with-sybase-ct=/msmorzine/sgbd/MX_MT_MSMORZINE/ASE1253/OCS-12_5/devlib
\
        --enable-static=sybase-ct \
       
--with-config-file-path=/msmorzine/sgbd/contrib/src/php4-STABLE-200601091335/MKTEST
\
        --with-apxs2=/msmorzine/sgbd/contrib/bin/apxs   \
        --with-gd=/msmorzine/sgbd/contrib/ \
        --enable-sysvmsg \
        --enable-sysvsem \
        --enable-sysvshm



Reproduce code:
---------------
The following code:

$STR    = "select name from syslogins";
$DBH    = @sybase_connect("MX_MT_MSMORZINE","sa", "mypassword");
$QUERY  = sybase_query($STR,$DBH);
var_dump($DBH);
var_dump($QUERY);

while($row = sybase_fetch_row($QUERY)) {
    while(list($k, $v) = each($row)) {
        echo "\$row[$k] => $v\n";
    }
}


Expected result:
----------------
int(4)
int(5)
$row[0] => probe
$row[0] => sa


Actual result:
--------------
"Warning: sybase_query(): Sybase:  Client message:  (): user api layer:
internal common library error: The bind of result set item 1 resulted in
truncation. (severity 116) in
/msmorzine/sgbd/contrib/src/php4-STABLE-200601091335/MKTEST/bin/test_sybase_ct.php
on line 5
resource(4) of type (sybase-ct link)
bool(false)".



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


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

Reply via email to