Bug #71558 [NEW]: Wrong error returned by errorInfo
From: zucchetto dot christopher at gmail dot com
Operating system: Linux CentOS 6.7
PHP version: 5.6.18
Package: PDO DBlib
Bug Type: Bug
Bug description:Wrong error returned by errorInfo
Description:
------------
I use PDO with dblib (Freetds / Sybase) : when I try to execute a
procedure that doesn't exists on the server (or something else that
return an error) with PDO, I have not the correct error returned by
errorInfo. However, with previous versions of PHP like 5.2.4 it's worked
correctly.
Test script:
---------------
$pdo = new PDO("dblib:host=MY_SERVER", "MY_LOGIN", "MY_PWD");
$st = $pdo->prepare("EXEC A_UNKNOW_PROCEDURE");
$good = $st->execute();
if (!$good) {
$error = $st->errorInfo();
var_dump($error);
}
Expected result:
----------------
The error returned by the Sybase server like : Stored procedure
'A_UNKNOW_PROCEDURE' not found. Specify owner.objectname or use sp_help
to check whether the object exists (sp_help may produce lots of output)
Actual result:
--------------
General SQL Server error: Check messages from the SQL Server [2812]
(severity 16)
--
Edit bug report at https://bugs.php.net/bug.php?id=71558&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71558&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71558&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71558&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71558&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71558&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71558&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71558&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71558&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71558&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71558&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71558&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71558&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71558&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71558&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71558&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71558&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71558&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71558&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71558&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71558&r=mysqlcfg
Thread (3 messages)
- zucchetto dot christopher at gmail dot com