diff options
author | Christopher Jones <sixd@php.net> | 2008-07-16 22:16:03 +0000 |
---|---|---|
committer | Christopher Jones <sixd@php.net> | 2008-07-16 22:16:03 +0000 |
commit | 1c1c98c6205808402aeae66ee58a4b63210a1201 (patch) | |
tree | f4dd4807e4f471ec5ed0a8b1765aade904c42231 /ext/oci8 | |
parent | 47c918cd6f522ee10fbe7701d025a788e740a8a5 (diff) | |
download | php-git-1c1c98c6205808402aeae66ee58a4b63210a1201.tar.gz |
MFH
1. Merged ARG_INFO patch (Felipe)
2. Allow empty username & password so Oracle can do non-password based
authentication, i.e. "External Authentication".
http://news.php.net/php.internals/37545
[DOC]
A new OCI_CRED_EXT flag can be passed as the "session_mode" parameter
to oci_connect(), oci_new_connect() and oci_pconnect().
$c1 = oci_connect("/", "", $db, null, OCI_CRED_EXT);
This tells Oracle to do external or OS authentication, if configured
in the database.
OCI_CRED_EXT can only be used with username of "/" and a empty
password. Oci8.privileged_connection may be On or Off. OCI_CRED_EXT
is not supported on Windows for security reasons.
The new flag may be combined with the existing OCI_SYSOPER or
OCI_SYSDBA modes (note: oci8.privileged_connection needs to be On for
OCI_SYSDBA and OCI_SYSOPER), e.g.:
$c1 = oci_connect("/", "", $db, null, OCI_CRED_EXT+OCI_SYSOPER);
Diffstat (limited to 'ext/oci8')
-rw-r--r-- | ext/oci8/oci8.c | 732 | ||||
-rw-r--r-- | ext/oci8/php_oci8_int.h | 28 | ||||
-rw-r--r-- | ext/oci8/tests/extauth_01.phpt | 196 | ||||
-rw-r--r-- | ext/oci8/tests/extauth_02.phpt | 196 | ||||
-rw-r--r-- | ext/oci8/tests/extauth_03.phpt | 196 | ||||
-rw-r--r-- | ext/oci8/tests/extauth_04.phpt | 56 | ||||
-rw-r--r-- | ext/oci8/tests/reflection1.phpt | 1052 |
7 files changed, 2285 insertions, 171 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 7d21b34de3..935e62425e 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -112,20 +112,416 @@ ZEND_GET_MODULE(oci8) #endif /* COMPILE_DL */ /* }}} */ -#ifdef ZEND_ENGINE_2 -ZEND_BEGIN_ARG_INFO(oci_second_arg_force_ref, 0) - ZEND_ARG_PASS_INFO(0) - ZEND_ARG_PASS_INFO(1) +/* {{{ arginfo */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_define_by_name, 0, 0, 3) + ZEND_ARG_INFO(0, statement_resource) + ZEND_ARG_INFO(0, column_name) + ZEND_ARG_INFO(1, variable) + ZEND_ARG_INFO(0, type) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(oci_third_arg_force_ref, 0) - ZEND_ARG_PASS_INFO(0) - ZEND_ARG_PASS_INFO(0) - ZEND_ARG_PASS_INFO(1) + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_bind_by_name, 0, 0, 3) + ZEND_ARG_INFO(0, statement_resource) + ZEND_ARG_INFO(0, column_name) + ZEND_ARG_INFO(1, variable) + ZEND_ARG_INFO(0, maximum_length) + ZEND_ARG_INFO(0, type) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_bind_array_by_name, 0, 0, 4) + ZEND_ARG_INFO(0, statement_resource) + ZEND_ARG_INFO(0, column_name) + ZEND_ARG_INFO(1, variable) + ZEND_ARG_INFO(0, maximum_array_length) + ZEND_ARG_INFO(0, maximum_item_length) + ZEND_ARG_INFO(0, type) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_free_descriptor, 0, 0, 1) + ZEND_ARG_INFO(0, lob_descriptor) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_save, 0, 0, 2) + ZEND_ARG_INFO(0, lob_descriptor) + ZEND_ARG_INFO(0, data) + ZEND_ARG_INFO(0, offset) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_import, 0, 0, 2) + ZEND_ARG_INFO(0, lob_descriptor) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_load, 0, 0, 1) + ZEND_ARG_INFO(0, lob_descriptor) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_read, 0, 0, 2) + ZEND_ARG_INFO(0, lob_descriptor) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_eof, 0, 0, 1) + ZEND_ARG_INFO(0, lob_descriptor) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_tell, 0, 0, 1) + ZEND_ARG_INFO(0, lob_descriptor) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_rewind, 0, 0, 1) + ZEND_ARG_INFO(0, lob_descriptor) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_seek, 0, 0, 2) + ZEND_ARG_INFO(0, lob_descriptor) + ZEND_ARG_INFO(0, offset) + ZEND_ARG_INFO(0, whence) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_size, 0, 0, 1) + ZEND_ARG_INFO(0, lob_descriptor) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_write, 0, 0, 2) + ZEND_ARG_INFO(0, lob_descriptor) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_append, 0, 0, 2) + ZEND_ARG_INFO(0, lob_descriptor_to) + ZEND_ARG_INFO(0, lob_descriptor_from) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_truncate, 0, 0, 1) + ZEND_ARG_INFO(0, lob_descriptor) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_erase, 0, 0, 1) + ZEND_ARG_INFO(0, lob_descriptor) + ZEND_ARG_INFO(0, offset) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_flush, 0, 0, 1) + ZEND_ARG_INFO(0, lob_descriptor) + ZEND_ARG_INFO(0, flag) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_ocisetbufferinglob, 0, 0, 2) + ZEND_ARG_INFO(0, lob_descriptor) + ZEND_ARG_INFO(0, flag) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_ocigetbufferinglob, 0, 0, 1) + ZEND_ARG_INFO(0, lob_descriptor) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_copy, 0, 0, 2) + ZEND_ARG_INFO(0, lob_descriptor_to) + ZEND_ARG_INFO(0, lob_descriptor_from) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_is_equal, 0, 0, 2) + ZEND_ARG_INFO(0, lob_descriptor) + ZEND_ARG_INFO(0, lob_descriptor) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_export, 0, 0, 2) + ZEND_ARG_INFO(0, lob_descriptor) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, start) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_new_descriptor, 0, 0, 1) + ZEND_ARG_INFO(0, connection_resource) + ZEND_ARG_INFO(0, type) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_rollback, 0, 0, 1) + ZEND_ARG_INFO(0, connection_resource) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_commit, 0, 0, 1) + ZEND_ARG_INFO(0, connection_resource) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_field_name, 0, 0, 2) + ZEND_ARG_INFO(0, statement_resource) + ZEND_ARG_INFO(0, column_number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_field_size, 0, 0, 2) + ZEND_ARG_INFO(0, statement_resource) + ZEND_ARG_INFO(0, column_number_or_name) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_field_scale, 0, 0, 2) + ZEND_ARG_INFO(0, statement_resource) + ZEND_ARG_INFO(0, column_number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_field_precision, 0, 0, 2) + ZEND_ARG_INFO(0, statement_resource) + ZEND_ARG_INFO(0, column_number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_field_type, 0, 0, 2) + ZEND_ARG_INFO(0, statement_resource) + ZEND_ARG_INFO(0, column_number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_field_type_raw, 0, 0, 2) + ZEND_ARG_INFO(0, statement_resource) + ZEND_ARG_INFO(0, column_number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_field_is_null, 0, 0, 2) + ZEND_ARG_INFO(0, statement_resource) + ZEND_ARG_INFO(0, column_number_or_name) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_internal_debug, 0, 0, 1) + ZEND_ARG_INFO(0, mode) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_execute, 0, 0, 1) + ZEND_ARG_INFO(0, statement_resource) + ZEND_ARG_INFO(0, mode) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_cancel, 0, 0, 1) + ZEND_ARG_INFO(0, statement_resource) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_fetch, 0, 0, 1) + ZEND_ARG_INFO(0, statement_resource) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_ocifetchinto, 0, 0, 2) + ZEND_ARG_INFO(0, statement_resource) + ZEND_ARG_INFO(1, result) + ZEND_ARG_INFO(0, mode) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_fetch_all, 0, 0, 2) + ZEND_ARG_INFO(0, statement_resource) + ZEND_ARG_INFO(1, output) + ZEND_ARG_INFO(0, skip) + ZEND_ARG_INFO(0, maximum_rows) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_fetch_object, 0, 0, 1) + ZEND_ARG_INFO(0, statement_resource) ZEND_END_ARG_INFO() -#else -static unsigned char oci_second_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE }; -static unsigned char oci_third_arg_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; -#endif + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_fetch_row, 0, 0, 1) + ZEND_ARG_INFO(0, statement_resource) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_fetch_assoc, 0, 0, 1) + ZEND_ARG_INFO(0, statement_resource) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_fetch_array, 0, 0, 1) + ZEND_ARG_INFO(0, statement_resource) + ZEND_ARG_INFO(0, mode) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_free_statement, 0, 0, 1) + ZEND_ARG_INFO(0, statement_resource) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_close, 0, 0, 1) + ZEND_ARG_INFO(0, connection_resource) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_new_connect, 0, 0, 2) + ZEND_ARG_INFO(0, username) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, connection_string) + ZEND_ARG_INFO(0, character_set) + ZEND_ARG_INFO(0, session_mode) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_connect, 0, 0, 2) + ZEND_ARG_INFO(0, username) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, connection_string) + ZEND_ARG_INFO(0, character_set) + ZEND_ARG_INFO(0, session_mode) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_pconnect, 0, 0, 2) + ZEND_ARG_INFO(0, username) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, connection_string) + ZEND_ARG_INFO(0, character_set) + ZEND_ARG_INFO(0, session_mode) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_error, 0, 0, 0) + ZEND_ARG_INFO(0, connection_or_statement_resource) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_num_fields, 0, 0, 1) + ZEND_ARG_INFO(0, statement_resource) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_parse, 0, 0, 2) + ZEND_ARG_INFO(0, connection_resource) + ZEND_ARG_INFO(0, sql_text) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_set_prefetch, 0, 0, 2) + ZEND_ARG_INFO(0, statement_resource) + ZEND_ARG_INFO(0, number_of_rows) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_password_change, 0, 0, 4) + ZEND_ARG_INFO(0, connection_resource_or_connection_string) + ZEND_ARG_INFO(0, username) + ZEND_ARG_INFO(0, old_password) + ZEND_ARG_INFO(0, new_password) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_new_cursor, 0, 0, 1) + ZEND_ARG_INFO(0, connection_resource) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_result, 0, 0, 2) + ZEND_ARG_INFO(0, statement_resource) + ZEND_ARG_INFO(0, column_number_or_name) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_server_version, 0, 0, 1) + ZEND_ARG_INFO(0, connection_resource) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_statement_type, 0, 0, 1) + ZEND_ARG_INFO(0, statement_resource) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_num_rows, 0, 0, 1) + ZEND_ARG_INFO(0, statement_resource) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_free_collection, 0, 0, 1) + ZEND_ARG_INFO(0, collection) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_append, 0, 0, ) + ZEND_ARG_INFO(0, collection) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_element_get, 0, 0, 2) + ZEND_ARG_INFO(0, collection) + ZEND_ARG_INFO(0, index) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_assign, 0, 0, 2) + ZEND_ARG_INFO(0, collection_to) + ZEND_ARG_INFO(0, collection_from) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_element_assign, 0, 0, 3) + ZEND_ARG_INFO(0, collection) + ZEND_ARG_INFO(0, index) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_size, 0, 0, 1) + ZEND_ARG_INFO(0, collection) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_max, 0, 0, 1) + ZEND_ARG_INFO(0, collection) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_trim, 0, 0, 2) + ZEND_ARG_INFO(0, collection) + ZEND_ARG_INFO(0, num) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_new_collection, 0, 0, 2) + ZEND_ARG_INFO(0, connection_resource) + ZEND_ARG_INFO(0, type_name) + ZEND_ARG_INFO(0, schema_name) +ZEND_END_ARG_INFO() +/* }}} */ /* {{{ extension function prototypes */ @@ -209,121 +605,121 @@ static const #endif zend_function_entry php_oci_functions[] = { - PHP_FE(oci_define_by_name, oci_third_arg_force_ref) - PHP_FE(oci_bind_by_name, oci_third_arg_force_ref) - PHP_FE(oci_bind_array_by_name, oci_third_arg_force_ref) - PHP_FE(oci_field_is_null, NULL) - PHP_FE(oci_field_name, NULL) - PHP_FE(oci_field_size, NULL) - PHP_FE(oci_field_scale, NULL) - PHP_FE(oci_field_precision, NULL) - PHP_FE(oci_field_type, NULL) - PHP_FE(oci_field_type_raw, NULL) - PHP_FE(oci_execute, NULL) - PHP_FE(oci_cancel, NULL) - PHP_FE(oci_fetch, NULL) - PHP_FE(oci_fetch_object, NULL) - PHP_FE(oci_fetch_row, NULL) - PHP_FE(oci_fetch_assoc, NULL) - PHP_FE(oci_fetch_array, NULL) - PHP_FE(ocifetchinto, oci_second_arg_force_ref) - PHP_FE(oci_fetch_all, oci_second_arg_force_ref) - PHP_FE(oci_free_statement, NULL) - PHP_FE(oci_internal_debug, NULL) - PHP_FE(oci_num_fields, NULL) - PHP_FE(oci_parse, NULL) - PHP_FE(oci_new_cursor, NULL) - PHP_FE(oci_result, NULL) - PHP_FE(oci_server_version, NULL) - PHP_FE(oci_statement_type, NULL) - PHP_FE(oci_num_rows, NULL) - PHP_FE(oci_close, NULL) - PHP_FE(oci_connect, NULL) - PHP_FE(oci_new_connect, NULL) - PHP_FE(oci_pconnect, NULL) - PHP_FE(oci_error, NULL) - PHP_FE(oci_free_descriptor, NULL) - PHP_FE(oci_lob_save, NULL) - PHP_FE(oci_lob_import, NULL) - PHP_FE(oci_lob_size, NULL) - PHP_FE(oci_lob_load, NULL) - PHP_FE(oci_lob_read, NULL) - PHP_FE(oci_lob_eof, NULL) - PHP_FE(oci_lob_tell, NULL) - PHP_FE(oci_lob_truncate, NULL) - PHP_FE(oci_lob_erase, NULL) - PHP_FE(oci_lob_flush, NULL) - PHP_FE(ocisetbufferinglob, NULL) - PHP_FE(ocigetbufferinglob, NULL) - PHP_FE(oci_lob_is_equal, NULL) - PHP_FE(oci_lob_rewind, NULL) - PHP_FE(oci_lob_write, NULL) - PHP_FE(oci_lob_append, NULL) - PHP_FE(oci_lob_copy, NULL) - PHP_FE(oci_lob_export, NULL) - PHP_FE(oci_lob_seek, NULL) - PHP_FE(oci_commit, NULL) - PHP_FE(oci_rollback, NULL) - PHP_FE(oci_new_descriptor, NULL) - PHP_FE(oci_set_prefetch, NULL) - PHP_FE(oci_password_change, NULL) - PHP_FE(oci_free_collection, NULL) - PHP_FE(oci_collection_append, NULL) - PHP_FE(oci_collection_element_get, NULL) - PHP_FE(oci_collection_element_assign, NULL) - PHP_FE(oci_collection_assign, NULL) - PHP_FE(oci_collection_size, NULL) - PHP_FE(oci_collection_max, NULL) - PHP_FE(oci_collection_trim, NULL) - PHP_FE(oci_new_collection, NULL) - - PHP_FALIAS(oci_free_cursor, oci_free_statement, NULL) - PHP_FALIAS(ocifreecursor, oci_free_statement, NULL) - PHP_FALIAS(ocibindbyname, oci_bind_by_name, oci_third_arg_force_ref) - PHP_FALIAS(ocidefinebyname, oci_define_by_name, oci_third_arg_force_ref) - PHP_FALIAS(ocicolumnisnull, oci_field_is_null, NULL) - PHP_FALIAS(ocicolumnname, oci_field_name, NULL) - PHP_FALIAS(ocicolumnsize, oci_field_size, NULL) - PHP_FALIAS(ocicolumnscale, oci_field_scale, NULL) - PHP_FALIAS(ocicolumnprecision, oci_field_precision, NULL) - PHP_FALIAS(ocicolumntype, oci_field_type, NULL) - PHP_FALIAS(ocicolumntyperaw, oci_field_type_raw, NULL) - PHP_FALIAS(ociexecute, oci_execute, NULL) - PHP_FALIAS(ocicancel, oci_cancel, NULL) - PHP_FALIAS(ocifetch, oci_fetch, NULL) - PHP_FALIAS(ocifetchstatement, oci_fetch_all, oci_second_arg_force_ref) - PHP_FALIAS(ocifreestatement, oci_free_statement, NULL) - PHP_FALIAS(ociinternaldebug, oci_internal_debug, NULL) - PHP_FALIAS(ocinumcols, oci_num_fields, NULL) - PHP_FALIAS(ociparse, oci_parse, NULL) - PHP_FALIAS(ocinewcursor, oci_new_cursor, NULL) - PHP_FALIAS(ociresult, oci_result, NULL) - PHP_FALIAS(ociserverversion, oci_server_version, NULL) - PHP_FALIAS(ocistatementtype, oci_statement_type, NULL) - PHP_FALIAS(ocirowcount, oci_num_rows, NULL) - PHP_FALIAS(ocilogoff, oci_close, NULL) - PHP_FALIAS(ocilogon, oci_connect, NULL) - PHP_FALIAS(ocinlogon, oci_new_connect, NULL) - PHP_FALIAS(ociplogon, oci_pconnect, NULL) - PHP_FALIAS(ocierror, oci_error, NULL) - PHP_FALIAS(ocifreedesc, oci_free_descriptor, NULL) - PHP_FALIAS(ocisavelob, oci_lob_save, NULL) - PHP_FALIAS(ocisavelobfile, oci_lob_import, NULL) - PHP_FALIAS(ociwritelobtofile, oci_lob_export, NULL) - PHP_FALIAS(ociloadlob, oci_lob_load, NULL) - PHP_FALIAS(ocicommit, oci_commit, NULL) - PHP_FALIAS(ocirollback, oci_rollback, NULL) - PHP_FALIAS(ocinewdescriptor, oci_new_descriptor, NULL) - PHP_FALIAS(ocisetprefetch, oci_set_prefetch, NULL) - PHP_FALIAS(ocipasswordchange, oci_password_change, NULL) - PHP_FALIAS(ocifreecollection, oci_free_collection, NULL) - PHP_FALIAS(ocinewcollection, oci_new_collection, NULL) - PHP_FALIAS(ocicollappend, oci_collection_append, NULL) - PHP_FALIAS(ocicollgetelem, oci_collection_element_get, NULL) - PHP_FALIAS(ocicollassignelem, oci_collection_element_assign, NULL) - PHP_FALIAS(ocicollsize, oci_collection_size, NULL) - PHP_FALIAS(ocicollmax, oci_collection_max, NULL) - PHP_FALIAS(ocicolltrim, oci_collection_trim, NULL) + PHP_FE(oci_define_by_name, arginfo_oci_define_by_name) + PHP_FE(oci_bind_by_name, arginfo_oci_bind_by_name) + PHP_FE(oci_bind_array_by_name, arginfo_oci_bind_array_by_name) + PHP_FE(oci_field_is_null, arginfo_oci_field_is_null) + PHP_FE(oci_field_name, arginfo_oci_field_name) + PHP_FE(oci_field_size, arginfo_oci_field_size) + PHP_FE(oci_field_scale, arginfo_oci_field_scale) + PHP_FE(oci_field_precision, arginfo_oci_field_precision) + PHP_FE(oci_field_type, arginfo_oci_field_type) + PHP_FE(oci_field_type_raw, arginfo_oci_field_type_raw) + PHP_FE(oci_execute, arginfo_oci_execute) + PHP_FE(oci_cancel, arginfo_oci_cancel) + PHP_FE(oci_fetch, arginfo_oci_fetch) + PHP_FE(oci_fetch_object, arginfo_oci_fetch_object) + PHP_FE(oci_fetch_row, arginfo_oci_fetch_row) + PHP_FE(oci_fetch_assoc, arginfo_oci_fetch_assoc) + PHP_FE(oci_fetch_array, arginfo_oci_fetch_array) + PHP_FE(ocifetchinto, arginfo_ocifetchinto) + PHP_FE(oci_fetch_all, arginfo_oci_fetch_all) + PHP_FE(oci_free_statement, arginfo_oci_free_statement) + PHP_FE(oci_internal_debug, arginfo_oci_internal_debug) + PHP_FE(oci_num_fields, arginfo_oci_num_fields) + PHP_FE(oci_parse, arginfo_oci_parse) + PHP_FE(oci_new_cursor, arginfo_oci_new_cursor) + PHP_FE(oci_result, arginfo_oci_result) + PHP_FE(oci_server_version, arginfo_oci_server_version) + PHP_FE(oci_statement_type, arginfo_oci_statement_type) + PHP_FE(oci_num_rows, arginfo_oci_num_rows) + PHP_FE(oci_close, arginfo_oci_close) + PHP_FE(oci_connect, arginfo_oci_connect) + PHP_FE(oci_new_connect, arginfo_oci_new_connect) + PHP_FE(oci_pconnect, arginfo_oci_pconnect) + PHP_FE(oci_error, arginfo_oci_error) + PHP_FE(oci_free_descriptor, arginfo_oci_free_descriptor) + PHP_FE(oci_lob_save, arginfo_oci_lob_save) + PHP_FE(oci_lob_import, arginfo_oci_lob_import) + PHP_FE(oci_lob_size, arginfo_oci_lob_size) + PHP_FE(oci_lob_load, arginfo_oci_lob_load) + PHP_FE(oci_lob_read, arginfo_oci_lob_read) + PHP_FE(oci_lob_eof, arginfo_oci_lob_eof) + PHP_FE(oci_lob_tell, arginfo_oci_lob_tell) + PHP_FE(oci_lob_truncate, arginfo_oci_lob_truncate) + PHP_FE(oci_lob_erase, arginfo_oci_lob_erase) + PHP_FE(oci_lob_flush, arginfo_oci_lob_flush) + PHP_FE(ocisetbufferinglob, arginfo_ocisetbufferinglob) + PHP_FE(ocigetbufferinglob, arginfo_ocigetbufferinglob) + PHP_FE(oci_lob_is_equal, arginfo_oci_lob_is_equal) + PHP_FE(oci_lob_rewind, arginfo_oci_lob_rewind) + PHP_FE(oci_lob_write, arginfo_oci_lob_write) + PHP_FE(oci_lob_append, arginfo_oci_lob_append) + PHP_FE(oci_lob_copy, arginfo_oci_lob_copy) + PHP_FE(oci_lob_export, arginfo_oci_lob_export) + PHP_FE(oci_lob_seek, arginfo_oci_lob_seek) + PHP_FE(oci_commit, arginfo_oci_commit) + PHP_FE(oci_rollback, arginfo_oci_rollback) + PHP_FE(oci_new_descriptor, arginfo_oci_new_descriptor) + PHP_FE(oci_set_prefetch, arginfo_oci_set_prefetch) + PHP_FE(oci_password_change, arginfo_oci_password_change) + PHP_FE(oci_free_collection, arginfo_oci_free_collection) + PHP_FE(oci_collection_append, arginfo_oci_collection_append) + PHP_FE(oci_collection_element_get, arginfo_oci_collection_element_get) + PHP_FE(oci_collection_element_assign, arginfo_oci_collection_element_assign) + PHP_FE(oci_collection_assign, arginfo_oci_collection_assign) + PHP_FE(oci_collection_size, arginfo_oci_collection_size) + PHP_FE(oci_collection_max, arginfo_oci_collection_max) + PHP_FE(oci_collection_trim, arginfo_oci_collection_trim) + PHP_FE(oci_new_collection, arginfo_oci_new_collection) + + PHP_FALIAS(oci_free_cursor, oci_free_statement, arginfo_oci_free_statement) + PHP_FALIAS(ocifreecursor, oci_free_statement, arginfo_oci_free_statement) + PHP_FALIAS(ocibindbyname, oci_bind_by_name, arginfo_oci_bind_by_name) + PHP_FALIAS(ocidefinebyname, oci_define_by_name, arginfo_oci_define_by_name) + PHP_FALIAS(ocicolumnisnull, oci_field_is_null, arginfo_oci_field_is_null) + PHP_FALIAS(ocicolumnname, oci_field_name, arginfo_oci_field_name) + PHP_FALIAS(ocicolumnsize, oci_field_size, arginfo_oci_field_size) + PHP_FALIAS(ocicolumnscale, oci_field_scale, arginfo_oci_field_scale) + PHP_FALIAS(ocicolumnprecision, oci_field_precision, arginfo_oci_field_precision) + PHP_FALIAS(ocicolumntype, oci_field_type, arginfo_oci_field_type) + PHP_FALIAS(ocicolumntyperaw, oci_field_type_raw, arginfo_oci_field_type_raw) + PHP_FALIAS(ociexecute, oci_execute, arginfo_oci_execute) + PHP_FALIAS(ocicancel, oci_cancel, arginfo_oci_cancel) + PHP_FALIAS(ocifetch, oci_fetch, arginfo_oci_fetch) + PHP_FALIAS(ocifetchstatement, oci_fetch_all, arginfo_oci_fetch_all) + PHP_FALIAS(ocifreestatement, oci_free_statement, arginfo_oci_free_statement) + PHP_FALIAS(ociinternaldebug, oci_internal_debug, arginfo_oci_internal_debug) + PHP_FALIAS(ocinumcols, oci_num_fields, arginfo_oci_num_fields) + PHP_FALIAS(ociparse, oci_parse, arginfo_oci_parse) + PHP_FALIAS(ocinewcursor, oci_new_cursor, arginfo_oci_new_cursor) + PHP_FALIAS(ociresult, oci_result, arginfo_oci_result) + PHP_FALIAS(ociserverversion, oci_server_version, arginfo_oci_server_version) + PHP_FALIAS(ocistatementtype, oci_statement_type, arginfo_oci_statement_type) + PHP_FALIAS(ocirowcount, oci_num_rows, arginfo_oci_num_rows) + PHP_FALIAS(ocilogoff, oci_close, arginfo_oci_close) + PHP_FALIAS(ocilogon, oci_connect, arginfo_oci_connect) + PHP_FALIAS(ocinlogon, oci_new_connect, arginfo_oci_new_connect) + PHP_FALIAS(ociplogon, oci_pconnect, arginfo_oci_pconnect) + PHP_FALIAS(ocierror, oci_error, arginfo_oci_error) + PHP_FALIAS(ocifreedesc, oci_free_descriptor, arginfo_oci_free_descriptor) + PHP_FALIAS(ocisavelob, oci_lob_save, arginfo_oci_lob_save) + PHP_FALIAS(ocisavelobfile, oci_lob_import, arginfo_oci_lob_import) + PHP_FALIAS(ociwritelobtofile, oci_lob_export, arginfo_oci_lob_export) + PHP_FALIAS(ociloadlob, oci_lob_load, arginfo_oci_lob_load) + PHP_FALIAS(ocicommit, oci_commit, arginfo_oci_commit) + PHP_FALIAS(ocirollback, oci_rollback, arginfo_oci_rollback) + PHP_FALIAS(ocinewdescriptor, oci_new_descriptor, arginfo_oci_new_descriptor) + PHP_FALIAS(ocisetprefetch, oci_set_prefetch, arginfo_oci_set_prefetch) + PHP_FALIAS(ocipasswordchange, oci_password_change, arginfo_oci_password_change) + PHP_FALIAS(ocifreecollection, oci_free_collection, arginfo_oci_free_collection) + PHP_FALIAS(ocinewcollection, oci_new_collection, arginfo_oci_new_collection) + PHP_FALIAS(ocicollappend, oci_collection_append, arginfo_oci_collection_append) + PHP_FALIAS(ocicollgetelem, oci_collection_element_get, arginfo_oci_collection_element_get) + PHP_FALIAS(ocicollassignelem, oci_collection_element_assign, arginfo_oci_collection_element_assign) + PHP_FALIAS(ocicollsize, oci_collection_size, arginfo_oci_collection_size) + PHP_FALIAS(ocicollmax, oci_collection_max, arginfo_oci_collection_max) + PHP_FALIAS(ocicolltrim, oci_collection_trim, arginfo_oci_collection_trim) {NULL,NULL,NULL} }; @@ -533,6 +929,7 @@ PHP_MINIT_FUNCTION(oci) REGISTER_LONG_CONSTANT("OCI_DEFAULT",OCI_DEFAULT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("OCI_SYSOPER",OCI_SYSOPER, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("OCI_SYSDBA",OCI_SYSDBA, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OCI_CRED_EXT",PHP_OCI_CRED_EXT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("OCI_DESCRIBE_ONLY",OCI_DESCRIBE_ONLY, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("OCI_COMMIT_ON_SUCCESS",OCI_COMMIT_ON_SUCCESS, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("OCI_EXACT_FETCH",OCI_EXACT_FETCH, CONST_CS | CONST_PERSISTENT); @@ -1083,11 +1480,33 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char ub2 charsetid = 0; ub2 charsetid_nls_lang = 0; - switch (session_mode) { - case OCI_DEFAULT: - break; - case OCI_SYSOPER: - case OCI_SYSDBA: + if (session_mode & ~(OCI_SYSOPER | OCI_SYSDBA | PHP_OCI_CRED_EXT)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid session mode specified (%ld)", session_mode); + return NULL; + } + if (session_mode & (OCI_SYSOPER | OCI_SYSDBA | PHP_OCI_CRED_EXT)) { + if ((session_mode & OCI_SYSOPER) && (session_mode & OCI_SYSDBA)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_SYSDBA and OCI_SYSOPER cannot be used together"); + return NULL; + } + if (session_mode & PHP_OCI_CRED_EXT) { +#ifdef PHP_WIN32 + /* Disable external authentication on Windows as Impersonation is not yet handled. + * TODO: Re-enable this once OCI provides capability. + */ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "External Authentication is not supported on Windows"); + return NULL; +#endif + if (username_len != 1 || username[0] != '/' || password_len != 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_CRED_EXT can only be used with a username of \"/\" and a NULL password"); + return NULL; + } + } + if (session_mode & (OCI_SYSOPER | OCI_SYSDBA)) { + /* Increase security by not caching privileged oci_pconnect() connections. The + * connection becomes equivalent to oci_connect() or oci_new_connect(). + */ + persistent = 0; if (!OCI_G(privileged_connect)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Privileged connect is disabled. Enable oci8.privileged_connect to be able to connect as SYSOPER or SYSDBA"); return NULL; @@ -1099,23 +1518,15 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char php_error_docref(NULL TSRMLS_CC, E_WARNING, "Privileged connect is disabled in Safe Mode"); return NULL; } - - /* Increase security by not caching privileged oci_pconnect() connections. The - * connection becomes equivalent to oci_connect() or oci_new_connect(). - */ - persistent = 0; - break; - default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid session mode specified (%ld)", session_mode); - return NULL; - break; + } } - /* We cannot use the new session create logic (OCISessionGet from client-side session pool) when - * privileged connect or password change is attempted. TODO: Remove this once OCI provides - * capability + /* We cannot use the new session create logic (OCISessionGet from + * client-side session pool) when privileged connect or password + * change is attempted or OCI_CRED_EXT mode is specified. + * TODO: Re-enable this when OCI provides support. */ - if ((session_mode == OCI_SYSOPER) || (session_mode == OCI_SYSDBA) || (new_password_len)) { + if ((session_mode & (OCI_SYSOPER | OCI_SYSDBA | PHP_OCI_CRED_EXT)) || (new_password_len)) { use_spool = 0; } @@ -1290,14 +1701,14 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char connection->is_open = 0; connection->used_this_request = 1; - + /* We have to do a hash_del but need to preserve the resource if there is a positive * refcount. Set the data pointer in the list entry to NULL */ if (connection == zend_list_find(connection->rsrc_id, &rsrc_type) && rsrc_type == le_pconnection) { le->ptr = NULL; } - + zend_hash_del(&EG(persistent_list), hashed_details.c, hashed_details.len+1); } else { /* We only remove the hash entry. The resource and the list entry with its pointer @@ -2238,21 +2649,18 @@ static int php_oci_old_create_session(php_oci_connection *connection, char *dbna } /* }}} */ } else { /* start the session {{{ */ - switch (session_mode) { - case OCI_DEFAULT: - PHP_OCI_CALL_RETURN(OCI_G(errcode), OCISessionBegin, (connection->svc, OCI_G(err), connection->session, (ub4) OCI_CRED_RDBMS, (ub4) OCI_STMT_CACHE)); - break; - case OCI_SYSDBA: - case OCI_SYSOPER: - default: - if (username_len == 1 && username[0] == '/' && password_len == 0) { - PHP_OCI_CALL_RETURN(OCI_G(errcode), OCISessionBegin, (connection->svc, OCI_G(err), connection->session, (ub4) OCI_CRED_EXT, (ub4) session_mode)); - } else { - PHP_OCI_CALL_RETURN(OCI_G(errcode), OCISessionBegin, (connection->svc, OCI_G(err), connection->session, (ub4) OCI_CRED_RDBMS, (ub4) session_mode)); - } - break; + ub4 cred_type = OCI_CRED_RDBMS; + + /* Extract the overloaded session_mode parameter into valid Oracle credential and session mode values */ + if (session_mode & PHP_OCI_CRED_EXT) { + cred_type = OCI_CRED_EXT; + session_mode ^= PHP_OCI_CRED_EXT; } + session_mode |= OCI_STMT_CACHE; + + PHP_OCI_CALL_RETURN(OCI_G(errcode), OCISessionBegin, (connection->svc, OCI_G(err), connection->session, (ub4) cred_type, (ub4) session_mode)); + if (OCI_G(errcode) != OCI_SUCCESS) { php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); /* OCISessionBegin returns OCI_SUCCESS_WITH_INFO when @@ -2426,7 +2834,7 @@ static int php_oci_create_session(php_oci_connection *connection, php_oci_spool } while (!(connection->svc)); PHP_OCI_CALL_RETURN(OCI_G(errcode), OCIAttrSet, ((dvoid *) connection->svc, (ub4) OCI_HTYPE_SVCCTX, (ub4 *) &statement_cache_size, 0, (ub4) OCI_ATTR_STMTCACHESIZE, OCI_G(err))); - + if (OCI_G(errcode) != OCI_SUCCESS) { php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); return 1; diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h index 0a1eab2843..1f5aca2905 100644 --- a/ext/oci8/php_oci8_int.h +++ b/ext/oci8/php_oci8_int.h @@ -73,23 +73,33 @@ extern zend_class_entry *oci_coll_class_entry_ptr; #define PHP_OCI_MAX_NAME_LEN 64 #define PHP_OCI_MAX_DATA_SIZE INT_MAX -#define PHP_OCI_PIECE_SIZE (64*1024)-1 +#define PHP_OCI_PIECE_SIZE ((64*1024)-1) #define PHP_OCI_LOB_BUFFER_SIZE 1048576l /* 1Mb seems to be the most reasonable buffer size for LOB reading */ -#define PHP_OCI_ASSOC 1<<0 -#define PHP_OCI_NUM 1<<1 +#define PHP_OCI_ASSOC (1<<0) +#define PHP_OCI_NUM (1<<1) #define PHP_OCI_BOTH (PHP_OCI_ASSOC|PHP_OCI_NUM) -#define PHP_OCI_RETURN_NULLS 1<<2 -#define PHP_OCI_RETURN_LOBS 1<<3 +#define PHP_OCI_RETURN_NULLS (1<<2) +#define PHP_OCI_RETURN_LOBS (1<<3) -#define PHP_OCI_FETCHSTATEMENT_BY_COLUMN 1<<4 -#define PHP_OCI_FETCHSTATEMENT_BY_ROW 1<<5 +#define PHP_OCI_FETCHSTATEMENT_BY_COLUMN (1<<4) +#define PHP_OCI_FETCHSTATEMENT_BY_ROW (1<<5) #define PHP_OCI_FETCHSTATEMENT_BY (PHP_OCI_FETCHSTATEMENT_BY_COLUMN | PHP_OCI_FETCHSTATEMENT_BY_ROW) #define PHP_OCI_LOB_BUFFER_DISABLED 0 -#define PHP_OCI_LOB_BUFFER_ENABLED 1 -#define PHP_OCI_LOB_BUFFER_USED 2 +#define PHP_OCI_LOB_BUFFER_ENABLED 1 +#define PHP_OCI_LOB_BUFFER_USED 2 + +/* The mode parameter for oci_connect() is overloaded and accepts both + * privilege and external authentication flags OR'd together. + * PHP_OCI_CRED_EXT must be distinct from the OCI_xxx privilege + * values. + */ +#define PHP_OCI_CRED_EXT (1<<31) +#if ((PHP_OCI_CRED_EXT == OCI_DEFAULT) || (PHP_OCI_CRED_EXT & (OCI_SYSOPER | OCI_SYSDBA))) +#error Invalid value for PHP_OCI_CRED_EXT +#endif /* }}} */ diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt new file mode 100644 index 0000000000..850b1385d1 --- /dev/null +++ b/ext/oci8/tests/extauth_01.phpt @@ -0,0 +1,196 @@ +--TEST-- +Test External Authentication errors with oci_connect +--SKIPIF-- +<?php +if (!extension_loaded('oci8')) die ("skip no oci8 extension"); +if (substr(PHP_OS, 0, 3) == 'WIN') die("skip feature not available on Windows platforms"); +?> +--INI-- +oci8.privileged_connect=1 +--FILE-- +<?php + +// Run Test + +echo "Test 1\n"; + +$c = oci_connect('/', 'notemtpy', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 2\n"; + +$c = oci_connect('notemtpy', 'notemtpy', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 3\n"; + +$c = oci_connect('notemtpy', '', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 4\n"; + +$c = oci_connect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 5\n"; + +$c = oci_connect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 6\n"; + +$c = oci_connect('', '', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 7\n"; + +$c = oci_connect('/', '', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 8\n"; + +$c = oci_connect('/', null, 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 9\n"; + +$c = oci_connect('/', '', 'c', null, OCI_SYSDBA+OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 10\n"; + +$c = oci_connect('/', '', 'c', null, OCI_SYSOPER+OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + + +?> +===DONE=== +<?php exit(0); ?> +--EXPECTF-- +Test 1 + +Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +bool(false) +bool(false) +Test 2 + +Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +bool(false) +bool(false) +Test 3 + +Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +bool(false) +bool(false) +Test 4 + +Warning: oci_connect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d +bool(false) +bool(false) +Test 5 + +Warning: oci_connect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d +bool(false) +bool(false) +Test 6 + +Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +bool(false) +bool(false) +Test 7 + +Warning: oci_connect(): ORA-12154: TNS:could not resolve the connect identifier specified in %s on line %d +array(4) { + ["code"]=> + int(12154) + ["message"]=> + string(65) "ORA-12154: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +bool(false) +Test 8 + +Warning: oci_connect(): ORA-12154: TNS:could not resolve the connect identifier specified in %s on line %d +array(4) { + ["code"]=> + int(12154) + ["message"]=> + string(65) "ORA-12154: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +bool(false) +Test 9 + +Warning: oci_connect(): ORA-12154: TNS:could not resolve the connect identifier specified in %s on line %d +array(4) { + ["code"]=> + int(12154) + ["message"]=> + string(65) "ORA-12154: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +bool(false) +Test 10 + +Warning: oci_connect(): ORA-12154: TNS:could not resolve the connect identifier specified in %s on line %d +array(4) { + ["code"]=> + int(12154) + ["message"]=> + string(65) "ORA-12154: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +bool(false) +===DONE=== diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt new file mode 100644 index 0000000000..df9cb5eb0a --- /dev/null +++ b/ext/oci8/tests/extauth_02.phpt @@ -0,0 +1,196 @@ +--TEST-- +Test External Authentication errors with oci_new_connect +--SKIPIF-- +<?php +if (!extension_loaded('oci8')) die ("skip no oci8 extension"); +if (substr(PHP_OS, 0, 3) == 'WIN') die("skip feature not available on Windows platforms"); +?> +--INI-- +oci8.privileged_connect=1 +--FILE-- +<?php + +// Run Test + +echo "Test 1\n"; + +$c = oci_new_connect('/', 'notemtpy', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 2\n"; + +$c = oci_new_connect('notemtpy', 'notemtpy', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 3\n"; + +$c = oci_new_connect('notemtpy', '', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 4\n"; + +$c = oci_new_connect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 5\n"; + +$c = oci_new_connect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 6\n"; + +$c = oci_new_connect('', '', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 7\n"; + +$c = oci_new_connect('/', '', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 8\n"; + +$c = oci_new_connect('/', null, 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 9\n"; + +$c = oci_new_connect('/', '', 'c', null, OCI_SYSDBA+OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 10\n"; + +$c = oci_new_connect('/', '', 'c', null, OCI_SYSOPER+OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + + +?> +===DONE=== +<?php exit(0); ?> +--EXPECTF-- +Test 1 + +Warning: oci_new_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +bool(false) +bool(false) +Test 2 + +Warning: oci_new_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +bool(false) +bool(false) +Test 3 + +Warning: oci_new_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +bool(false) +bool(false) +Test 4 + +Warning: oci_new_connect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d +bool(false) +bool(false) +Test 5 + +Warning: oci_new_connect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d +bool(false) +bool(false) +Test 6 + +Warning: oci_new_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +bool(false) +bool(false) +Test 7 + +Warning: oci_new_connect(): ORA-12154: TNS:could not resolve the connect identifier specified in %s on line %d +array(4) { + ["code"]=> + int(12154) + ["message"]=> + string(65) "ORA-12154: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +bool(false) +Test 8 + +Warning: oci_new_connect(): ORA-12154: TNS:could not resolve the connect identifier specified in %s on line %d +array(4) { + ["code"]=> + int(12154) + ["message"]=> + string(65) "ORA-12154: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +bool(false) +Test 9 + +Warning: oci_new_connect(): ORA-12154: TNS:could not resolve the connect identifier specified in %s on line %d +array(4) { + ["code"]=> + int(12154) + ["message"]=> + string(65) "ORA-12154: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +bool(false) +Test 10 + +Warning: oci_new_connect(): ORA-12154: TNS:could not resolve the connect identifier specified in %s on line %d +array(4) { + ["code"]=> + int(12154) + ["message"]=> + string(65) "ORA-12154: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +bool(false) +===DONE=== diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt new file mode 100644 index 0000000000..5012742326 --- /dev/null +++ b/ext/oci8/tests/extauth_03.phpt @@ -0,0 +1,196 @@ +--TEST-- +Test External Authentication errors with oci_pconnect +--SKIPIF-- +<?php +if (!extension_loaded('oci8')) die ("skip no oci8 extension"); +if (substr(PHP_OS, 0, 3) == 'WIN') die("skip feature not available on Windows platforms"); +?> +--INI-- +oci8.privileged_connect=1 +--FILE-- +<?php + +// Run Test + +echo "Test 1\n"; + +$c = oci_pconnect('/', 'notemtpy', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 2\n"; + +$c = oci_pconnect('notemtpy', 'notemtpy', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 3\n"; + +$c = oci_pconnect('notemtpy', '', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 4\n"; + +$c = oci_pconnect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 5\n"; + +$c = oci_pconnect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 6\n"; + +$c = oci_pconnect('', '', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 7\n"; + +$c = oci_pconnect('/', '', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 8\n"; + +$c = oci_pconnect('/', null, 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 9\n"; + +$c = oci_pconnect('/', '', 'c', null, OCI_SYSDBA+OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 10\n"; + +$c = oci_pconnect('/', '', 'c', null, OCI_SYSOPER+OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + + +?> +===DONE=== +<?php exit(0); ?> +--EXPECTF-- +Test 1 + +Warning: oci_pconnect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +bool(false) +bool(false) +Test 2 + +Warning: oci_pconnect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +bool(false) +bool(false) +Test 3 + +Warning: oci_pconnect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +bool(false) +bool(false) +Test 4 + +Warning: oci_pconnect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d +bool(false) +bool(false) +Test 5 + +Warning: oci_pconnect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d +bool(false) +bool(false) +Test 6 + +Warning: oci_pconnect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +bool(false) +bool(false) +Test 7 + +Warning: oci_pconnect(): ORA-12154: TNS:could not resolve the connect identifier specified in %s on line %d +array(4) { + ["code"]=> + int(12154) + ["message"]=> + string(65) "ORA-12154: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +bool(false) +Test 8 + +Warning: oci_pconnect(): ORA-12154: TNS:could not resolve the connect identifier specified in %s on line %d +array(4) { + ["code"]=> + int(12154) + ["message"]=> + string(65) "ORA-12154: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +bool(false) +Test 9 + +Warning: oci_pconnect(): ORA-12154: TNS:could not resolve the connect identifier specified in %s on line %d +array(4) { + ["code"]=> + int(12154) + ["message"]=> + string(65) "ORA-12154: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +bool(false) +Test 10 + +Warning: oci_pconnect(): ORA-12154: TNS:could not resolve the connect identifier specified in %s on line %d +array(4) { + ["code"]=> + int(12154) + ["message"]=> + string(65) "ORA-12154: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +bool(false) +===DONE=== diff --git a/ext/oci8/tests/extauth_04.phpt b/ext/oci8/tests/extauth_04.phpt new file mode 100644 index 0000000000..e502435bb0 --- /dev/null +++ b/ext/oci8/tests/extauth_04.phpt @@ -0,0 +1,56 @@ +--TEST-- +Test External Authentication errors on Windows +--SKIPIF-- +<?php +if (!extension_loaded('oci8')) die ("skip no oci8 extension"); +if (substr(PHP_OS, 0, 3) != 'WIN') die("skip this test is for Windows platforms only"); +?> +--FILE-- +<?php + +// Run Test + +echo "Test 1\n"; + +$c = oci_connect('/', '', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 2\n"; + +$c = oci_new_connect('/', '', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +echo "Test 3\n"; + +$c = oci_pconnect('/', '', 'anything', null, OCI_CRED_EXT); +if (!$c) { + $m = oci_error(); + var_dump($m); +} +var_dump($c); + +?> +===DONE=== +<?php exit(0); ?> +--EXPECTF-- +Test 1 +Warning: oci_connect(): External Authentication is not supported on Windows in %s on line %d +bool(false) +bool(false) +Test 2 +Warning: oci_new_connect(): External Authentication is not supported on Windows in %s on line %d +bool(false) +bool(false) +Test 3 +Warning: oci_pconnect(): External Authentication is not supported on Windows in %s on line %d +bool(false) +bool(false) +===DONE=== diff --git a/ext/oci8/tests/reflection1.phpt b/ext/oci8/tests/reflection1.phpt new file mode 100644 index 0000000000..bc291fcd7d --- /dev/null +++ b/ext/oci8/tests/reflection1.phpt @@ -0,0 +1,1052 @@ +--TEST-- +Test OCI8 Reflection +--SKIPIF-- +<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?> +--FILE-- +<?php + +/* ALL PHP_FE or PHP_ALIAS user callable functions should appear here */ + +reflection::export(new reflectionfunction('oci_define_by_name')); +reflection::export(new reflectionfunction('oci_bind_by_name')); +reflection::export(new reflectionfunction('oci_bind_array_by_name')); +reflection::export(new reflectionfunction('oci_field_is_null')); +reflection::export(new reflectionfunction('oci_field_name')); +reflection::export(new reflectionfunction('oci_field_size')); +reflection::export(new reflectionfunction('oci_field_scale')); +reflection::export(new reflectionfunction('oci_field_precision')); +reflection::export(new reflectionfunction('oci_field_type')); +reflection::export(new reflectionfunction('oci_field_type_raw')); +reflection::export(new reflectionfunction('oci_execute')); +reflection::export(new reflectionfunction('oci_cancel')); +reflection::export(new reflectionfunction('oci_fetch')); +reflection::export(new reflectionfunction('oci_fetch_object')); +reflection::export(new reflectionfunction('oci_fetch_row')); +reflection::export(new reflectionfunction('oci_fetch_assoc')); +reflection::export(new reflectionfunction('oci_fetch_array')); +reflection::export(new reflectionfunction('ocifetchinto')); +reflection::export(new reflectionfunction('oci_fetch_all')); +reflection::export(new reflectionfunction('oci_free_statement')); +reflection::export(new reflectionfunction('oci_internal_debug')); +reflection::export(new reflectionfunction('oci_num_fields')); +reflection::export(new reflectionfunction('oci_parse')); +reflection::export(new reflectionfunction('oci_new_cursor')); +reflection::export(new reflectionfunction('oci_result')); +reflection::export(new reflectionfunction('oci_server_version')); +reflection::export(new reflectionfunction('oci_statement_type')); +reflection::export(new reflectionfunction('oci_num_rows')); +reflection::export(new reflectionfunction('oci_close')); +reflection::export(new reflectionfunction('oci_connect')); +reflection::export(new reflectionfunction('oci_new_connect')); +reflection::export(new reflectionfunction('oci_pconnect')); +reflection::export(new reflectionfunction('oci_error')); +reflection::export(new reflectionfunction('oci_free_descriptor')); +reflection::export(new reflectionfunction('oci_lob_save')); +reflection::export(new reflectionfunction('oci_lob_import')); +reflection::export(new reflectionfunction('oci_lob_size')); +reflection::export(new reflectionfunction('oci_lob_load')); +reflection::export(new reflectionfunction('oci_lob_read')); +reflection::export(new reflectionfunction('oci_lob_eof')); +reflection::export(new reflectionfunction('oci_lob_tell')); +reflection::export(new reflectionfunction('oci_lob_truncate')); +reflection::export(new reflectionfunction('oci_lob_erase')); +reflection::export(new reflectionfunction('oci_lob_flush')); +reflection::export(new reflectionfunction('ocisetbufferinglob')); +reflection::export(new reflectionfunction('ocigetbufferinglob')); +reflection::export(new reflectionfunction('oci_lob_is_equal')); +reflection::export(new reflectionfunction('oci_lob_rewind')); +reflection::export(new reflectionfunction('oci_lob_write')); +reflection::export(new reflectionfunction('oci_lob_append')); +reflection::export(new reflectionfunction('oci_lob_copy')); +reflection::export(new reflectionfunction('oci_lob_export')); +reflection::export(new reflectionfunction('oci_lob_seek')); +reflection::export(new reflectionfunction('oci_commit')); +reflection::export(new reflectionfunction('oci_rollback')); +reflection::export(new reflectionfunction('oci_new_descriptor')); +reflection::export(new reflectionfunction('oci_set_prefetch')); +reflection::export(new reflectionfunction('oci_password_change')); +reflection::export(new reflectionfunction('oci_free_collection')); +reflection::export(new reflectionfunction('oci_collection_append')); +reflection::export(new reflectionfunction('oci_collection_element_get')); +reflection::export(new reflectionfunction('oci_collection_element_assign')); +reflection::export(new reflectionfunction('oci_collection_assign')); +reflection::export(new reflectionfunction('oci_collection_size')); +reflection::export(new reflectionfunction('oci_collection_max')); +reflection::export(new reflectionfunction('oci_collection_trim')); +reflection::export(new reflectionfunction('oci_new_collection')); +reflection::export(new reflectionfunction('oci_free_cursor')); +reflection::export(new reflectionfunction('ocifreecursor')); +reflection::export(new reflectionfunction('ocibindbyname')); +reflection::export(new reflectionfunction('ocidefinebyname')); +reflection::export(new reflectionfunction('ocicolumnisnull')); +reflection::export(new reflectionfunction('ocicolumnname')); +reflection::export(new reflectionfunction('ocicolumnsize')); +reflection::export(new reflectionfunction('ocicolumnscale')); +reflection::export(new reflectionfunction('ocicolumnprecision')); +reflection::export(new reflectionfunction('ocicolumntype')); +reflection::export(new reflectionfunction('ocicolumntyperaw')); +reflection::export(new reflectionfunction('ociexecute')); +reflection::export(new reflectionfunction('ocicancel')); +reflection::export(new reflectionfunction('ocifetch')); +reflection::export(new reflectionfunction('ocifetchstatement')); +reflection::export(new reflectionfunction('ocifreestatement')); +reflection::export(new reflectionfunction('ociinternaldebug')); +reflection::export(new reflectionfunction('ocinumcols')); +reflection::export(new reflectionfunction('ociparse')); +reflection::export(new reflectionfunction('ocinewcursor')); +reflection::export(new reflectionfunction('ociresult')); +reflection::export(new reflectionfunction('ociserverversion')); +reflection::export(new reflectionfunction('ocistatementtype')); +reflection::export(new reflectionfunction('ocirowcount')); +reflection::export(new reflectionfunction('ocilogoff')); +reflection::export(new reflectionfunction('ocilogon')); +reflection::export(new reflectionfunction('ocinlogon')); +reflection::export(new reflectionfunction('ociplogon')); +reflection::export(new reflectionfunction('ocierror')); +reflection::export(new reflectionfunction('ocifreedesc')); +reflection::export(new reflectionfunction('ocisavelob')); +reflection::export(new reflectionfunction('ocisavelobfile')); +reflection::export(new reflectionfunction('ociwritelobtofile')); +reflection::export(new reflectionfunction('ociloadlob')); +reflection::export(new reflectionfunction('ocicommit')); +reflection::export(new reflectionfunction('ocirollback')); +reflection::export(new reflectionfunction('ocinewdescriptor')); +reflection::export(new reflectionfunction('ocisetprefetch')); +reflection::export(new reflectionfunction('ocipasswordchange')); +reflection::export(new reflectionfunction('ocifreecollection')); +reflection::export(new reflectionfunction('ocinewcollection')); +reflection::export(new reflectionfunction('ocicollappend')); +reflection::export(new reflectionfunction('ocicollgetelem')); +reflection::export(new reflectionfunction('ocicollassignelem')); +reflection::export(new reflectionfunction('ocicollsize')); +reflection::export(new reflectionfunction('ocicollmax')); +reflection::export(new reflectionfunction('ocicolltrim')); + +?> +===DONE=== +<?php exit(0); ?> +--EXPECTF-- +Function [ <internal:oci8> function oci_define_by_name ] { + + - Parameters [4] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_name ] + Parameter #2 [ <required> &$variable ] + Parameter #3 [ <optional> $type ] + } +} + +Function [ <internal:oci8> function oci_bind_by_name ] { + + - Parameters [5] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_name ] + Parameter #2 [ <required> &$variable ] + Parameter #3 [ <optional> $maximum_length ] + Parameter #4 [ <optional> $type ] + } +} + +Function [ <internal:oci8> function oci_bind_array_by_name ] { + + - Parameters [6] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_name ] + Parameter #2 [ <required> &$variable ] + Parameter #3 [ <required> $maximum_array_length ] + Parameter #4 [ <optional> $maximum_item_length ] + Parameter #5 [ <optional> $type ] + } +} + +Function [ <internal:oci8> function oci_field_is_null ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_number_or_name ] + } +} + +Function [ <internal:oci8> function oci_field_name ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_number ] + } +} + +Function [ <internal:oci8> function oci_field_size ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_number_or_name ] + } +} + +Function [ <internal:oci8> function oci_field_scale ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_number ] + } +} + +Function [ <internal:oci8> function oci_field_precision ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_number ] + } +} + +Function [ <internal:oci8> function oci_field_type ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_number ] + } +} + +Function [ <internal:oci8> function oci_field_type_raw ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_number ] + } +} + +Function [ <internal:oci8> function oci_execute ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <optional> $mode ] + } +} + +Function [ <internal:oci8> function oci_cancel ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function oci_fetch ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function oci_fetch_object ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function oci_fetch_row ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function oci_fetch_assoc ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function oci_fetch_array ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <optional> $mode ] + } +} + +Function [ <internal:oci8> function ocifetchinto ] { + + - Parameters [3] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> &$result ] + Parameter #2 [ <optional> $mode ] + } +} + +Function [ <internal:oci8> function oci_fetch_all ] { + + - Parameters [5] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> &$output ] + Parameter #2 [ <optional> $skip ] + Parameter #3 [ <optional> $maximum_rows ] + Parameter #4 [ <optional> $flags ] + } +} + +Function [ <internal:oci8> function oci_free_statement ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function oci_internal_debug ] { + + - Parameters [1] { + Parameter #0 [ <required> $mode ] + } +} + +Function [ <internal:oci8> function oci_num_fields ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function oci_parse ] { + + - Parameters [2] { + Parameter #0 [ <required> $connection_resource ] + Parameter #1 [ <required> $sql_text ] + } +} + +Function [ <internal:oci8> function oci_new_cursor ] { + + - Parameters [1] { + Parameter #0 [ <required> $connection_resource ] + } +} + +Function [ <internal:oci8> function oci_result ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_number_or_name ] + } +} + +Function [ <internal:oci8> function oci_server_version ] { + + - Parameters [1] { + Parameter #0 [ <required> $connection_resource ] + } +} + +Function [ <internal:oci8> function oci_statement_type ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function oci_num_rows ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function oci_close ] { + + - Parameters [1] { + Parameter #0 [ <required> $connection_resource ] + } +} + +Function [ <internal:oci8> function oci_connect ] { + + - Parameters [5] { + Parameter #0 [ <required> $username ] + Parameter #1 [ <required> $password ] + Parameter #2 [ <optional> $connection_string ] + Parameter #3 [ <optional> $character_set ] + Parameter #4 [ <optional> $session_mode ] + } +} + +Function [ <internal:oci8> function oci_new_connect ] { + + - Parameters [5] { + Parameter #0 [ <required> $username ] + Parameter #1 [ <required> $password ] + Parameter #2 [ <optional> $connection_string ] + Parameter #3 [ <optional> $character_set ] + Parameter #4 [ <optional> $session_mode ] + } +} + +Function [ <internal:oci8> function oci_pconnect ] { + + - Parameters [5] { + Parameter #0 [ <required> $username ] + Parameter #1 [ <required> $password ] + Parameter #2 [ <optional> $connection_string ] + Parameter #3 [ <optional> $character_set ] + Parameter #4 [ <optional> $session_mode ] + } +} + +Function [ <internal:oci8> function oci_error ] { + + - Parameters [1] { + Parameter #0 [ <optional> $connection_or_statement_resource ] + } +} + +Function [ <internal:oci8> function oci_free_descriptor ] { + + - Parameters [1] { + Parameter #0 [ <required> $lob_descriptor ] + } +} + +Function [ <internal:oci8> function oci_lob_save ] { + + - Parameters [3] { + Parameter #0 [ <required> $lob_descriptor ] + Parameter #1 [ <required> $data ] + Parameter #2 [ <optional> $offset ] + } +} + +Function [ <internal:oci8> function oci_lob_import ] { + + - Parameters [2] { + Parameter #0 [ <required> $lob_descriptor ] + Parameter #1 [ <required> $filename ] + } +} + +Function [ <internal:oci8> function oci_lob_size ] { + + - Parameters [1] { + Parameter #0 [ <required> $lob_descriptor ] + } +} + +Function [ <internal:oci8> function oci_lob_load ] { + + - Parameters [1] { + Parameter #0 [ <required> $lob_descriptor ] + } +} + +Function [ <internal:oci8> function oci_lob_read ] { + + - Parameters [2] { + Parameter #0 [ <required> $lob_descriptor ] + Parameter #1 [ <required> $length ] + } +} + +Function [ <internal:oci8> function oci_lob_eof ] { + + - Parameters [1] { + Parameter #0 [ <required> $lob_descriptor ] + } +} + +Function [ <internal:oci8> function oci_lob_tell ] { + + - Parameters [1] { + Parameter #0 [ <required> $lob_descriptor ] + } +} + +Function [ <internal:oci8> function oci_lob_truncate ] { + + - Parameters [2] { + Parameter #0 [ <required> $lob_descriptor ] + Parameter #1 [ <optional> $length ] + } +} + +Function [ <internal:oci8> function oci_lob_erase ] { + + - Parameters [3] { + Parameter #0 [ <required> $lob_descriptor ] + Parameter #1 [ <optional> $offset ] + Parameter #2 [ <optional> $length ] + } +} + +Function [ <internal:oci8> function oci_lob_flush ] { + + - Parameters [2] { + Parameter #0 [ <required> $lob_descriptor ] + Parameter #1 [ <optional> $flag ] + } +} + +Function [ <internal:oci8> function ocisetbufferinglob ] { + + - Parameters [2] { + Parameter #0 [ <required> $lob_descriptor ] + Parameter #1 [ <required> $flag ] + } +} + +Function [ <internal:oci8> function ocigetbufferinglob ] { + + - Parameters [1] { + Parameter #0 [ <required> $lob_descriptor ] + } +} + +Function [ <internal:oci8> function oci_lob_is_equal ] { + + - Parameters [2] { + Parameter #0 [ <required> $lob_descriptor ] + Parameter #1 [ <required> $lob_descriptor ] + } +} + +Function [ <internal:oci8> function oci_lob_rewind ] { + + - Parameters [1] { + Parameter #0 [ <required> $lob_descriptor ] + } +} + +Function [ <internal:oci8> function oci_lob_write ] { + + - Parameters [3] { + Parameter #0 [ <required> $lob_descriptor ] + Parameter #1 [ <required> $string ] + Parameter #2 [ <optional> $length ] + } +} + +Function [ <internal:oci8> function oci_lob_append ] { + + - Parameters [2] { + Parameter #0 [ <required> $lob_descriptor_to ] + Parameter #1 [ <required> $lob_descriptor_from ] + } +} + +Function [ <internal:oci8> function oci_lob_copy ] { + + - Parameters [3] { + Parameter #0 [ <required> $lob_descriptor_to ] + Parameter #1 [ <required> $lob_descriptor_from ] + Parameter #2 [ <optional> $length ] + } +} + +Function [ <internal:oci8> function oci_lob_export ] { + + - Parameters [4] { + Parameter #0 [ <required> $lob_descriptor ] + Parameter #1 [ <required> $filename ] + Parameter #2 [ <optional> $start ] + Parameter #3 [ <optional> $length ] + } +} + +Function [ <internal:oci8> function oci_lob_seek ] { + + - Parameters [3] { + Parameter #0 [ <required> $lob_descriptor ] + Parameter #1 [ <required> $offset ] + Parameter #2 [ <optional> $whence ] + } +} + +Function [ <internal:oci8> function oci_commit ] { + + - Parameters [1] { + Parameter #0 [ <required> $connection_resource ] + } +} + +Function [ <internal:oci8> function oci_rollback ] { + + - Parameters [1] { + Parameter #0 [ <required> $connection_resource ] + } +} + +Function [ <internal:oci8> function oci_new_descriptor ] { + + - Parameters [2] { + Parameter #0 [ <required> $connection_resource ] + Parameter #1 [ <optional> $type ] + } +} + +Function [ <internal:oci8> function oci_set_prefetch ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $number_of_rows ] + } +} + +Function [ <internal:oci8> function oci_password_change ] { + + - Parameters [4] { + Parameter #0 [ <required> $connection_resource_or_connection_string ] + Parameter #1 [ <required> $username ] + Parameter #2 [ <required> $old_password ] + Parameter #3 [ <required> $new_password ] + } +} + +Function [ <internal:oci8> function oci_free_collection ] { + + - Parameters [1] { + Parameter #0 [ <required> $collection ] + } +} + +Function [ <internal:oci8> function oci_collection_append ] { + + - Parameters [2] { + Parameter #0 [ <optional> $collection ] + Parameter #1 [ <optional> $value ] + } +} + +Function [ <internal:oci8> function oci_collection_element_get ] { + + - Parameters [2] { + Parameter #0 [ <required> $collection ] + Parameter #1 [ <required> $index ] + } +} + +Function [ <internal:oci8> function oci_collection_element_assign ] { + + - Parameters [3] { + Parameter #0 [ <required> $collection ] + Parameter #1 [ <required> $index ] + Parameter #2 [ <required> $value ] + } +} + +Function [ <internal:oci8> function oci_collection_assign ] { + + - Parameters [2] { + Parameter #0 [ <required> $collection_to ] + Parameter #1 [ <required> $collection_from ] + } +} + +Function [ <internal:oci8> function oci_collection_size ] { + + - Parameters [1] { + Parameter #0 [ <required> $collection ] + } +} + +Function [ <internal:oci8> function oci_collection_max ] { + + - Parameters [1] { + Parameter #0 [ <required> $collection ] + } +} + +Function [ <internal:oci8> function oci_collection_trim ] { + + - Parameters [2] { + Parameter #0 [ <required> $collection ] + Parameter #1 [ <required> $num ] + } +} + +Function [ <internal:oci8> function oci_new_collection ] { + + - Parameters [3] { + Parameter #0 [ <required> $connection_resource ] + Parameter #1 [ <required> $type_name ] + Parameter #2 [ <optional> $schema_name ] + } +} + +Function [ <internal:oci8> function oci_free_cursor ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function ocifreecursor ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function ocibindbyname ] { + + - Parameters [5] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_name ] + Parameter #2 [ <required> &$variable ] + Parameter #3 [ <optional> $maximum_length ] + Parameter #4 [ <optional> $type ] + } +} + +Function [ <internal:oci8> function ocidefinebyname ] { + + - Parameters [4] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_name ] + Parameter #2 [ <required> &$variable ] + Parameter #3 [ <optional> $type ] + } +} + +Function [ <internal:oci8> function ocicolumnisnull ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_number_or_name ] + } +} + +Function [ <internal:oci8> function ocicolumnname ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_number ] + } +} + +Function [ <internal:oci8> function ocicolumnsize ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_number_or_name ] + } +} + +Function [ <internal:oci8> function ocicolumnscale ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_number ] + } +} + +Function [ <internal:oci8> function ocicolumnprecision ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_number ] + } +} + +Function [ <internal:oci8> function ocicolumntype ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_number ] + } +} + +Function [ <internal:oci8> function ocicolumntyperaw ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_number ] + } +} + +Function [ <internal:oci8> function ociexecute ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <optional> $mode ] + } +} + +Function [ <internal:oci8> function ocicancel ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function ocifetch ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function ocifetchstatement ] { + + - Parameters [5] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> &$output ] + Parameter #2 [ <optional> $skip ] + Parameter #3 [ <optional> $maximum_rows ] + Parameter #4 [ <optional> $flags ] + } +} + +Function [ <internal:oci8> function ocifreestatement ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function ociinternaldebug ] { + + - Parameters [1] { + Parameter #0 [ <required> $mode ] + } +} + +Function [ <internal:oci8> function ocinumcols ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function ociparse ] { + + - Parameters [2] { + Parameter #0 [ <required> $connection_resource ] + Parameter #1 [ <required> $sql_text ] + } +} + +Function [ <internal:oci8> function ocinewcursor ] { + + - Parameters [1] { + Parameter #0 [ <required> $connection_resource ] + } +} + +Function [ <internal:oci8> function ociresult ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $column_number_or_name ] + } +} + +Function [ <internal:oci8> function ociserverversion ] { + + - Parameters [1] { + Parameter #0 [ <required> $connection_resource ] + } +} + +Function [ <internal:oci8> function ocistatementtype ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function ocirowcount ] { + + - Parameters [1] { + Parameter #0 [ <required> $statement_resource ] + } +} + +Function [ <internal:oci8> function ocilogoff ] { + + - Parameters [1] { + Parameter #0 [ <required> $connection_resource ] + } +} + +Function [ <internal:oci8> function ocilogon ] { + + - Parameters [5] { + Parameter #0 [ <required> $username ] + Parameter #1 [ <required> $password ] + Parameter #2 [ <optional> $connection_string ] + Parameter #3 [ <optional> $character_set ] + Parameter #4 [ <optional> $session_mode ] + } +} + +Function [ <internal:oci8> function ocinlogon ] { + + - Parameters [5] { + Parameter #0 [ <required> $username ] + Parameter #1 [ <required> $password ] + Parameter #2 [ <optional> $connection_string ] + Parameter #3 [ <optional> $character_set ] + Parameter #4 [ <optional> $session_mode ] + } +} + +Function [ <internal:oci8> function ociplogon ] { + + - Parameters [5] { + Parameter #0 [ <required> $username ] + Parameter #1 [ <required> $password ] + Parameter #2 [ <optional> $connection_string ] + Parameter #3 [ <optional> $character_set ] + Parameter #4 [ <optional> $session_mode ] + } +} + +Function [ <internal:oci8> function ocierror ] { + + - Parameters [1] { + Parameter #0 [ <optional> $connection_or_statement_resource ] + } +} + +Function [ <internal:oci8> function ocifreedesc ] { + + - Parameters [1] { + Parameter #0 [ <required> $lob_descriptor ] + } +} + +Function [ <internal:oci8> function ocisavelob ] { + + - Parameters [3] { + Parameter #0 [ <required> $lob_descriptor ] + Parameter #1 [ <required> $data ] + Parameter #2 [ <optional> $offset ] + } +} + +Function [ <internal:oci8> function ocisavelobfile ] { + + - Parameters [2] { + Parameter #0 [ <required> $lob_descriptor ] + Parameter #1 [ <required> $filename ] + } +} + +Function [ <internal:oci8> function ociwritelobtofile ] { + + - Parameters [4] { + Parameter #0 [ <required> $lob_descriptor ] + Parameter #1 [ <required> $filename ] + Parameter #2 [ <optional> $start ] + Parameter #3 [ <optional> $length ] + } +} + +Function [ <internal:oci8> function ociloadlob ] { + + - Parameters [1] { + Parameter #0 [ <required> $lob_descriptor ] + } +} + +Function [ <internal:oci8> function ocicommit ] { + + - Parameters [1] { + Parameter #0 [ <required> $connection_resource ] + } +} + +Function [ <internal:oci8> function ocirollback ] { + + - Parameters [1] { + Parameter #0 [ <required> $connection_resource ] + } +} + +Function [ <internal:oci8> function ocinewdescriptor ] { + + - Parameters [2] { + Parameter #0 [ <required> $connection_resource ] + Parameter #1 [ <optional> $type ] + } +} + +Function [ <internal:oci8> function ocisetprefetch ] { + + - Parameters [2] { + Parameter #0 [ <required> $statement_resource ] + Parameter #1 [ <required> $number_of_rows ] + } +} + +Function [ <internal:oci8> function ocipasswordchange ] { + + - Parameters [4] { + Parameter #0 [ <required> $connection_resource_or_connection_string ] + Parameter #1 [ <required> $username ] + Parameter #2 [ <required> $old_password ] + Parameter #3 [ <required> $new_password ] + } +} + +Function [ <internal:oci8> function ocifreecollection ] { + + - Parameters [1] { + Parameter #0 [ <required> $collection ] + } +} + +Function [ <internal:oci8> function ocinewcollection ] { + + - Parameters [3] { + Parameter #0 [ <required> $connection_resource ] + Parameter #1 [ <required> $type_name ] + Parameter #2 [ <optional> $schema_name ] + } +} + +Function [ <internal:oci8> function ocicollappend ] { + + - Parameters [2] { + Parameter #0 [ <optional> $collection ] + Parameter #1 [ <optional> $value ] + } +} + +Function [ <internal:oci8> function ocicollgetelem ] { + + - Parameters [2] { + Parameter #0 [ <required> $collection ] + Parameter #1 [ <required> $index ] + } +} + +Function [ <internal:oci8> function ocicollassignelem ] { + + - Parameters [3] { + Parameter #0 [ <required> $collection ] + Parameter #1 [ <required> $index ] + Parameter #2 [ <required> $value ] + } +} + +Function [ <internal:oci8> function ocicollsize ] { + + - Parameters [1] { + Parameter #0 [ <required> $collection ] + } +} + +Function [ <internal:oci8> function ocicollmax ] { + + - Parameters [1] { + Parameter #0 [ <required> $collection ] + } +} + +Function [ <internal:oci8> function ocicolltrim ] { + + - Parameters [2] { + Parameter #0 [ <required> $collection ] + Parameter #1 [ <required> $num ] + } +} + +===DONE=== |