ID:               30312
 User updated by:  dfleury2 at libertysurf dot fr
 Reported By:      dfleury2 at libertysurf dot fr
-Status:           No Feedback
+Status:           Open
 Bug Type:         Sybase-ct (ctlib) related
 Operating System: *
 PHP Version:      4CVS-2005-02-05
 Assigned To:      thekid
 New Comment:

The bugs are still here in the 5.1.3 release.


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

[2006-01-01 01:00:03] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

[2005-12-24 02:17:59] [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



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

[2005-02-07 22:01:53] dfleury2 at libertysurf dot fr

The patch seems to work for the first example but not this one.
<?php
    $db   = sybase_connect( 'LOCALHOST', 'sa', '' );
 
    $query= sybase_unbuffered_query( 'select getdate()' );
    $array= sybase_fetch_array( $query );
    var_dump( $array );
    sybase_free_result( $query );
 
    $query  = sybase_unbuffered_query( 'select getdate(), getdate()'
);
    $array  = sybase_fetch_array( $query );
    var_dump( $array );
 
    sybase_free_result( $query );
?>
 
OUTPUT
------------
array(2) {
  [0]=>
  string(19) "Feb  7 2005  2:18PM"
  ["computed"]=>
  string(19) "Feb  7 2005  2:18PM"
}
array(4) {
  [0]=>
  string(19) "Feb  7 2005  2:18PM"
  ["8"]=>
  string(19) "Feb  7 2005  2:18PM"
  [1]=>
  string(19) "Feb  7 2005  2:18PM"
  ["Ø"]=>
  string(19) "Feb  7 2005  2:18PM"
}
Bus error
 
with the patch a sample like this didn't work.
(I not sure if it's a legitimate code)
 
<?php
    $db     = sybase_connect( 'LOCAHOST', 'sa', '' );
 
    $i = 0;
    while( 1 )
    {
        $query = sybase_unbuffered_query( 'select * from big_table' );
        $array = sybase_fetch_array( $query );
        echo $i++." \n";
    }
?>
 

but I got :
Warning: sybase_fetch_array(): supplied argument is not a valid Sybase
result resource in /tmp_mnt/users/fxa/fle
ury/divers/php/test2.php on line 8
 
(work fine in 4.3.8 but with memory leaks).

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

[2005-02-06 15:35:40] [EMAIL PROTECTED]

Sorry, I cannot reproduce this, neither with apache / mod_php4 nor with
cli-php. Maybe this is because I'm using FreeTDS (and not the ct-libs?)

I added a test case to the PHP test system
(http://cvs.php.net/co.php/php-src/ext/sybase_ct/tests/bug30312.phpt)

which worked fine for me.

I can see a possible double-free in the sourcecode. Maybe could you try
the following patch:

http://sitten-polizei.de/bug30312.patch

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

[2005-02-03 21:11:37] dfleury2 at libertysurf dot fr

The problem still here. (php_sybase_ct.c didn't move)

A free avoid the core, but the array is corrupted for the second
fetch.

<?php
    $db     = sybase_connect( 'LOCALHOST', 'sa', '' );
 
    $query  = sybase_unbuffered_query( 'select getdate()' );
    $array  = sybase_fetch_array( $query );
    var_dump( $array );
    sybase_free_result( $query );
 
    $query  = sybase_unbuffered_query( 'select getdate(), getdate()'
);
    while( $array  = sybase_fetch_array( $query ) )
        var_dump( $array );
//    sybase_free_result( $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/30312

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

Reply via email to