This source file includes following definitions.
- PHP_MINIT_FUNCTION
- PHP_MSHUTDOWN_FUNCTION
- PHP_MINFO_FUNCTION
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #ifdef HAVE_CONFIG_H
22 #include "config.h"
23 #endif
24
25 #include "php.h"
26 #include "php_ini.h"
27 #include "ext/standard/info.h"
28 #include "pdo/php_pdo.h"
29 #include "pdo/php_pdo_driver.h"
30 #include "php_pdo_oci.h"
31 #include "php_pdo_oci_int.h"
32
33
34 const zend_function_entry pdo_oci_functions[] = {
35 PHP_FE_END
36 };
37
38
39
40
41 #if ZEND_MODULE_API_NO >= 20050922
42 static const zend_module_dep pdo_oci_deps[] = {
43 ZEND_MOD_REQUIRED("pdo")
44 ZEND_MOD_END
45 };
46 #endif
47
48 zend_module_entry pdo_oci_module_entry = {
49 STANDARD_MODULE_HEADER_EX, NULL,
50 pdo_oci_deps,
51 "PDO_OCI",
52 pdo_oci_functions,
53 PHP_MINIT(pdo_oci),
54 PHP_MSHUTDOWN(pdo_oci),
55 NULL,
56 NULL,
57 PHP_MINFO(pdo_oci),
58 PHP_PDO_OCI_VERSION,
59 STANDARD_MODULE_PROPERTIES
60 };
61
62
63 #ifdef COMPILE_DL_PDO_OCI
64 ZEND_GET_MODULE(pdo_oci)
65 #endif
66
67 const ub4 PDO_OCI_INIT_MODE =
68 #if 0 && defined(OCI_SHARED)
69
70 OCI_SHARED
71 #else
72 OCI_DEFAULT
73 #endif
74 #ifdef OCI_OBJECT
75 |OCI_OBJECT
76 #endif
77 #ifdef ZTS
78 |OCI_THREADED
79 #endif
80 ;
81
82
83 OCIEnv *pdo_oci_Env = NULL;
84
85
86
87 PHP_MINIT_FUNCTION(pdo_oci)
88 {
89 php_pdo_register_driver(&pdo_oci_driver);
90
91 #if HAVE_OCIENVCREATE
92 OCIEnvCreate(&pdo_oci_Env, PDO_OCI_INIT_MODE, NULL, NULL, NULL, NULL, 0, NULL);
93 #else
94 OCIInitialize(PDO_OCI_INIT_MODE, NULL, NULL, NULL, NULL);
95 OCIEnvInit(&pdo_oci_Env, OCI_DEFAULT, 0, NULL);
96 #endif
97
98 return SUCCESS;
99 }
100
101
102
103
104 PHP_MSHUTDOWN_FUNCTION(pdo_oci)
105 {
106 php_pdo_unregister_driver(&pdo_oci_driver);
107 OCIHandleFree((dvoid*)pdo_oci_Env, OCI_HTYPE_ENV);
108 return SUCCESS;
109 }
110
111
112
113
114 PHP_MINFO_FUNCTION(pdo_oci)
115 {
116 php_info_print_table_start();
117 php_info_print_table_header(2, "PDO Driver for OCI 8 and later", "enabled");
118 php_info_print_table_end();
119 }
120
121
122
123
124
125
126
127
128
129