|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-08-18 00:58 UTC] karel dot miarka at issa dot cz
Description:
------------
ocierror() function:
1) returns ORA-24315 illegal attribute type
after any error. For example ociexcute() prints the valid error in notice, but calling ocierror returns always ORA-24315 illegal attribute type:
Warning: OCIStmtExecute: ORA-00942: table or view does not exist in c:\www\ocierror_bug.php on line 20
ocierror($stmt): Array ( [code] => 24315 [message] => ORA-24315: illegal attribute type [offset] => 17 [sqltext] => ) 1
2) doesn't return the sqltext item in the error array
The bug is in all PHP 4.3.x Windows versions.
3) invalid error offset returned
Reproduce code:
---------------
<?php
echo '<h1>PHP ocierror() bug</h1>';
$conn = ocilogon('user', 'passwd', 'host');
// execute error BEGIN
$stmt = ociparse($conn, "SELECT xyz12345 FROM no_table123");
ociexecute($stmt);
echo 'ocierror($stmt): ', print_r(ocierror($stmt)), '<br />';
ocifreestatement($stmt);
// execute error END
ocilogoff($conn);
?>
Expected result:
----------------
Warning: OCIStmtExecute: ORA-00942: table or view does not exist in c:\www\ocierror_bug.php on line 20
ocierror($stmt): Array ( [code] => 942 [message] => ORA-00942: table or view does not exist [offset] => 22 [sqltext] => SELECT xyz12345 FROM no_table123) 1
Actual result:
--------------
Warning: OCIStmtExecute: ORA-00942: table or view does not exist in c:\www\ocierror_bug.php on line 20
ocierror($stmt): Array ( [code] => 24315 [message] => ORA-24315: illegal attribute type [offset] => 17 [sqltext] => ) 1
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 18:00:01 2025 UTC |
Could not reproduce this with PHP 4.3.3 & IIS 5.0 & win 2k & Oracle 8.1.7 One guess: Disable tracing in Oracle ("Set Autotrace Off") and try again.