1--TEST-- 2Bug #36403 (oci_execute no longer supports OCI_DESCRIBE_ONLY) 3--EXTENSIONS-- 4oci8 5--SKIPIF-- 6<?php 7require_once 'skipifconnectfailure.inc'; 8?> 9--FILE-- 10<?php 11 12require __DIR__.'/connect.inc'; 13 14// Initialization 15 16$stmtarray = array( 17 "drop table bug36403_tab", 18 "create table bug36403_tab (c1 number, col2 number, column3 number, col4 number)" 19); 20 21oci8_test_sql_execute($c, $stmtarray); 22 23// Run Test 24 25echo "Test 1\n"; 26 27$s = oci_parse($c, "select * from bug36403_tab"); 28oci_execute($s, OCI_DESCRIBE_ONLY); 29for ($i = oci_num_fields($s); $i > 0; $i--) { 30 echo oci_field_name($s, $i) . "\n"; 31} 32 33echo "Test 2\n"; 34 35// Should generate an error: ORA-24338: statement handle not executed 36// since the statement handle was only described and not executed 37$row = oci_fetch_array($s); 38 39// Clean up 40 41$stmtarray = array( 42 "drop table bug36403_tab" 43); 44 45oci8_test_sql_execute($c, $stmtarray); 46 47?> 48--EXPECTF-- 49Test 1 50COL4 51COLUMN3 52COL2 53C1 54Test 2 55 56Warning: oci_fetch_array(): ORA-%r(24338|01002)%r: %sbug36403.php on line %d 57