From: michaels at crye-leike dot com
Operating system: Linux
PHP version: 4.3.5
PHP Bug Type: Sybase-ct (ctlib) related
Bug description: sybase_query() triggers (spurious?) notices when query is a stored
procedure
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
--
Edit bug report at http://bugs.php.net/?id=27843&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27843&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27843&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27843&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27843&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27843&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27843&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27843&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27843&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27843&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27843&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27843&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27843&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27843&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27843&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27843&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27843&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27843&r=float