]> granicus.if.org Git - php/commitdiff
Sync with 7.1 branch changes from Nikita & Dimitri to keep OCI8 code identical
authorChristopher Jones <sixd@php.net>
Sun, 7 Aug 2016 00:17:06 +0000 (10:17 +1000)
committerChristopher Jones <sixd@php.net>
Sun, 7 Aug 2016 00:17:06 +0000 (10:17 +1000)
ext/oci8/oci8.c
ext/oci8/oci8_interface.c
ext/oci8/oci8_lob.c
ext/oci8/oci8_statement.c

index 5df00d655d62fe53cbe66fb1232dd058c15caa0c..488b3b42aaba817f87948a31e779abbb408f4217 100644 (file)
@@ -103,12 +103,6 @@ zend_class_entry *oci_coll_class_entry_ptr;
 #define SQLT_CFILEE 115
 #endif
 
-#if ZEND_MODULE_API_NO > 20020429
-#define ONUPDATELONGFUNC OnUpdateLong
-#else
-#define ONUPDATELONGFUNC OnUpdateInt
-#endif
-
 #ifdef ZTS
 #define PHP_OCI_INIT_MODE (OCI_DEFAULT | OCI_OBJECT | OCI_THREADED | OCI_NO_MUTEX)
 #else
@@ -144,8 +138,6 @@ ZEND_GET_MODULE(oci8)
 #endif /* COMPILE_DL */
 /* }}} */
 
-#if defined(ZEND_ENGINE_2) || defined(ZEND_ENGINE_3)
-
 /* {{{ Function arginfo */
 ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_define_by_name, 0, 0, 3)
        ZEND_ARG_INFO(0, statement_resource)
@@ -641,118 +633,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_trim_method, 0, 0, 1)
 ZEND_END_ARG_INFO()
 /* }}} */
 
-#else /* defined(ZEND_ENGINE_2) || defined(ZEND_ENGINE_3) */
-/* {{{ Keep the old arginfo behavior when building with PHP 4 */
-
-static unsigned char arginfo_ocifetchinto[]  = { 2, BYREF_NONE, BYREF_FORCE };
-static unsigned char arginfo_oci_fetch_all[] = { 2, BYREF_NONE, BYREF_FORCE };
-static unsigned char arginfo_oci_define_by_name[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
-static unsigned char arginfo_oci_bind_by_name[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
-static unsigned char arginfo_oci_bind_array_by_name[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
-
-#define arginfo_oci_free_descriptor                                            NULL
-#define arginfo_oci_lob_save                                                   NULL
-#define arginfo_oci_lob_import                                                 NULL
-#define arginfo_oci_lob_load                                                   NULL
-#define arginfo_oci_lob_read                                                   NULL
-#define arginfo_oci_lob_eof                                                            NULL
-#define arginfo_oci_lob_tell                                                   NULL
-#define arginfo_oci_lob_rewind                                                 NULL
-#define arginfo_oci_lob_seek                                                   NULL
-#define arginfo_oci_lob_size                                                   NULL
-#define arginfo_oci_lob_write                                                  NULL
-#define arginfo_oci_lob_append                                                 NULL
-#define arginfo_oci_lob_truncate                                               NULL
-#define arginfo_oci_lob_erase                                                  NULL
-#define arginfo_oci_lob_flush                                                  NULL
-#define arginfo_ocisetbufferinglob                                             NULL
-#define arginfo_ocigetbufferinglob                                             NULL
-#define arginfo_oci_lob_copy                                                   NULL
-#define arginfo_oci_lob_is_equal                                               NULL
-#define arginfo_oci_lob_export                                                 NULL
-#define arginfo_oci_new_descriptor                                             NULL
-#define arginfo_oci_rollback                                                   NULL
-#define arginfo_oci_commit                                                             NULL
-#define arginfo_oci_field_name                                                 NULL
-#define arginfo_oci_field_size                                                 NULL
-#define arginfo_oci_field_scale                                                        NULL
-#define arginfo_oci_field_precision                                            NULL
-#define arginfo_oci_field_type                                                 NULL
-#define arginfo_oci_field_type_raw                                             NULL
-#define arginfo_oci_field_is_null                                              NULL
-#define arginfo_oci_internal_debug                                             NULL
-#define arginfo_oci_execute                                                            NULL
-#define arginfo_oci_cancel                                                             NULL
-#define arginfo_oci_fetch                                                              NULL
-#define arginfo_oci_fetch_object                                               NULL
-#define arginfo_oci_fetch_row                                                  NULL
-#define arginfo_oci_fetch_assoc                                                        NULL
-#define arginfo_oci_fetch_array                                                        NULL
-#define arginfo_oci_free_statement                                             NULL
-#define arginfo_oci_close                                                              NULL
-#define arginfo_oci_new_connect                                                        NULL
-#define arginfo_oci_connect                                                            NULL
-#define arginfo_oci_pconnect                                                   NULL
-#define arginfo_oci_error                                                              NULL
-#define arginfo_oci_num_fields                                                 NULL
-#define arginfo_oci_parse                                                              NULL
-#define arginfo_oci_get_implicit_resultset                             NULL
-#define arginfo_oci_set_prefetch                                               NULL
-#define arginfo_oci_set_client_identifier                              NULL
-#define arginfo_oci_set_edition                                                        NULL
-#define arginfo_oci_set_module_name                                            NULL
-#define arginfo_oci_set_action                                                 NULL
-#define arginfo_oci_set_client_info                                            NULL
-#ifdef WAITIING_ORACLE_BUG_16695981_FIX
-#define arginfo_oci_set_db_operation                                   NULL
-#endif
-#define arginfo_oci_password_change                                            NULL
-#define arginfo_oci_new_cursor                                                 NULL
-#define arginfo_oci_result                                                             NULL
-#define arginfo_oci_client_version                                             NULL
-#define arginfo_oci_server_version                                             NULL
-#define arginfo_oci_statement_type                                             NULL
-#define arginfo_oci_num_rows                                                   NULL
-#define arginfo_oci_free_collection                                            NULL
-#define arginfo_oci_collection_append                                  NULL
-#define arginfo_oci_collection_element_get                             NULL
-#define arginfo_oci_collection_assign                                  NULL
-#define arginfo_oci_collection_element_assign                  NULL
-#define arginfo_oci_collection_size                                            NULL
-#define arginfo_oci_collection_max                                             NULL
-#define arginfo_oci_collection_trim                                            NULL
-#define arginfo_oci_new_collection                                             NULL
-#define arginfo_oci_lob_size_method                                            NULL
-#define arginfo_oci_lob_getbuffering_method                            NULL
-#define arginfo_oci_lob_close_method                                   NULL
-#define arginfo_oci_lob_save_method                                            NULL
-#define arginfo_oci_lob_import_method                                  NULL
-#define arginfo_oci_lob_read_method                                            NULL
-#define arginfo_oci_lob_seek_method                                            NULL
-#define arginfo_oci_lob_write_method                                   NULL
-#define arginfo_oci_lob_append_method                                  NULL
-#define arginfo_oci_lob_truncate_method                                        NULL
-#define arginfo_oci_lob_erase_method                                   NULL
-#define arginfo_oci_lob_flush_method                                   NULL
-#define arginfo_oci_lob_setbuffering_method                            NULL
-#define arginfo_oci_lob_export_method                                  NULL
-#define arginfo_oci_lob_write_temporary_method                 NULL
-#define arginfo_oci_lob_load_method                                            NULL
-#define arginfo_oci_lob_tell_method                                            NULL
-#define arginfo_oci_lob_rewind_method                                  NULL
-#define arginfo_oci_lob_eof_method                                             NULL
-#define arginfo_oci_free_descriptor_method                             NULL
-#define arginfo_oci_collection_append_method                   NULL
-#define arginfo_oci_collection_element_get_method              NULL
-#define arginfo_oci_collection_assign_method                   NULL
-#define arginfo_oci_collection_size_method                             NULL
-#define arginfo_oci_collection_element_assign_method   NULL
-#define arginfo_oci_collection_max_method                              NULL
-#define arginfo_oci_collection_trim_method                             NULL
-#define arginfo_oci_collection_free_method                             NULL
-/* }}} */
-#endif /* defined(ZEND_ENGINE_2) || defined(ZEND_ENGINE_3) */
-
 /* {{{ extension function prototypes
 */
 PHP_FUNCTION(oci_bind_by_name);
@@ -839,12 +719,7 @@ PHP_FUNCTION(oci_collection_trim);
 
 /* {{{ extension definition structures
 */
-static
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 2) || (PHP_MAJOR_VERSION > 5)
-/* This "if" allows PECL builds from this file to be portable to older PHP releases */
-const
-#endif
-zend_function_entry php_oci_functions[] = {
+static const zend_function_entry php_oci_functions[] = {
        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)
@@ -970,19 +845,10 @@ zend_function_entry php_oci_functions[] = {
        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)
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 3 && PHP_RELEASE_VERSION >= 7) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4) || (PHP_MAJOR_VERSION > 5)
        PHP_FE_END
-#else
-       {NULL,NULL,NULL}
-#endif
 };
 
-static
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 2) || (PHP_MAJOR_VERSION > 5)
-/* This "if" allows PECL builds from this file to be portable to older PHP releases */
-const
-#endif
-zend_function_entry php_oci_lob_class_functions[] = {
+static const zend_function_entry php_oci_lob_class_functions[] = {
        PHP_FALIAS(load,                oci_lob_load,                   arginfo_oci_lob_load_method)
        PHP_FALIAS(tell,                oci_lob_tell,                   arginfo_oci_lob_tell_method)
        PHP_FALIAS(truncate,    oci_lob_truncate,               arginfo_oci_lob_truncate_method)
@@ -1005,19 +871,10 @@ zend_function_entry php_oci_lob_class_functions[] = {
        PHP_FALIAS(save,                oci_lob_save,                   arginfo_oci_lob_save_method)
        PHP_FALIAS(savefile,    oci_lob_import,                 arginfo_oci_lob_import_method)
        PHP_FALIAS(free,                oci_free_descriptor,    arginfo_oci_free_descriptor_method)
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 3 && PHP_RELEASE_VERSION >= 7) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4) || (PHP_MAJOR_VERSION > 5)
        PHP_FE_END
-#else
-       {NULL,NULL,NULL}
-#endif
 };
 
-static
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 2) || (PHP_MAJOR_VERSION > 5)
-/* This "if" allows PECL builds from this file to be portable to older PHP releases */
-const
-#endif
-zend_function_entry php_oci_coll_class_functions[] = {
+static const zend_function_entry php_oci_coll_class_functions[] = {
        PHP_FALIAS(append,                oci_collection_append,                        arginfo_oci_collection_append_method)
        PHP_FALIAS(getelem,               oci_collection_element_get,           arginfo_oci_collection_element_get_method)
        PHP_FALIAS(assignelem,    oci_collection_element_assign,        arginfo_oci_collection_element_assign_method)
@@ -1026,11 +883,7 @@ zend_function_entry php_oci_coll_class_functions[] = {
        PHP_FALIAS(max,                   oci_collection_max,                           arginfo_oci_collection_max_method)
        PHP_FALIAS(trim,                  oci_collection_trim,                          arginfo_oci_collection_trim_method)
        PHP_FALIAS(free,                  oci_free_collection,                          arginfo_oci_collection_free_method)
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 3 && PHP_RELEASE_VERSION >= 7) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4) || (PHP_MAJOR_VERSION > 5)
        PHP_FE_END
-#else
-       {NULL,NULL,NULL}
-#endif
 };
 
 zend_module_entry oci8_module_entry = {
@@ -1053,12 +906,12 @@ zend_module_entry oci8_module_entry = {
 
 /* {{{ PHP_INI */
 PHP_INI_BEGIN()
-       STD_PHP_INI_ENTRY(      "oci8.max_persistent",                  "-1",   PHP_INI_SYSTEM, ONUPDATELONGFUNC,       max_persistent,                 zend_oci_globals,       oci_globals)
-       STD_PHP_INI_ENTRY(      "oci8.persistent_timeout",              "-1",   PHP_INI_SYSTEM, ONUPDATELONGFUNC,       persistent_timeout,             zend_oci_globals,       oci_globals)
-       STD_PHP_INI_ENTRY(      "oci8.ping_interval",                   "60",   PHP_INI_SYSTEM, ONUPDATELONGFUNC,       ping_interval,                  zend_oci_globals,       oci_globals)
+       STD_PHP_INI_ENTRY(      "oci8.max_persistent",                  "-1",   PHP_INI_SYSTEM, OnUpdateLong,   max_persistent,                 zend_oci_globals,       oci_globals)
+       STD_PHP_INI_ENTRY(      "oci8.persistent_timeout",              "-1",   PHP_INI_SYSTEM, OnUpdateLong,   persistent_timeout,             zend_oci_globals,       oci_globals)
+       STD_PHP_INI_ENTRY(      "oci8.ping_interval",                   "60",   PHP_INI_SYSTEM, OnUpdateLong,   ping_interval,                  zend_oci_globals,       oci_globals)
        STD_PHP_INI_BOOLEAN("oci8.privileged_connect",          "0",    PHP_INI_SYSTEM, OnUpdateBool,           privileged_connect,             zend_oci_globals,       oci_globals)
-       STD_PHP_INI_ENTRY(      "oci8.statement_cache_size",    "20",   PHP_INI_SYSTEM, ONUPDATELONGFUNC,       statement_cache_size,   zend_oci_globals,       oci_globals)
-       STD_PHP_INI_ENTRY(      "oci8.default_prefetch",                "100",  PHP_INI_SYSTEM, ONUPDATELONGFUNC,       default_prefetch,               zend_oci_globals,       oci_globals)
+       STD_PHP_INI_ENTRY(      "oci8.statement_cache_size",    "20",   PHP_INI_SYSTEM, OnUpdateLong,   statement_cache_size,   zend_oci_globals,       oci_globals)
+       STD_PHP_INI_ENTRY(      "oci8.default_prefetch",                "100",  PHP_INI_SYSTEM, OnUpdateLong,   default_prefetch,               zend_oci_globals,       oci_globals)
        STD_PHP_INI_BOOLEAN("oci8.old_oci_close_semantics",     "0",    PHP_INI_SYSTEM, OnUpdateBool,           old_oci_close_semantics,zend_oci_globals,       oci_globals)
 #if (OCI_MAJOR_VERSION >= 11)
        STD_PHP_INI_ENTRY(      "oci8.connection_class",                "",             PHP_INI_ALL,    OnUpdateString,         connection_class,               zend_oci_globals,       oci_globals)
@@ -1378,9 +1231,9 @@ PHP_MINFO_FUNCTION(oci)
 
        php_info_print_table_start();
        php_info_print_table_header(2, "Statistics", "");
-       snprintf(buf, sizeof(buf), "%pd", OCI_G(num_persistent));
+       snprintf(buf, sizeof(buf), ZEND_LONG_FMT, OCI_G(num_persistent));
        php_info_print_table_row(2, "Active Persistent Connections", buf);
-       snprintf(buf, sizeof(buf), "%pd", OCI_G(num_links));
+       snprintf(buf, sizeof(buf), ZEND_LONG_FMT, OCI_G(num_links));
        php_info_print_table_row(2, "Active Connections", buf);
        php_info_print_table_end();
 }
@@ -1809,7 +1662,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
        ub2 charsetid_nls_lang = 0;
 
        if (session_mode & ~(OCI_SYSOPER | OCI_SYSDBA | PHP_OCI_CRED_EXT)) {
-               php_error_docref(NULL, E_WARNING, "Invalid session mode specified (%pd)", session_mode);
+               php_error_docref(NULL, E_WARNING, "Invalid session mode specified (" ZEND_LONG_FMT ")", session_mode);
                return NULL;
        }
        if (session_mode & (OCI_SYSOPER | OCI_SYSDBA | PHP_OCI_CRED_EXT)) {
@@ -1839,13 +1692,6 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
                                php_error_docref(NULL, E_WARNING, "Privileged connect is disabled. Enable oci8.privileged_connect to be able to connect as SYSOPER or SYSDBA");
                                return NULL;
                        }
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || (PHP_MAJOR_VERSION < 5)
-                       /* Safe mode has been removed in PHP 5.4 */
-                       if (PG(safe_mode)) {
-                               php_error_docref(NULL, E_WARNING, "Privileged connect is disabled in Safe Mode");
-                               return NULL;
-                       }
-#endif
                }
        }
 
@@ -2084,7 +1930,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
 
                        if (OCI_G(max_persistent) != -1 && OCI_G(num_persistent) >= OCI_G(max_persistent)) {
                                /* all persistent connactions are in use, fallback to non-persistent connection creation */
-                               php_error_docref(NULL, E_NOTICE, "Too many open persistent connections (%pd)", OCI_G(num_persistent));
+                               php_error_docref(NULL, E_NOTICE, "Too many open persistent connections (" ZEND_LONG_FMT ")", OCI_G(num_persistent));
                                alloc_non_persistent = 1;
                        }
                }
index f78f03727d266fbdbe10f5adf1364fddddeebdbe..bb8828b74656acb7cb854daba65ca5e132b5628b 100644 (file)
@@ -240,32 +240,16 @@ PHP_FUNCTION(oci_lob_import)
        size_t filename_len;
 
        if (getThis()) {
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5)
                if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &filename, &filename_len) == FAILURE) {
-#else
-               if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &filename, &filename_len) == FAILURE) {
-#endif
                        return;
                }
        }
        else {
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5)
                if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &z_descriptor, oci_lob_class_entry_ptr, &filename, &filename_len) == FAILURE) {
-#else
-               if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &z_descriptor, oci_lob_class_entry_ptr, &filename, &filename_len) == FAILURE) {
-#endif
                        return;
                }       
        }
 
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || (PHP_MAJOR_VERSION < 5)
-       /* The "p" parsing parameter handles this case in PHP 5.4+ */
-       if (strlen(filename) != filename_len) {
-               php_error_docref(NULL, E_WARNING, "Filename cannot contain null bytes");
-               RETURN_FALSE;  
-       }
-#endif
-
        if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
                php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
                RETURN_FALSE;
@@ -899,11 +883,7 @@ PHP_FUNCTION(oci_lob_export)
        ub4 lob_length;
 
        if (getThis()) {
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5)
                if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|ll", &filename, &filename_len, &start, &length) == FAILURE) {
-#else
-               if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|ll", &filename, &filename_len, &start, &length) == FAILURE) {
-#endif
                        return;
                }
        
@@ -917,11 +897,7 @@ PHP_FUNCTION(oci_lob_export)
                }
        }
        else {
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5)
                if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op|ll", &z_descriptor, oci_lob_class_entry_ptr, &filename, &filename_len, &start, &length) == FAILURE) {
-#else
-               if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|ll", &z_descriptor, oci_lob_class_entry_ptr, &filename, &filename_len, &start, &length) == FAILURE) {
-#endif
                        return;
                }
                        
@@ -935,14 +911,6 @@ PHP_FUNCTION(oci_lob_export)
                }
        }
 
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || (PHP_MAJOR_VERSION < 5)
-       /* The "p" parsing parameter handles this case in PHP 5.4+ */
-       if (strlen(filename) != filename_len) {
-               php_error_docref(NULL, E_WARNING, "Filename cannot contain null bytes");
-               RETURN_FALSE;  
-       }
-#endif
-
        if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
                php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
                RETURN_FALSE;
@@ -971,22 +939,11 @@ PHP_FUNCTION(oci_lob_export)
                RETURN_FALSE;
        }
 
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || (PHP_MAJOR_VERSION < 5)
-       /* Safe mode has been removed in PHP 5.4 */
-       if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
-               RETURN_FALSE;
-       }
-#endif
-
        if (php_check_open_basedir(filename)) {
                RETURN_FALSE;
        }
 
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5)
        stream = php_stream_open_wrapper_ex(filename, "w", REPORT_ERRORS, NULL, NULL);
-#else
-       stream = php_stream_open_wrapper_ex(filename, "w", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, NULL);
-#endif
 
        block_length = PHP_OCI_LOB_BUFFER_SIZE;
        if (block_length > length) {
@@ -1989,14 +1946,6 @@ PHP_FUNCTION(oci_password_change)
        size_t user_len, pass_old_len, pass_new_len, dbname_len;
        php_oci_connection *connection;
 
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || (PHP_MAJOR_VERSION < 5)
-       /* Safe mode has been removed in PHP 5.4 */
-       if (PG(safe_mode)) {
-               php_error_docref(NULL, E_WARNING, "is disabled in Safe Mode");
-               RETURN_FALSE;
-       }
-#endif
-
        if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "rsss", &z_connection, &user, &user_len, &pass_old, &pass_old_len, &pass_new, &pass_new_len) == SUCCESS) {
                PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection);
 
index d7b949ae13e80f11d9b13c2ed44247f0e33f9211..036b14efe8e985790fd68aa79e715b6c3e3283fb 100644 (file)
@@ -63,7 +63,7 @@ php_oci_descriptor *php_oci_lob_create (php_oci_connection *connection, zend_lon
                        /* these three are allowed */
                        break;
                default:
-                       php_error_docref(NULL, E_WARNING, "Unknown descriptor type %pd", type);
+                       php_error_docref(NULL, E_WARNING, "Unknown descriptor type " ZEND_LONG_FMT, type);
                        return NULL;
                        break;
        }
@@ -630,7 +630,7 @@ int php_oci_lob_flush(php_oci_descriptor *descriptor, zend_long flush_flag)
                        /* only these two are allowed */
                        break;
                default:
-                       php_error_docref(NULL, E_WARNING, "Invalid flag value: %pd", flush_flag);
+                       php_error_docref(NULL, E_WARNING, "Invalid flag value: " ZEND_LONG_FMT, flush_flag);
                        return 1;
                        break;
        }
@@ -716,12 +716,7 @@ int php_oci_lob_import (php_oci_descriptor *descriptor, char *filename)
        ub4 offset = 1;
        sword errstatus;
        
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5)
-       /* Safe mode has been removed in PHP 5.4 */
        if (php_check_open_basedir(filename)) {
-#else
-       if ((PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename)) {
-#endif
                return 1;
        }
        
@@ -914,7 +909,7 @@ int php_oci_lob_write_tmp (php_oci_descriptor *descriptor, zend_long type, char
                        /* only these two are allowed */
                        break;
                default:
-                       php_error_docref(NULL, E_WARNING, "Invalid temporary lob type: %pd", type);
+                       php_error_docref(NULL, E_WARNING, "Invalid temporary lob type: " ZEND_LONG_FMT, type);
                        return 1;
                        break;
        }
index 11bd2aab404f87e0af47ffad1c16e6406ba4ac47..6f5e559f79e4e315fb06dfb9c8413446bc10ac96 100644 (file)
@@ -1513,7 +1513,7 @@ php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAME
                convert_to_long(&tmp);
                column = php_oci_statement_get_column(statement, Z_LVAL(tmp), NULL, 0);
                if (!column) {
-                       php_error_docref(NULL, E_WARNING, "Invalid column index \"%pd\"", Z_LVAL(tmp));
+                       php_error_docref(NULL, E_WARNING, "Invalid column index \"" ZEND_LONG_FMT "\"", Z_LVAL(tmp));
                        zval_dtor(&tmp);
                        return NULL;
                }
@@ -1580,7 +1580,7 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t
        convert_to_array(var);
 
        if (maxlength < -1) {
-               php_error_docref(NULL, E_WARNING, "Invalid max length value (%pd)", maxlength);
+               php_error_docref(NULL, E_WARNING, "Invalid max length value (" ZEND_LONG_FMT ")", maxlength);
                return 1;
        }
        
@@ -1611,7 +1611,7 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t
                        bind = php_oci_bind_array_helper_date(var, max_table_length, statement->connection);
                        break;
                default:
-                       php_error_docref(NULL, E_WARNING, "Unknown or unsupported datatype given: %pd", type);
+                       php_error_docref(NULL, E_WARNING, "Unknown or unsupported datatype given: " ZEND_LONG_FMT, type);
                        return 1;
                        break;
        }