3 * Description of options with non-standard values, list of persistent options
4 * and validator assignments.
6 * By default data types are taken from config.default.php, here we define
7 * only allowed values for select fields and type overrides.
9 * @package phpMyAdmin-setup
10 * @author Piotr Przybylski <piotrprz@gmail.com>
11 * @license http://www.gnu.org/licenses/gpl.html GNU GPL 2.0
15 if (!defined('PHPMYADMIN')) {
22 require_once('./libraries/vendor_config.php');
26 // path to config file, relative to phpMyAdmin's root path
27 $cfg_db['_config_file_path'] = SETUP_CONFIG_FILE
;
31 * o array - select field, array contains allowed values
32 * o string - type override
34 * Use normal array, paths won't be expanded
36 $cfg_db['Servers'] = array(1 => array(
38 'connect_type' => array('tcp', 'socket'),
39 'extension' => array('mysql', 'mysqli'),
40 'auth_type' => array('config', 'http', 'signon', 'cookie'),
42 'order' => array('', 'deny,allow', 'allow,deny', 'explicit')),
43 'only_db' => 'array'));
44 $cfg_db['RecodingEngine'] = array('auto', 'iconv', 'recode');
45 $cfg_db['DefaultCharset'] = $GLOBALS['cfg']['AvailableCharsets'];
46 $cfg_db['OBGzip'] = array('auto', true, false);
47 $cfg_db['ShowTooltipAliasTB'] = array('nested', true, false);
48 $cfg_db['DisplayDatabasesList'] = array('auto', true, false);
49 $cfg_db['LeftLogoLinkWindow'] = array('main', 'new');
50 $cfg_db['LeftDefaultTabTable'] = array(
51 'tbl_structure.php', // fields list
52 'tbl_sql.php', // SQL form
53 'tbl_select.php', // search page
54 'tbl_change.php', // insert row page
55 'sql.php'); // browse page
56 $cfg_db['NavigationBarIconic'] = array(true, false, 'both');
57 $cfg_db['Order'] = array('ASC', 'DESC', 'SMART');
58 $cfg_db['ProtectBinary'] = array(false, 'blob', 'all');
59 $cfg_db['CharEditing'] = array('input', 'textarea');
60 $cfg_db['PropertiesIconic'] = array(true, false, 'both');
61 $cfg_db['DefaultTabServer'] = array(
62 'main.php', // the welcome page (recommended for multiuser setups)
63 'server_databases.php', // list of databases
64 'server_status.php', // runtime information
65 'server_variables.php', // MySQL server variables
66 'server_privileges.php', // user management
67 'server_processlist.php'); // process list
68 $cfg_db['DefaultTabDatabase'] = array(
69 'db_structure.php', // tables list
70 'db_sql.php', // SQL form
71 'db_search.php', // search query
72 'db_operations.php'); // operations on database
73 $cfg_db['DefaultTabTable'] = array(
74 'tbl_structure.php', // fields list
75 'tbl_sql.php', // SQL form
76 'tbl_select.php', // search page
77 'tbl_change.php', // insert row page
78 'sql.php'); // browse page
79 $cfg_db['QueryWindowDefTab'] = array(
81 'files', // Import files
82 'history', // SQL history
83 'full'); // All (SQL and SQL history)
84 $cfg_db['Import']['format'] = array(
87 'ldi', // CSV using LOAD DATA
89 $cfg_db['Import']['sql_compatibility'] = array(
90 'NONE', 'ANSI', 'DB2', 'MAXDB', 'MYSQL323', 'MYSQL40', 'MSSQL', 'ORACLE',
91 // removed; in MySQL 5.0.33, this produces exports that
92 // can't be read by POSTGRESQL (see our bug #1596328)
95 $cfg_db['Import']['ldi_local_option'] = array('auto', true, false);
96 $cfg_db['Export']['format'] = array('codegen', 'csv', 'excel', 'htmlexcel',
97 'htmlword', 'latex', 'ods', 'odt', 'pdf', 'sql', 'texytext', 'xls', 'xml',
99 $cfg_db['Export']['compression'] = array('none', 'zip', 'gzip', 'bzip2');
100 $cfg_db['Export']['charset'] = array_merge(array(''), $GLOBALS['cfg']['AvailableCharsets']);
103 * Config options which will be placed in config file even if they are set
104 * to their default values (use only full paths)
106 $persist_keys = array(
115 'Servers/1/extension',
116 'Servers/1/connect_type',
117 'Servers/1/auth_type',
119 'Servers/1/password');
122 * Default values overrides
123 * Use only full paths
125 $cfg_db['_overrides'] = array();
126 $cfg_db['_overrides']['Servers/1/extension'] = extension_loaded('mysqli')
127 ?
'mysqli' : 'mysql';
130 * Validator assignments (functions from validate.lib.php and 'validators'
131 * object in scripts.js)
132 * Use only full paths and form ids
134 $cfg_db['_validators'] = array(
135 'Server' => 'validate_server',
136 'Server_pmadb' => 'validate_pmadb',
137 'Servers/1/port' => 'validate_port_number',
138 'Servers/1/hide_db' => 'validate_regex',
139 'TrustedProxies' => 'validate_trusted_proxies',
140 'LoginCookieValidity' => 'validate_positive_number',
141 'LoginCookieStore' => 'validate_non_negative_number',
142 'QueryHistoryMax' => 'validate_positive_number',
143 'LeftFrameTableLevel' => 'validate_positive_number',
144 'MaxRows' => 'validate_positive_number',
145 'CharTextareaCols' => 'validate_positive_number',
146 'CharTextareaRows' => 'validate_positive_number',
147 'InsertRows' => 'validate_positive_number',
148 'ForeignKeyMaxLimit' => 'validate_positive_number',
149 'Import/skip_queries' => 'validate_non_negative_number');