php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27843 sybase_query() triggers (spurious?) notices when query is a stored procedure
Submitted: 2004-04-02 12:20 UTC Modified: 2004-07-16 21:10 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: michaels at crye-leike dot com Assigned: thekid (profile)
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 4CVS, 5CVS (2004-04-13) OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: michaels at crye-leike dot com
New email:
PHP Version: OS:

 

 [2004-04-02 12:20 UTC] michaels at crye-leike dot com
Description:
------------
Using FreeTDS 0.62.1 compiled with:
./configure  --with-tdsver=4.2 --enable-msdblib --with-gnu-ld --enable-shared --enable-static

Using PHP 4.3.5 compiled with:
./configure  --with-mysql=/usr/local/mysql/ --enable-track-vars --enable-trans-sid --with-sybase-ct=/usr/local/ --with-pgsql=/usr/local/pgsql/ --enable-xslt --with-xslt-sablot --with-zlib --with-ldap --with-apxs=/usr/local/apache/bin/apxs

Using TDS version 7.0
Using Microsoft SQL Server 7.0

It seems that sybase_query() triggers an E_NOTICE ("Sybase: Unexpected results, cancelling current") whenever the query in question is a stored procedure.  This notice is not triggered when using either "--with-sybase" or "--with-mssql" (using dblib).  For those of us running with an error_reporting level of E_ALL, this causes a problem, as we'd either have to preface every call to sybase_query() with "@" and handle all Sybase errors manually, or lower the error_reporting level.



Reproduce code:
---------------
<?
$dbh = sybase_connect('db_host', 'user', 'pass');
sybase_select_db('db_name', $dbh);

sybase_query("
  create procedure test_bug 
  as 
  begin 
    select 1 
  end
", $dbh);

sybase_query("exec test_bug", $dbh);
sybase_query("drop procedure test_bug", $dbh);
?>

Expected result:
----------------
Expected empty output with no notices triggered.

Actual result:
--------------
Notice: sybase_query(): Sybase: Unexpected results, cancelling current in - on line 13

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-13 17:39 UTC] michaels at crye-leike dot com
Hi,

I tried the PHP snapshot (php4-STABLE-200404131830) and there is no change; the problem still occurs.  Thanks...
 [2004-07-11 18:40 UTC] thekid@php.net
I fixed this bug locally but still have quite an amount of other bugfixes / improvements lying around, which I don't want to separate from this. Maybe you'd like to test the complete patchset available at

  http://sitten-polizei.de/php/sybase_ct.diff (HEAD)
  http://sitten-polizei.de/php/sybase_ct4.diff (PHP_4 branch)

As soon as I've tested the other changes enough, I'll commit everything to CVS (should be in a couple of days)
 [2004-07-12 18:00 UTC] michaels at crye-leike dot com
Thanks...I will test with your patches applied ASAP.  Right now I'm in the middle of a deadline crunch so it may be a few days but I will get around to it and followup.  Thanks!
 [2004-07-16 21:10 UTC] michaels at crye-leike dot com
It's working great, thanks for everything!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC