#25123 [Fbk->Csd]: ocierror() returns always ORA-24315 illegal attribute type

2004-01-16 Thread karel dot miarka at issa dot cz
 ID:   25123
 User updated by:  karel dot miarka at issa dot cz
 Reported By:  karel dot miarka at issa dot cz
-Status:   Feedback
+Status:   Closed
 Bug Type: OCI8 related
 Operating System: Windows 2000
 PHP Version:  4CVS-2003-12-15
 New Comment:

Oracle Home Selector said:
"There is only one (1) Oracle home defined on this machine and,
therefore, this tool cannot change your primary Oracle home."


> You're using WinNT/2000 and multiple oracles, am I right?

Yes and no.
I'm using W2K and I have only one Oracle 8.1 server + client installed
localy.
But I usually use only the client for connections to a Linux server
with Oracle 8.0.5.0.0.

Now, I have tried to run the error-test script against the local Oracle
version, but the results is still the same ORA-00942 warning is
printed, but ORA-24315 is reported by ocierror().


Ok guys, lets close this "bug" it is probably only a local problem of
my computer configuration or the older Oracle versions.


Previous Comments:


[2004-01-15 10:22:02] [EMAIL PROTECTED]

It seems, that this is not PHP bug,
http://users.pandora.be/jbosman/jbsql/ - this page says, that "If you
get "ORA-24315: illegal attribute type" every time you get another
Oracle error, then  you don't have the Oracle 8i home as your primary
Oracle home. Use the Oracle Home Selector to change it".
I'm not able to check if this is true, 'cause there is no such old
Oracle around. Check it, plz.

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

[2004-01-13 03:44:38] karel dot miarka at issa dot cz

Still invalid. There's maybe problem between the Oracle 8.1 Windows
client and the Oracle 8.0 Linux server, because it works fine on
Linux.

4.3.5RC2-dev
PHP ocierror() bug
OCIDebug: _oci_open_server new conn=0 dname=xxx
OCIDebug: _oci_open_session new sess=3 user=yyy
OCIDebug: oci_do_connect: id=4
OCIDebug: oci_parse "SELECT xyz12345 FROM no_table123" id=5 conn=4

Warning: ociexecute(): OCIStmtExecute: ORA-00942: tabulka nebo pohled
neexistuje in c:\www\tests\ocierror.php on line 12
ocierror($stmt): Array ( [code] => 24315 [message] => ORA-24315:
neplatný typ atributu [offset] => 21 [sqltext] => ) 1
OCIDebug: START _oci_stmt_list_dtor: id=5 last_query="SELECT xyz12345
FROM no_table123"
OCIDebug: END _oci_stmt_list_dtor: id=5
OCIDebug: START php_rshutdown_oci
OCIDebug: END php_rshutdown_oci
OCIDebug: START _oci_conn_list_dtor: id=4
OCIDebug: nothing to do..
OCIDebug: END _oci_conn_list_dtor: id=4
OCIDebug: START _oci_close_session: logging-off sess=3
OCIDebug: START _oci_close_server: detaching conn=2 dbname=xxx



[2004-01-12 07:07:25] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



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

[2003-12-16 09:00:35] karel dot miarka at issa dot cz

Output of the "reproduce code" (see below) when ociinternaldebug(1)
called first:

OCIDebug: _oci_open_server new conn=0 dname=xyz
OCIDebug: _oci_open_session new sess=3 user=xyz123
OCIDebug: oci_do_connect: id=4
OCIDebug: oci_parse "SELECT xyz12345 FROM no_table123" id=5 conn=4

Warning: ociexecute(): OCIStmtExecute: ORA-00942: table or view doesn't
exist in c:\www\tests\ocierror.php on line 10
ocierror($stmt): Array ( [code] => 24315 [message] => ORA-24315:
illegal attribute type [offset] => 21 [sqltext] => ) 1
OCIDebug: START _oci_stmt_list_dtor: id=5 last_query="SELECT xyz12345
FROM no_table123"
OCIDebug: END _oci_stmt_list_dtor: id=5
OCIDebug: START php_rshutdown_oci
OCIDebug: END php_rshutdown_oci
OCIDebug: START _oci_conn_list_dtor: id=4
OCIDebug: nothing to do..
OCIDebug: END _oci_conn_list_dtor: id=4
OCIDebug: START _oci_close_session: logging-off sess=3
OCIDebug: START _oci_close_server: detaching conn=2 dbname=xyz



[2003-12-15 16:55:12] [EMAIL PROTECTED]

Try the ociinternaldebug(1); like suggested by cjbj at hotmail dot com





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/25123

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


#25123 [Fbk->Opn]: ocierror() returns always ORA-24315 illegal attribute type

2004-01-13 Thread karel dot miarka at issa dot cz
 ID:   25123
 User updated by:  karel dot miarka at issa dot cz
 Reported By:  karel dot miarka at issa dot cz
-Status:   Feedback
+Status:   Open
 Bug Type: OCI8 related
 Operating System: Windows 2000
 PHP Version:  4CVS-2003-12-15
 New Comment:

Still invalid. There's maybe problem between the Oracle 8.1 Windows
client and the Oracle 8.0 Linux server, because it works fine on
Linux.

4.3.5RC2-dev
PHP ocierror() bug
OCIDebug: _oci_open_server new conn=0 dname=xxx
OCIDebug: _oci_open_session new sess=3 user=yyy
OCIDebug: oci_do_connect: id=4
OCIDebug: oci_parse "SELECT xyz12345 FROM no_table123" id=5 conn=4

Warning: ociexecute(): OCIStmtExecute: ORA-00942: tabulka nebo pohled
neexistuje in c:\www\tests\ocierror.php on line 12
ocierror($stmt): Array ( [code] => 24315 [message] => ORA-24315:
neplatný typ atributu [offset] => 21 [sqltext] => ) 1
OCIDebug: START _oci_stmt_list_dtor: id=5 last_query="SELECT xyz12345
FROM no_table123"
OCIDebug: END _oci_stmt_list_dtor: id=5
OCIDebug: START php_rshutdown_oci
OCIDebug: END php_rshutdown_oci
OCIDebug: START _oci_conn_list_dtor: id=4
OCIDebug: nothing to do..
OCIDebug: END _oci_conn_list_dtor: id=4
OCIDebug: START _oci_close_session: logging-off sess=3
OCIDebug: START _oci_close_server: detaching conn=2 dbname=xxx


Previous Comments:


[2004-01-12 07:07:25] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



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

[2003-12-16 09:00:35] karel dot miarka at issa dot cz

Output of the "reproduce code" (see below) when ociinternaldebug(1)
called first:

OCIDebug: _oci_open_server new conn=0 dname=xyz
OCIDebug: _oci_open_session new sess=3 user=xyz123
OCIDebug: oci_do_connect: id=4
OCIDebug: oci_parse "SELECT xyz12345 FROM no_table123" id=5 conn=4

Warning: ociexecute(): OCIStmtExecute: ORA-00942: table or view doesn't
exist in c:\www\tests\ocierror.php on line 10
ocierror($stmt): Array ( [code] => 24315 [message] => ORA-24315:
illegal attribute type [offset] => 21 [sqltext] => ) 1
OCIDebug: START _oci_stmt_list_dtor: id=5 last_query="SELECT xyz12345
FROM no_table123"
OCIDebug: END _oci_stmt_list_dtor: id=5
OCIDebug: START php_rshutdown_oci
OCIDebug: END php_rshutdown_oci
OCIDebug: START _oci_conn_list_dtor: id=4
OCIDebug: nothing to do..
OCIDebug: END _oci_conn_list_dtor: id=4
OCIDebug: START _oci_close_session: logging-off sess=3
OCIDebug: START _oci_close_server: detaching conn=2 dbname=xyz



[2003-12-15 16:55:12] [EMAIL PROTECTED]

Try the ociinternaldebug(1); like suggested by cjbj at hotmail dot com



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

[2003-12-15 09:37:14] karel dot miarka at issa dot cz

Our Oracle server version is 8.0.5.0.0 , so maybe that's the problem,
but it was working fine with older versions of php.



[2003-09-22 03:47:14] cjbj at hotmail dot com

Does not reproduce for me with PHP 4.3.3 on W2K using Oracle 9.2.0.1.

Re SET AUTOTRACE, this is SQL*Plus specific and produces a simple
tuning report

I discovered PHP's OCI8 internal debug output can be enabled by calling
ociinternaldebug(1).  Maybe this will help
the filer?



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/25123

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


#25123 [Fbk->Opn]: ocierror() returns always ORA-24315 illegal attribute type

2003-12-16 Thread karel dot miarka at issa dot cz
 ID:   25123
 User updated by:  karel dot miarka at issa dot cz
 Reported By:  karel dot miarka at issa dot cz
-Status:   Feedback
+Status:   Open
 Bug Type: OCI8 related
 Operating System: Windows 2000
 PHP Version:  4CVS-2003-12-15
 New Comment:

Output of the "reproduce code" (see below) when ociinternaldebug(1)
called first:

OCIDebug: _oci_open_server new conn=0 dname=xyz
OCIDebug: _oci_open_session new sess=3 user=xyz123
OCIDebug: oci_do_connect: id=4
OCIDebug: oci_parse "SELECT xyz12345 FROM no_table123" id=5 conn=4

Warning: ociexecute(): OCIStmtExecute: ORA-00942: table or view doesn't
exist in c:\www\tests\ocierror.php on line 10
ocierror($stmt): Array ( [code] => 24315 [message] => ORA-24315:
illegal attribute type [offset] => 21 [sqltext] => ) 1
OCIDebug: START _oci_stmt_list_dtor: id=5 last_query="SELECT xyz12345
FROM no_table123"
OCIDebug: END _oci_stmt_list_dtor: id=5
OCIDebug: START php_rshutdown_oci
OCIDebug: END php_rshutdown_oci
OCIDebug: START _oci_conn_list_dtor: id=4
OCIDebug: nothing to do..
OCIDebug: END _oci_conn_list_dtor: id=4
OCIDebug: START _oci_close_session: logging-off sess=3
OCIDebug: START _oci_close_server: detaching conn=2 dbname=xyz


Previous Comments:


[2003-12-15 16:55:12] [EMAIL PROTECTED]

Try the ociinternaldebug(1); like suggested by cjbj at hotmail dot com



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

[2003-12-15 09:37:14] karel dot miarka at issa dot cz

Our Oracle server version is 8.0.5.0.0 , so maybe that's the problem,
but it was working fine with older versions of php.



[2003-09-22 03:47:14] cjbj at hotmail dot com

Does not reproduce for me with PHP 4.3.3 on W2K using Oracle 9.2.0.1.

Re SET AUTOTRACE, this is SQL*Plus specific and produces a simple
tuning report

I discovered PHP's OCI8 internal debug output can be enabled by calling
ociinternaldebug(1).  Maybe this will help
the filer?

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

[2003-08-29 09:13:59] karel dot miarka at issa dot cz

I use Apache/1.3.24 for Windows 95/NT, and Oracle8 Release 8.0.5.0.0 -
Production on Linux, but it behaves the same also under Oracle 8.1 for
Windows.

Autotrace seems to be SQL*plus feature only and in addition it seems to
be off by default.

The ocierror() behaves fine under PHP 4.2 on Windows. 
And there is no problem with ocierror() on Linux with PHP 4.3.3 .

I have reported this bug on "PHP 4.3.x" and someone else has changed
this my line to "4.3.3RC5-dev, 5.0.0b2-dev" so I guess this "unknown"
person is a PHP-OCI8 developer who reproduced this error with those PHP
version.



[2003-08-29 08:44:48] guenter_doge at web dot de

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.



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/25123

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


#25123 [Opn]: ocierror() returns always ORA-24315 illegal attribute type

2003-12-15 Thread karel dot miarka at issa dot cz
 ID:   25123
 User updated by:  karel dot miarka at issa dot cz
 Reported By:  karel dot miarka at issa dot cz
 Status:   Open
 Bug Type: OCI8 related
 Operating System: Windows 2000
-PHP Version:  4.x including 4.3.5-dev
+PHP Version:  4.3.x including 4.3.5-dev
 New Comment:

Our Oracle server version is 8.0.5.0.0 , so maybe that's the problem,
but it was working fine with older versions of php.


Previous Comments:


[2003-12-15 09:33:37] karel dot miarka at issa dot cz

Still invalid behaviour with PHP 4.3.5-dev on w2k. :-(



[2003-12-15 08:40:50] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2003-09-22 03:47:14] cjbj at hotmail dot com

Does not reproduce for me with PHP 4.3.3 on W2K using Oracle 9.2.0.1.

Re SET AUTOTRACE, this is SQL*Plus specific and produces a simple
tuning report

I discovered PHP's OCI8 internal debug output can be enabled by calling
ociinternaldebug(1).  Maybe this will help
the filer?



[2003-08-29 09:13:59] karel dot miarka at issa dot cz

I use Apache/1.3.24 for Windows 95/NT, and Oracle8 Release 8.0.5.0.0 -
Production on Linux, but it behaves the same also under Oracle 8.1 for
Windows.

Autotrace seems to be SQL*plus feature only and in addition it seems to
be off by default.

The ocierror() behaves fine under PHP 4.2 on Windows. 
And there is no problem with ocierror() on Linux with PHP 4.3.3 .

I have reported this bug on "PHP 4.3.x" and someone else has changed
this my line to "4.3.3RC5-dev, 5.0.0b2-dev" so I guess this "unknown"
person is a PHP-OCI8 developer who reproduced this error with those PHP
version.



[2003-08-29 08:44:48] guenter_doge at web dot de

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.



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/25123

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


#25123 [Fbk->Opn]: ocierror() returns always ORA-24315 illegal attribute type

2003-12-15 Thread karel dot miarka at issa dot cz
 ID:   25123
 User updated by:  karel dot miarka at issa dot cz
 Reported By:  karel dot miarka at issa dot cz
-Status:   Feedback
+Status:   Open
 Bug Type: OCI8 related
 Operating System: Windows 2000
-PHP Version:  4.3.3
+PHP Version:  4.x including 4.3.5-dev
 New Comment:

Still invalid behaviour with PHP 4.3.5-dev on w2k. :-(


Previous Comments:


[2003-12-15 08:40:50] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2003-09-22 03:47:14] cjbj at hotmail dot com

Does not reproduce for me with PHP 4.3.3 on W2K using Oracle 9.2.0.1.

Re SET AUTOTRACE, this is SQL*Plus specific and produces a simple
tuning report

I discovered PHP's OCI8 internal debug output can be enabled by calling
ociinternaldebug(1).  Maybe this will help
the filer?



[2003-08-29 09:13:59] karel dot miarka at issa dot cz

I use Apache/1.3.24 for Windows 95/NT, and Oracle8 Release 8.0.5.0.0 -
Production on Linux, but it behaves the same also under Oracle 8.1 for
Windows.

Autotrace seems to be SQL*plus feature only and in addition it seems to
be off by default.

The ocierror() behaves fine under PHP 4.2 on Windows. 
And there is no problem with ocierror() on Linux with PHP 4.3.3 .

I have reported this bug on "PHP 4.3.x" and someone else has changed
this my line to "4.3.3RC5-dev, 5.0.0b2-dev" so I guess this "unknown"
person is a PHP-OCI8 developer who reproduced this error with those PHP
version.



[2003-08-29 08:44:48] guenter_doge at web dot de

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.

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

[2003-08-18 00:58:09] 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 ocierror() bug';

  $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)), '';
  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





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


#25123 [Opn]: ocierror() returns always ORA-24315 illegal attribute type

2003-08-29 Thread karel dot miarka at issa dot cz
 ID:   25123
 User updated by:  karel dot miarka at issa dot cz
 Reported By:  karel dot miarka at issa dot cz
 Status:   Open
 Bug Type: OCI8 related
 Operating System: Windows 2000
 PHP Version:  4.3.3RC5-dev, 5.0.0b2-dev
 New Comment:

I use Apache/1.3.24 for Windows 95/NT, and Oracle8 Release 8.0.5.0.0 -
Production on Linux, but it behaves the same also under Oracle 8.1 for
Windows.

Autotrace seems to be SQL*plus feature only and in addition it seems to
be off by default.

The ocierror() behaves fine under PHP 4.2 on Windows. 
And there is no problem with ocierror() on Linux with PHP 4.3.3 .

I have reported this bug on "PHP 4.3.x" and someone else has changed
this my line to "4.3.3RC5-dev, 5.0.0b2-dev" so I guess this "unknown"
person is a PHP-OCI8 developer who reproduced this error with those PHP
version.


Previous Comments:


[2003-08-29 08:44:48] guenter_doge at web dot de

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.

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

[2003-08-18 00:58:09] 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 ocierror() bug';

  $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)), '';
  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





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


#25123 [Opn]: ocierror() returns always ORA-24315 illegal attribute type

2003-08-20 Thread karel dot miarka at issa dot cz
 ID:   25123
 User updated by:  karel dot miarka at issa dot cz
 Reported By:  karel dot miarka at issa dot cz
 Status:   Open
 Bug Type: OCI8 related
-Operating System: Windows NT
+Operating System: Windows 2000
-PHP Version:  4.3.3RC3
+PHP Version:  4.3.x
 New Comment:

I have experienced this problem under Win2000 (not tested under NT),
this problem occures in all PHP 4.3 versions.


Previous Comments:


[2003-08-18 00:58:09] 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 ocierror() bug';

  $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)), '';
  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





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



#25123 [NEW]: ocierror() returns always ORA-24315 illegal attribute type

2003-08-17 Thread karel dot miarka at issa dot cz
From: karel dot miarka at issa dot cz
Operating system: Windows NT
PHP version:  4.3.3RC3
PHP Bug Type: OCI8 related
Bug description:  ocierror() returns always ORA-24315 illegal attribute type

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 ocierror() bug';

  $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)), '';
  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

-- 
Edit bug report at http://bugs.php.net/?id=25123&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25123&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25123&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=25123&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=25123&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25123&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=25123&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=25123&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=25123&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=25123&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=25123&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=25123&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25123&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=25123&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=25123&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=25123&r=gnused