XOOPS  2.6.0
config.php
Go to the documentation of this file.
1 <?php
2 /*
3  You may not change or alter any portion of this comment or credits
4  of supporting developers from this source code or any supporting source code
5  which is considered copyrighted (c) material of the original comment or credit authors.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 */
11 
25 defined('XOOPS_INSTALL') or die('XOOPS Custom Installation die');
26 
27 $configs = array();
28 
29 // setup config site info
30 //$configs['db_types'] = array('mysql');
31 $available_pdo_drivers = \PDO::getAvailableDrivers();
32 $configs['db_types'] = array();
33 if (in_array('mysql', $available_pdo_drivers)) {
34  $configs['db_types']['pdo_mysql'] = array(
35  'desc' => 'PDO MySql Driver',
36  'type' => 'mysql',
37  'params' => 'dbname,host,user,password,port,unix_socket',
38  'ignoredb' => array('information_schema','test'),
39  );
40 }
41 if (in_array('sqlite', $available_pdo_drivers)) {
42  $configs['db_types']['pdo_sqlite'] = array(
43  'desc' => 'PDO Sqlite Driver (untested)',
44  'type' => 'sqlite',
45  'params' => 'path',
46  'ignoredb' => array(),
47  );
48 }
49 if (in_array('pgsql', $available_pdo_drivers)) {
50  $configs['db_types']['pdo_pgsql'] = array(
51  'desc' => 'PDO PostgreSql Driver (untested)',
52  'type' => 'pgsql',
53  'params' => 'dbname,host,user,password,port',
54  'ignoredb' => array(),
55  );
56 }
57 if (function_exists('oci_connect')) {
58  $configs['db_types']['oci8'] = array(
59  'desc' => 'Oracle OCI8 Driver (untested)',
60  'type' => 'oci',
61  'params' => 'dbname,host,user,password,port,service,pooled',
62  'ignoredb' => array(),
63  );
64 }
65 if (in_array('oci', $available_pdo_drivers)) {
66  $configs['db_types']['pdo_oci'] = array(
67  'desc' => 'PDO Oracle Driver (untested)',
68  'type' => 'oci',
69  'params' => 'dbname,host,user,password,port,service',
70  'ignoredb' => array(),
71  );
72 }
73 if (function_exists('db2_connect')) {
74  $configs['db_types']['ibm_db2'] = array(
75  'desc' => 'IBM DB2 Driver (untested)',
76  'type' => 'db2',
77  'params' => 'dbname,host,user,password,protocol,port',
78  'ignoredb' => array(),
79  );
80 }
81 if (in_array('sqlsrv', $available_pdo_drivers)) {
82  $configs['db_types']['pdo_sqlsrv'] = array(
83  'desc' => 'PDO SqlServer Driver (untested)',
84  'type' => 'sqlsrv',
85  'params' => 'dbname,host,user,password,port',
86  'ignoredb' => array(),
87  );
88 }
89 if (function_exists('sqlsrv_connect')) {
90  $configs['db_types']['sqlsrv'] = array(
91  'desc' => 'SqlServer Driver (untested)',
92  'type' => 'sqlsrv',
93  'params' => 'dbname,host,user,password,port',
94  'ignoredb' => array(),
95  );
96 }
97 if (function_exists('mysqli_connect')) {
98  $configs['db_types']['mysqli'] = array(
99  'desc' => 'Mysqli Driver (untested)',
100  'type' => 'mysql',
101  'params' => 'dbname,host,user,password,port,unix_socket',
102  'ignoredb' => array('information_schema','test'),
103  );
104 }
105 
106 
107 $configs['db_param_names'] = array(
108  'host' => 'DB_HOST',
109  'user' => 'DB_USER',
110  'password' => 'DB_PASS',
111  'port' => 'DB_PORT',
112  'unix_socket' => 'DB_SOCK',
113  'path' => 'DB_PATH',
114  'service' => 'DB_SERVICE',
115  'pooled' => 'DB_POOLED',
116  'protocol'=>'DB_PROTOCOL',
117  'protocol'=>'DB_PROTOCOL',
118  'dbname'=>'DB_NAME',
119 );
120 
121 $configs['db_param_types'] = array(
122  'host' => 'string',
123  'user' => 'string',
124  'password' => 'password',
125  'port' => 'string',
126  'unix_socket' => 'string',
127  'path' => 'string',
128  'service' => 'boolean',
129  'pooled' => 'boolean',
130  'protocol'=>'string',
131  'dbname'=>'string',
132 );
133 
134 $configs['conf_names'] = array(
135  'sitename', 'slogan', 'allow_register', 'meta_keywords', 'meta_description', 'meta_author', 'meta_copyright',
136 );
137 
138 // extension_loaded
139 $configs['extensions'] = array(
140  'mbstring' => array('MBString', sprintf(PHP_EXTENSION, CHAR_ENCODING)),
141  'iconv' => array('Iconv', sprintf(PHP_EXTENSION, ICONV_CONVERSION)),
142  'xml' => array('XML', sprintf(PHP_EXTENSION, XML_PARSING)),
143  'zlib' => array('Zlib', sprintf(PHP_EXTENSION, ZLIB_COMPRESSION)),
144  'gd' => array(
145  (function_exists('gd_info') && $gdlib = @gd_info()) ? 'GD ' . $gdlib['GD Version'] : '',
147  ),
148  'exif' => array('Exif', sprintf(PHP_EXTENSION, IMAGE_METAS)),
149  'curl' => array('Curl', sprintf(PHP_EXTENSION, CURL_HTTP)),
150 );
151 
152 // Writable files and directories
153 $configs['writable'] = array(
154  'uploads/',
155 // 'uploads/avatars/',
156  'uploads/images/',
157  'uploads/ranks/',
158  'uploads/smilies/',
159 // 'uploads/banners/',
160 // 'mainfile.php'
161 );
162 
163 // Modules to be installed by default
164 $configs['modules'] = array(
165  'banners',
166  'page',
167  'search',
168  'userconfigs',
169 );
170 
171 // Extensions to be installed by default
172 $configs['ext'] = array(
173  'avatars',
174  'comments',
175  'debugbar',
176  'images',
177  'mailusers',
178  'maintenance',
179  'menus',
180  'notifications',
181  'protector',
182  'smilies',
183  'thumbs',
184  'xmf',
185 );
186 
187 // xoops_lib, xoops_data directories
188 $configs['xoopsPathDefault'] = array(
189  'lib' => 'xoops_lib',
190  'data' => 'xoops_data',
191 );
192 
193 // writable xoops_lib, xoops_data directories
194 $configs['dataPath'] = array(
195  'caches' => array(
196  'xoops_cache', 'smarty_cache', 'smarty_compile',
197  ),
198  'configs' => null,
199  'data' => null
200 );
const PHP_EXTENSION
Definition: install.php:24
$available_pdo_drivers
Definition: config.php:31
const IMAGE_FUNCTIONS
Definition: install.php:183
const CHAR_ENCODING
Definition: install.php:25
const ICONV_CONVERSION
Definition: install.php:181
const ZLIB_COMPRESSION
Definition: install.php:182
$configs
Definition: config.php:27
const IMAGE_METAS
Definition: install.php:184
const CURL_HTTP
Definition: install.php:185
const XML_PARSING
Definition: install.php:26
if(!$helper)