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 #if ZEND_MODULE_API_NO >= 20050922
50 STANDARD_MODULE_HEADER_EX, NULL,
51 pdo_oci_deps,
52 #else
53 STANDARD_MODULE_HEADER,
54 #endif
55 "PDO_OCI",
56 pdo_oci_functions,
57 PHP_MINIT(pdo_oci),
58 PHP_MSHUTDOWN(pdo_oci),
59 NULL,
60 NULL,
61 PHP_MINFO(pdo_oci),
62 "1.0.1",
63 STANDARD_MODULE_PROPERTIES
64 };
65
66
67 #ifdef COMPILE_DL_PDO_OCI
68 ZEND_GET_MODULE(pdo_oci)
69 #endif
70
71 const ub4 PDO_OCI_INIT_MODE =
72 #if 0 && defined(OCI_SHARED)
73
74 OCI_SHARED
75 #else
76 OCI_DEFAULT
77 #endif
78 #ifdef OCI_OBJECT
79 |OCI_OBJECT
80 #endif
81 #ifdef ZTS
82 |OCI_THREADED
83 #endif
84 ;
85
86
87 OCIEnv *pdo_oci_Env = NULL;
88
89
90
91 PHP_MINIT_FUNCTION(pdo_oci)
92 {
93 php_pdo_register_driver(&pdo_oci_driver);
94
95 #if HAVE_OCIENVCREATE
96 OCIEnvCreate(&pdo_oci_Env, PDO_OCI_INIT_MODE, NULL, NULL, NULL, NULL, 0, NULL);
97 #else
98 OCIInitialize(PDO_OCI_INIT_MODE, NULL, NULL, NULL, NULL);
99 OCIEnvInit(&pdo_oci_Env, OCI_DEFAULT, 0, NULL);
100 #endif
101
102 return SUCCESS;
103 }
104
105
106
107
108 PHP_MSHUTDOWN_FUNCTION(pdo_oci)
109 {
110 php_pdo_unregister_driver(&pdo_oci_driver);
111 OCIHandleFree((dvoid*)pdo_oci_Env, OCI_HTYPE_ENV);
112 return SUCCESS;
113 }
114
115
116
117
118 PHP_MINFO_FUNCTION(pdo_oci)
119 {
120 php_info_print_table_start();
121 php_info_print_table_header(2, "PDO Driver for OCI 8 and later", "enabled");
122 php_info_print_table_end();
123 }
124
125
126
127
128
129
130
131
132
133