Merge remote-tracking branch 'origin/QA_4_0' into QA_4_0
[phpmyadmin.git] / doc / config.rst
blob9624a965917cfdb4e36415157f44d311a69bc211
1 .. index:: config.inc.php
3 .. _config:
5 Configuration
6 =============
8 Almost all configurable data is placed in :file:`config.inc.php`. If this file
9 does not exist, please refer to the :ref:`setup` section to create one. This
10 file only needs to contain the parameters you want to change from their
11 corresponding default value in :file:`libraries/config.default.php`.
13 The parameters which relate to design (like colors) are placed in
14 :file:`themes/themename/layout.inc.php`. You might also want to create
15 :file:`config.footer.inc.php` and :file:`config.header.inc.php` files to add
16 your site specific code to be included on start and end of each page.
18 .. note::
20     Some distributions (eg. Debian or Ubuntu) store :file:`config.inc.php` in
21     ``/etc/phpmyadmin`` instead of within phpMyAdmin sources.
23 .. warning::
25     :term:`Mac` users should note that if you are on a version before
26     :term:`Mac OS X`, PHP does not seem to
27     like :term:`Mac` end of lines character (``\r``). So
28     ensure you choose the option that allows to use the \*nix end of line
29     character (``\n``) in your text editor before saving a script you have
30     modified.
32 Basic settings
33 --------------
35 .. config:option:: $cfg['PmaAbsoluteUri']
37     :type: string
38     :default: ``''``
40     Sets here the complete :term:`URL` (with full path) to your phpMyAdmin
41     installation's directory. E.g.
42     ``http://www.example.net/path_to_your_phpMyAdmin_directory/``.  Note also
43     that the :term:`URL` on some web servers are case–sensitive. Don’t forget
44     the trailing slash at the end.
46     Starting with version 2.3.0, it is advisable to try leaving this blank. In
47     most cases phpMyAdmin automatically detects the proper setting. Users of
48     port forwarding will need to set :config:option:`$cfg['PmaAbsoluteUri']`
49     (`more info <https://sourceforge.net/p/phpmyadmin/support-requests/795/>`_).
51     A good test is to browse a table, edit a row and save it. There should be
52     an error message if phpMyAdmin is having trouble auto–detecting the correct
53     value. If you get an error that this must be set or if the autodetect code
54     fails to detect your path, please post a bug report on our bug tracker so
55     we can improve the code.
57     .. seealso:: :ref:`faq1_40`
59 .. config:option:: $cfg['PmaNoRelation_DisableWarning']
61     :type: boolean
62     :default: false
64     Starting with version 2.3.0 phpMyAdmin offers a lot of features to
65     work with master / foreign – tables (see :config:option:`$cfg['Servers'][$i]['pmadb']`).  
66     
67     If you tried to set this
68     up and it does not work for you, have a look on the :guilabel:`Structure` page
69     of one database where you would like to use it. You will find a link
70     that will analyze why those features have been disabled.
71     
72     If you do not want to use those features set this variable to ``true`` to
73     stop this message from appearing.
75 .. config:option:: $cfg['SuhosinDisableWarning']
77     :type: boolean
78     :default: false
80     A warning is displayed on the main page if Suhosin is detected. 
81     
82     You can set this parameter to ``true`` to stop this message from appearing.
84 .. config:option:: $cfg['McryptDisableWarning']
86     :type: boolean
87     :default: false
89     Disable the default warning that is displayed if mcrypt is missing for
90     cookie authentication. 
91     
92     You can set this parameter to ``true`` to stop this message from appearing.
94 .. config:option:: $cfg['ServerLibraryDifference_DisableWarning']
96     :type: boolean
97     :default: false
99     A warning is displayed on the main page if there is a difference
100     between the MySQL library and server version. 
101     
102     You can set this parameter to ``true`` to stop this message from appearing.
104 .. config:option:: $cfg['ReservedWordDisableWarning']
106     :type: boolean
107     :default: false
109     This warning is displayed on the Structure page of a table if one or more
110     column names match with words which are MySQL reserved.
112     If you want to turn off this warning, you can set it to ``true`` and 
113     warning will not longer be displayed 
115 .. config:option:: $cfg['TranslationWarningThreshold']
117     :type: integer
118     :default: 80
120     Show warning about incomplete translations on certain threshold.
122 .. config:option:: $cfg['AllowThirdPartyFraming']
124     :type: boolean
125     :default: false
126     
127     Setting this to ``true`` allows phpMyAdmin to be included inside a frame,
128     and is a potential security hole allowing cross-frame scripting attacks or
129     clickjacking.
131 Server connection settings
132 --------------------------
134 .. config:option:: $cfg['Servers']
136     :type: array
137     :default: one server array with settings listed bellow
139     Since version 1.4.2, phpMyAdmin supports the administration of multiple
140     MySQL servers. Therefore, a :config:option:`$cfg['Servers']`-array has been
141     added which contains the login information for the different servers. The
142     first :config:option:`$cfg['Servers'][$i]['host']` contains the hostname of
143     the first server, the second :config:option:`$cfg['Servers'][$i]['host']`
144     the hostname of the second server, etc. In
145     :file:`libraries/config.default.php`, there is only one section for server
146     definition, however you can put as many as you need in
147     :file:`config.inc.php`, copy that block or needed parts (you don't have to
148     define all settings, just those you need to change).
150     .. note::
151        
152         The :config:option:`$cfg['Servers']` array starts with
153         $cfg['Servers'][1]. Do not use $cfg['Servers'][0]. If you want more
154         than one server, just copy following section (including $i
155         incrementation) serveral times. There is no need to define full server
156         array, just define values you need to change.
159 .. config:option:: $cfg['Servers'][$i]['host']
161     :type: string
162     :default: ``'localhost'``
164     The hostname or :term:`IP` address of your $i-th MySQL-server. E.g.
165     ``localhost``.
167     Possible values are:
169     * hostname, e.g., ``'localhost'`` or ``'mydb.example.org'``
170     * IP address, e.g., ``'127.0.0.1'`` or ``'192.168.10.1'``
171     * dot - ``'.'``, i.e., use named pipes on windows systems
172     * empty - ``''``, disables this server
174 .. config:option:: $cfg['Servers'][$i]['port']
176     :type: string
177     :default: ``''``
179     The port-number of your $i-th MySQL-server. Default is 3306 (leave
180     blank). 
181     
182     .. note::
183        
184        If you use ``localhost`` as the hostname, MySQL ignores this port number
185        and connects with the socket, so if you want to connect to a port
186        different from the default port, use ``127.0.0.1`` or the real hostname
187        in :config:option:`$cfg['Servers'][$i]['host']`.
189 .. config:option:: $cfg['Servers'][$i]['socket']
191     :type: string
192     :default: ``''``
194     The path to the socket to use. Leave blank for default. To determine
195     the correct socket, check your MySQL configuration or, using the
196     :command:`mysql` command–line client, issue the ``status`` command. Among the
197     resulting information displayed will be the socket used.
199 .. config:option:: $cfg['Servers'][$i]['ssl']
201     :type: boolean
202     :default: false
204     Whether to enable SSL for connection to MySQL server.
206 .. config:option:: $cfg['Servers'][$i]['connect_type']
208     :type: string
209     :default: ``'tcp'``
211     What type connection to use with the MySQL server. Your options are
212     ``'socket'`` and ``'tcp'``. It defaults to tcp as that is nearly guaranteed
213     to be available on all MySQL servers, while sockets are not supported on
214     some platforms. To use the socket mode, your MySQL server must be on the
215     same machine as the Web server.
217 .. config:option:: $cfg['Servers'][$i]['extension']
219     :type: string
220     :default: ``'mysqli'``
222     What php MySQL extension to use for the connection. Valid options are:
224     ``mysql``
225         The classic MySQL extension. 
227     ``mysqli`` 
228         The improved MySQL extension. This extension became available with PHP
229         5.0.0 and is the recommended way to connect to a server running MySQL
230         4.1.x or newer.
232 .. config:option:: $cfg['Servers'][$i]['compress']
234     :type: boolean
235     :default: false
237     Whether to use a compressed protocol for the MySQL server connection
238     or not (experimental).
240 .. _controlhost:
241 .. config:option:: $cfg['Servers'][$i]['controlhost']
243     :type: string
244     :default: ``''``
246     Permits to use an alternate host to hold the configuration storage
247     data.
249 .. _controluser:
250 .. config:option:: $cfg['Servers'][$i]['controluser']
252     :type: string
253     :default: ``''``
255 .. config:option:: $cfg['Servers'][$i]['controlpass']
257     :type: string
258     :default: ``''``
260     This special account is used for 2 distinct purposes: to make possible all
261     relational features (see :config:option:`$cfg['Servers'][$i]['pmadb']`) and,
262     for a MySQL server running with ``--skip-show-database``, to enable a
263     multi-user installation (:term:`HTTP` or cookie
264     authentication mode). 
266     When using :term:`HTTP` or
267     cookie authentication modes (or 'config' authentication mode since phpMyAdmin
268     2.2.1), you need to supply the details of a MySQL account that has ``SELECT``
269     privilege on the *mysql.user (all columns except "Password")*, *mysql.db (all
270     columns)* and *mysql.tables\_priv (all columns except "Grantor" and
271     "Timestamp")* tables. This account is used to check what databases the user
272     will see at login.
274     .. versionchanged:: 2.2.5 
275         those were called ``stduser`` and ``stdpass``
277     .. seealso:: :ref:`setup`, :ref:`authentication_modes`
279 .. config:option:: $cfg['Servers'][$i]['auth_type']
281     :type: string
282     :default: ``'cookie'``
284     Whether config or cookie or :term:`HTTP` or signon authentication should be
285     used for this server.
287     * 'config' authentication (``$auth_type = 'config'``) is the plain old
288       way: username and password are stored in :file:`config.inc.php`.
289     * 'cookie' authentication mode (``$auth_type = 'cookie'``) as
290       introduced in 2.2.3 allows you to log in as any valid MySQL user with
291       the help of cookies. Username and password are stored in cookies
292       during the session and password is deleted when it ends. This can also
293       allow you to log in in arbitrary server if :config:option:`$cfg['AllowArbitraryServer']` enabled.
294     * 'http' authentication (was
295       called 'advanced' in previous versions and can be written also as
296       'http') (``$auth_type = 'http';'``) as introduced in 1.3.0 allows you to log in as any
297       valid MySQL user via HTTP-Auth.
298     * 'signon' authentication mode (``$auth_type = 'signon'``) as
299       introduced in 2.10.0 allows you to log in from prepared PHP session
300       data or using supplied PHP script. This is useful for implementing
301       single signon from another application. Sample way how to seed session
302       is in signon example: :file:`examples/signon.php`. There is also
303       alternative example using OpenID - :file:`examples/openid.php` and example
304       for scripts based solution - :file:`examples/signon-script.php`. You need
305       to configure :config:option:`$cfg['Servers'][$i]['SignonSession']` or 
306       :config:option:`$cfg['Servers'][$i]['SignonScript']` and 
307       :config:option:`$cfg['Servers'][$i]['SignonURL']` to use this authentication 
308       method.
310     .. seealso:: :ref:`authentication_modes`
312 .. _servers_auth_http_realm:
313 .. config:option:: $cfg['Servers'][$i]['auth_http_realm']
315     :type: string
316     :default: ``''``
318     When using auth\_type = ``http``, this field allows to define a custom
319     :term:`HTTP` Basic Auth Realm which will be displayed to the user. If not
320     explicitly specified in your configuration, a string combined of
321     "phpMyAdmin " and either :config:option:`$cfg['Servers'][$i]['verbose']` or
322     :config:option:`$cfg['Servers'][$i]['host']` will be used.
324 .. _servers_auth_swekey_config:
325 .. config:option:: $cfg['Servers'][$i]['auth_swekey_config']
327     :type: string
328     :default: ``''``
330     The name of the file containing :ref:`swekey` ids and login names for hardware
331     authentication. Leave empty to deactivate this feature.
333 .. _servers_user:
334 .. config:option:: $cfg['Servers'][$i]['user']
336     :type: string
337     :default: ``'root'``
339 .. config:option:: $cfg['Servers'][$i]['password']
341     :type: string
342     :default: ``''``
344     When using :config:option:`$cfg['Servers'][$i]['auth_type']` set to
345     'config', this is the user/password-pair which phpMyAdmin will use to
346     connect to the MySQL server. This user/password pair is not needed when
347     :term:`HTTP` or cookie authentication is used
348     and should be empty.
350 .. _servers_nopassword:
351 .. config:option:: $cfg['Servers'][$i]['nopassword']
353     :type: boolean
354     :default: false
356     Allow attempt to log in without password when a login with password
357     fails. This can be used together with http authentication, when
358     authentication is done some other way and phpMyAdmin gets user name
359     from auth and uses empty password for connecting to MySQL. Password
360     login is still tried first, but as fallback, no password method is
361     tried.
363 .. _servers_only_db:
364 .. config:option:: $cfg['Servers'][$i]['only_db']
366     :type: string or array
367     :default: ``''``
369     If set to a (an array of) database name(s), only this (these)
370     database(s) will be shown to the user. Since phpMyAdmin 2.2.1,
371     this/these database(s) name(s) may contain MySQL wildcards characters
372     ("\_" and "%"): if you want to use literal instances of these
373     characters, escape them (I.E. use ``'my\_db'`` and not ``'my_db'``).
375     This setting is an efficient way to lower the server load since the
376     latter does not need to send MySQL requests to build the available
377     database list. But **it does not replace the privileges rules of the
378     MySQL database server**. If set, it just means only these databases
379     will be displayed but **not that all other databases can't be used.**
381     An example of using more that one database:
383     .. code-block:: php
384         
385         $cfg['Servers'][$i]['only_db'] = array('db1', 'db2');
387     .. versionchanged:: 4.0.0 
388         Previous versions permitted to specify the display order of 
389         the database names via this directive. 
391 .. config:option:: $cfg['Servers'][$i]['hide_db']
393     :type: string
394     :default: ``''``
396     Regular expression for hiding some databases from unprivileged users.
397     This only hides them from listing, but a user is still able to access
398     them (using, for example, the SQL query area). To limit access, use
399     the MySQL privilege system.  For example, to hide all databases
400     starting with the letter "a", use
402     .. code-block:: php
404         $cfg['Servers'][$i]['hide_db'] = '^a';
406     and to hide both "db1" and "db2" use
408     .. code-block:: php
410         $cfg['Servers'][$i]['hide_db'] = '^(db1|db2)$';
412     More information on regular expressions can be found in the `PCRE
413     pattern syntax
414     <http://php.net/manual/en/reference.pcre.pattern.syntax.php>`_ portion
415     of the PHP reference manual.
417 .. config:option:: $cfg['Servers'][$i]['verbose']
419     :type: string
420     :default: ``''``
422     Only useful when using phpMyAdmin with multiple server entries. If
423     set, this string will be displayed instead of the hostname in the
424     pull-down menu on the main page. This can be useful if you want to
425     show only certain databases on your system, for example. For HTTP
426     auth, all non-US-ASCII characters will be stripped.
428 .. config:option:: $cfg['Servers'][$i]['pmadb']
430     :type: string
431     :default: ``''``
433     The name of the database containing the phpMyAdmin configuration
434     storage.  
436     See the :ref:`linked-tables`  section in this document to see the benefits of
437     this feature, and for a quick way of creating this database and the needed
438     tables.  
440     If you are the only user of this phpMyAdmin installation, you can use your
441     current database to store those special tables; in this case, just put your
442     current database name in :config:option:`$cfg['Servers'][$i]['pmadb']`. For a
443     multi-user installation, set this parameter to the name of your central
444     database containing the phpMyAdmin configuration storage.
446 .. _bookmark:
447 .. config:option:: $cfg['Servers'][$i]['bookmarktable']
449     :type: string
450     :default: ``''``
452     Since release 2.2.0 phpMyAdmin allows users to bookmark queries. This
453     can be useful for queries you often run. To allow the usage of this
454     functionality:
456     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
457     * enter the table name in :config:option:`$cfg['Servers'][$i]['bookmarktable']`
460 .. _relation:
461 .. config:option:: $cfg['Servers'][$i]['relation']
463     :type: string
464     :default: ``''``
466     Since release 2.2.4 you can describe, in a special 'relation' table,
467     which column is a key in another table (a foreign key). phpMyAdmin
468     currently uses this to
470     * make clickable, when you browse the master table, the data values that
471       point to the foreign table;
472     * display in an optional tool-tip the "display column" when browsing the
473       master table, if you move the mouse to a column containing a foreign
474       key (use also the 'table\_info' table); (see :ref:`faqdisplay`)
475     * in edit/insert mode, display a drop-down list of possible foreign keys
476       (key value and "display column" are shown) (see :ref:`faq6_21`)
477     * display links on the table properties page, to check referential
478       integrity (display missing foreign keys) for each described key;
479     * in query-by-example, create automatic joins (see :ref:`faq6_6`)
480     * enable you to get a :term:`PDF` schema of
481       your database (also uses the table\_coords table).
483     The keys can be numeric or character. 
485     To allow the usage of this functionality:
487     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
488     * put the relation table name in :config:option:`$cfg['Servers'][$i]['relation']`
489     * now as normal user open phpMyAdmin and for each one of your tables
490       where you want to use this feature, click :guilabel:`Structure/Relation view/`
491       and choose foreign columns.
493     .. note:: 
494        
495         In the current version, ``master_db`` must be the same as ``foreign_db``.
496         Those columns have been put in future development of the cross-db
497         relations.
499 .. _table_info:
500 .. config:option:: $cfg['Servers'][$i]['table_info']
502     :type: string
503     :default: ``''``
505     Since release 2.3.0 you can describe, in a special 'table\_info'
506     table, which column is to be displayed as a tool-tip when moving the
507     cursor over the corresponding key. This configuration variable will
508     hold the name of this special table. To allow the usage of this
509     functionality:
511     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
512     * put the table name in :config:option:`$cfg['Servers'][$i]['table\_info']` (e.g.
513       ``pma__table_info``)
514     * then for each table where you want to use this feature, click
515       "Structure/Relation view/Choose column to display" to choose the
516       column.
518     .. seealso:: :ref:`faqdisplay`
520 .. _table_coords:
521 .. config:option:: $cfg['Servers'][$i]['table_coords']
523     :type: string
524     :default: ``''``
526 .. config:option:: $cfg['Servers'][$i]['pdf_pages']
528     :type: string
529     :default: ``''``
531     Since release 2.3.0 you can have phpMyAdmin create :term:`PDF` pages
532     showing the relations between your tables. To do this it needs two tables
533     "pdf\_pages" (storing information about the available :term:`PDF` pages)
534     and "table\_coords" (storing coordinates where each table will be placed on
535     a :term:`PDF` schema output).  You must be using the "relation" feature. 
537     To allow the usage of this functionality:
539     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
540     * put the correct table names in
541       :config:option:`$cfg['Servers'][$i]['table\_coords']` and
542       :config:option:`$cfg['Servers'][$i]['pdf\_pages']`
544     .. seealso:: :ref:`faqpdf`.
546 .. _col_com:
547 .. config:option:: $cfg['Servers'][$i]['column_info']
549     :type: string
550     :default: ``''``
552     This part requires a content update!  Since release 2.3.0 you can
553     store comments to describe each column for each table. These will then
554     be shown on the "printview". 
556     Starting with release 2.5.0, comments are consequently used on the table
557     property pages and table browse view, showing up as tool-tips above the
558     column name (properties page) or embedded within the header of table in
559     browse view. They can also be shown in a table dump. Please see the
560     relevant configuration directives later on. 
562     Also new in release 2.5.0 is a MIME- transformation system which is also
563     based on the following table structure. See :ref:`transformations` for
564     further information. To use the MIME- transformation system, your
565     column\_info table has to have the three new columns 'mimetype',
566     'transformation', 'transformation\_options'.
569     To allow the usage of this functionality:
571     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
572     * put the table name in :config:option:`$cfg['Servers'][$i]['column\_info']` (e.g.
573       ``pma__column_info``)
574     * to update your PRE-2.5.0 Column\_comments Table use this:  and
575       remember that the Variable in :file:`config.inc.php` has been renamed from
576       :config:option:`$cfg['Servers'][$i]['column\_comments']` to
577       :config:option:`$cfg['Servers'][$i]['column\_info']`
579       .. code-block:: mysql
581            ALTER TABLE `pma__column_comments`
582            ADD `mimetype` VARCHAR( 255 ) NOT NULL,
583            ADD `transformation` VARCHAR( 255 ) NOT NULL,
584            ADD `transformation_options` VARCHAR( 255 ) NOT NULL;
586 .. _history:
587 .. config:option:: $cfg['Servers'][$i]['history']
589     :type: string
590     :default: ``''``
592     Since release 2.5.0 you can store your :term:`SQL` history, which means all
593     queries you entered manually into the phpMyAdmin interface. If you don't
594     want to use a table-based history, you can use the JavaScript-based
595     history. 
597     Using that, all your history items are deleted when closing the window.
598     Using :config:option:`$cfg['QueryHistoryMax']` you can specify an amount of
599     history items you want to have on hold. On every login, this list gets cut
600     to the maximum amount.
602     The query history is only available if JavaScript is enabled in
603     your browser. 
605     To allow the usage of this functionality:
607     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
608     * put the table name in :config:option:`$cfg['Servers'][$i]['history']` (e.g.
609       ``pma__history``)
611 .. _recent:
612 .. config:option:: $cfg['Servers'][$i]['recent']
614     :type: string
615     :default: ``''``
617     Since release 3.5.0 you can show recently used tables in the
618     navigation panel. It helps you to jump across table directly, without
619     the need to select the database, and then select the table. Using
620     :config:option:`$cfg['NumRecentTables']` you can configure the maximum number
621     of recent tables shown. When you select a table from the list, it will jump to
622     the page specified in :config:option:`$cfg['NavigationTreeDefaultTabTable']`.
625     Without configuring the storage, you can still access the recently used tables,
626     but it will disappear after you logout. 
628     To allow the usage of this functionality persistently:
630     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
631     * put the table name in :config:option:`$cfg['Servers'][$i]['recent']` (e.g.
632       ``pma__recent``)
634 .. _table_uiprefs:
635 .. config:option:: $cfg['Servers'][$i]['table_uiprefs']
637     :type: string
638     :default: ``''``
640     Since release 3.5.0 phpMyAdmin can be configured to remember several
641     things (sorted column :config:option:`$cfg['RememberSorting']`, column order,
642     and column visibility from a database table) for browsing tables. Without
643     configuring the storage, these features still can be used, but the values will
644     disappear after you logout. 
646     To allow the usage of these functionality persistently:
648     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
649     * put the table name in :config:option:`$cfg['Servers'][$i]['table\_uiprefs']` (e.g.
650       ``pma__table_uiprefs``)
653 .. _tracking:
654 .. config:option:: $cfg['Servers'][$i]['tracking']
656     :type: string
657     :default: ``''``
659     Since release 3.3.x a tracking mechanism is available. It helps you to
660     track every :term:`SQL` command which is
661     executed by phpMyAdmin. The mechanism supports logging of data
662     manipulation and data definition statements. After enabling it you can
663     create versions of tables.  
665     The creation of a version has two effects:
667     * phpMyAdmin saves a snapshot of the table, including structure and
668       indexes.
669     * phpMyAdmin logs all commands which change the structure and/or data of
670       the table and links these commands with the version number.
672     Of course you can view the tracked changes. On the :guilabel:`Tracking`
673     page a complete report is available for every version. For the report you
674     can use filters, for example you can get a list of statements within a date
675     range. When you want to filter usernames you can enter \* for all names or
676     you enter a list of names separated by ','. In addition you can export the
677     (filtered) report to a file or to a temporary database.
679     To allow the usage of this functionality:
681     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
682     * put the table name in :config:option:`$cfg['Servers'][$i]['tracking']` (e.g.
683       ``pma__tracking``)
686 .. _tracking2:
687 .. config:option:: $cfg['Servers'][$i]['tracking_version_auto_create']
689     :type: boolean
690     :default: false
692     Whether the tracking mechanism creates versions for tables and views
693     automatically.
695     If this is set to true and you create a table or view with
697     * CREATE TABLE ...
698     * CREATE VIEW ...
700     and no version exists for it, the mechanism will create a version for
701     you automatically.
703 .. _tracking3:
704 .. config:option:: $cfg['Servers'][$i]['tracking_default_statements']
706     :type: string
707     :default: ``'CREATE TABLE,ALTER TABLE,DROP TABLE,RENAME TABLE,CREATE INDEX,DROP INDEX,INSERT,UPDATE,DELETE,TRUNCATE,REPLACE,CREATE VIEW,ALTER VIEW,DROP VIEW,CREATE DATABASE,ALTER DATABASE,DROP DATABASE'``
709     Defines the list of statements the auto-creation uses for new
710     versions. 
712 .. _tracking4:
713 .. config:option:: $cfg['Servers'][$i]['tracking_add_drop_view']
715     :type: boolean
716     :default: true
718     Whether a DROP VIEW IF EXISTS statement will be added as first line to
719     the log when creating a view.
721 .. _tracking5:
722 .. config:option:: $cfg['Servers'][$i]['tracking_add_drop_table']
724     :type: boolean
725     :default: true
727     Whether a DROP TABLE IF EXISTS statement will be added as first line
728     to the log when creating a table.
730 .. _tracking6:
731 .. config:option:: $cfg['Servers'][$i]['tracking_add_drop_database']
733     :type: boolean
734     :default: true
736     Whether a DROP DATABASE IF EXISTS statement will be added as first
737     line to the log when creating a database.
739 .. _userconfig:
740 .. config:option:: $cfg['Servers'][$i]['userconfig']
742     :type: string
743     :default: ``''``
745     Since release 3.4.x phpMyAdmin allows users to set most preferences by
746     themselves and store them in the database.
748     If you don't allow for storing preferences in
749     :config:option:`$cfg['Servers'][$i]['pmadb']`, users can still personalize
750     phpMyAdmin, but settings will be saved in browser's local storage, or, it
751     is is unavailable, until the end of session.  
753     To allow the usage of this functionality:
755     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
756     * put the table name in :config:option:`$cfg['Servers'][$i]['userconfig']`
760 .. _designer_coords:
761 .. config:option:: $cfg['Servers'][$i]['designer_coords']
763     :type: string
764     :default: ``''``
766     Since release 2.10.0 a Designer interface is available; it permits to
767     visually manage the relations.  
769     To allow the usage of this functionality:
771     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
772     * put the table name in :config:option:`$cfg['Servers'][$i]['designer\_coords']`
773       (e.g. ``pma__designer_coords``)
777 .. config:option:: $cfg['Servers'][$i]['MaxTableUiprefs']
779     :type: integer
780     :default: 100
782     Maximum number of rows saved in
783     :config:option:`$cfg['Servers'][$i]['table_uiprefs']` table. 
785     When tables are dropped or renamed,
786     :config:option:`$cfg['Servers'][$i]['table_uiprefs']` may contain invalid data
787     (referring to tables which no longer exist). We only keep this number of newest
788     rows in :config:option:`$cfg['Servers'][$i]['table_uiprefs']` and automatically
789     delete older rows.
791 .. config:option:: $cfg['Servers'][$i]['AllowRoot']
793     :type: boolean
794     :default: true
796     Whether to allow root access. This is just a shortcut for the
797     :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` below.
799 .. config:option:: $cfg['Servers'][$i]['AllowNoPassword']
801     :type: boolean
802     :default: false
804     Whether to allow logins without a password. The default value of
805     ``false`` for this parameter prevents unintended access to a MySQL
806     server with was left with an empty password for root or on which an
807     anonymous (blank) user is defined.
809 .. _servers_allowdeny_order:
810 .. config:option:: $cfg['Servers'][$i]['AllowDeny']['order']
812     :type: string
813     :default: ``''``
815     If your rule order is empty, then :term:`IP`
816     authorization is disabled. 
818     If your rule order is set to
819     ``'deny,allow'`` then the system applies all deny rules followed by
820     allow rules. Access is allowed by default. Any client which does not
821     match a Deny command or does match an Allow command will be allowed
822     access to the server. 
824     If your rule order is set to ``'allow,deny'``
825     then the system applies all allow rules followed by deny rules. Access
826     is denied by default. Any client which does not match an Allow
827     directive or does match a Deny directive will be denied access to the
828     server. 
830     If your rule order is set to ``'explicit'``, authorization is
831     performed in a similar fashion to rule order 'deny,allow', with the
832     added restriction that your host/username combination **must** be
833     listed in the *allow* rules, and not listed in the *deny* rules. This
834     is the **most** secure means of using Allow/Deny rules, and was
835     available in Apache by specifying allow and deny rules without setting
836     any order. 
838     Please also see :config:option:`$cfg['TrustedProxies']` for
839     detecting IP address behind proxies.
841 .. _servers_allowdeny_rules:
842 .. config:option:: $cfg['Servers'][$i]['AllowDeny']['rules']
844     :type: array of strings
845     :default: array()
847     The general format for the rules is as such:
849     .. code-block:: none
850         
851         <'allow' | 'deny'> <username> [from] <ipmask>
853     If you wish to match all users, it is possible to use a ``'%'`` as a
854     wildcard in the *username* field.
856     There are a few shortcuts you can
857     use in the *ipmask* field as well (please note that those containing
858     SERVER\_ADDRESS might not be available on all webservers):
860     .. code-block:: none
862         
863         'all' -> 0.0.0.0/0
864         'localhost' -> 127.0.0.1/8
865         'localnetA' -> SERVER_ADDRESS/8
866         'localnetB' -> SERVER_ADDRESS/16
867         'localnetC' -> SERVER_ADDRESS/24
869     Having an empty rule list is equivalent to either using ``'allow %
870     from all'`` if your rule order is set to ``'deny,allow'`` or ``'deny %
871     from all'`` if your rule order is set to ``'allow,deny'`` or
872     ``'explicit'``.
874     For the :term:`IP address` matching
875     system, the following work: 
877     * ``xxx.xxx.xxx.xxx`` (an exact :term:`IP address`) 
878     * ``xxx.xxx.xxx.[yyy-zzz]`` (an :term:`IP address` range) 
879     * ``xxx.xxx.xxx.xxx/nn`` (CIDR, Classless Inter-Domain Routing type :term:`IP` addresses) 
881     But the following does not work: 
883     * ``xxx.xxx.xxx.xx[yyy-zzz]`` (partial :term:`IP` address range) 
885     For :term:`IPv6` addresses, the following work:
887     * ``xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx`` (an exact :term:`IPv6` address)
888     * ``xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:[yyyy-zzzz]`` (an :term:`IPv6` address range)
889     * ``xxxx:xxxx:xxxx:xxxx/nn`` (CIDR, Classless Inter-Domain Routing type :term:`IPv6` addresses)
891     But the following does not work:
893     * ``xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx[yyy-zzz]`` (partial :term:`IPv6` address range)
895 .. config:option:: $cfg['Servers'][$i]['DisableIS']
897     :type: boolean
898     :default: true
900     Disable using ``INFORMATION_SCHEMA`` to retrieve information (use
901     ``SHOW`` commands instead), because of speed issues when many
902     databases are present. Currently used in some parts of the code, more
903     to come.
905 .. config:option:: $cfg['Servers'][$i]['ShowDatabasesCommand']
907     :type: string
908     :default: ``'SHOW DATABASES'``
910     On a server with a huge number of databases, the default ``SHOW DATABASES``
911     command used to fetch the name of available databases will probably be too
912     slow, so it can be replaced by faster commands. You can use ``#user#``
913     string will be replaced by current user.
915     When using ``false``, it will disable fetching databases from the server,
916     only databases in :config:option:`$cfg['Servers'][$i]['only_db']` will be
917     displayed.
918     
919     Examples:
921     * ``'SHOW DATABASES'``
922     * ``"SHOW DATABASES LIKE '#user#\_%'"``
923     * ``'SELECT DISTINCT TABLE_SCHEMA FROM information_schema.SCHEMA_PRIVILEGES'``
924     * ``'SELECT SCHEMA_NAME FROM information_schema.SCHEMATA'``
925     * ``false``
927 .. config:option:: $cfg['Servers'][$i]['SignonScript']
929     :type: string
930     :default: ``''``
932     Name of PHP script to be sourced and executed to obtain login
933     credentials. This is alternative approach to session based single
934     signon. The script needs to provide function
935     ``get_login_credentials`` which returns list of username and
936     password, accepting single parameter of existing username (can be
937     empty). See :file:`examples/signon-script.php` for an example.
939 .. config:option:: $cfg['Servers'][$i]['SignonSession']
941     :type: string
942     :default: ``''``
944     Name of session which will be used for signon authentication method.
945     You should use something different than ``phpMyAdmin``, because this
946     is session which phpMyAdmin uses internally. Takes effect only if 
947     :config:option:`$cfg['Servers'][$i]['SignonScript']` is not configured.
949 .. config:option:: $cfg['Servers'][$i]['SignonURL']
951     :type: string
952     :default: ``''``
954     :term:`URL` where user will be redirected
955     to log in for signon authentication method. Should be absolute
956     including protocol.
958 .. config:option:: $cfg['Servers'][$i]['LogoutURL']
960     :type: string
961     :default: ``''``
963     :term:`URL` where user will be redirected
964     after logout (doesn't affect config authentication method). Should be
965     absolute including protocol.
967 .. config:option:: $cfg['Servers'][$i]['StatusCacheDatabases']
969     :type: array of strings
970     :default: array()
972     Enables caching of ``TABLE STATUS`` outputs for specific databases on
973     this server (in some cases ``TABLE STATUS`` can be very slow, so you
974     may want to cache it). APC is used (if the PHP extension is available,
975     if not, this setting is ignored silently). You have to provide 
976     :config:option:`$cfg['Servers'][$i]['StatusCacheLifetime']`. 
977     
978     Takes effect only if :config:option:`$cfg['Servers'][$i]['DisableIS']` is
979     ``true``.
981 .. config:option:: $cfg['Servers'][$i]['StatusCacheLifetime']
983     :type: integer
984     :default: 0
986     Lifetime in seconds of the ``TABLE STATUS`` cache if 
987     :config:option:`$cfg['Servers'][$i]['StatusCacheDatabases']` is used.
989 Generic settings
990 ----------------
992 .. config:option:: $cfg['ServerDefault']
994     :type: integer
995     :default: 1
997     If you have more than one server configured, you can set
998     :config:option:`$cfg['ServerDefault']` to any one of them to autoconnect to that
999     server when phpMyAdmin is started, or set it to 0 to be given a list
1000     of servers without logging in. 
1001     
1002     If you have only one server configured,
1003     :config:option:`$cfg['ServerDefault']` MUST be set to that server.
1005 .. config:option:: $cfg['VersionCheck']
1007     :type: boolean
1008     :default: true
1010     Enables check for latest versions using javascript on main phpMyAdmin
1011     page.
1013     .. note::
1015         This setting can be adjusted by your vendor.
1017 .. config:option:: $cfg['MaxDbList']
1019     :type: integer
1020     :default: 100
1022     The maximum number of database names to be displayed in the main panel's
1023     database list.
1025 .. config:option:: $cfg['MaxNavigationItems']
1027     :type: integer
1028     :default: 250
1030     The number of items that can be displayed on each page of the
1031     navigation tree.
1033 .. config:option:: $cfg['MaxTableList']
1035     :type: integer
1036     :default: 250
1038     The maximum number of table names to be displayed in the main panel's
1039     list (except on the Export page). This limit is also enforced in the
1040     navigation panel when in Light mode.
1042 .. config:option:: $cfg['ShowHint']
1044     :type: boolean
1045     :default: true
1047     Whether or not to show hints (for example, hints when hovering over
1048     table headers).
1050 .. config:option:: $cfg['MaxCharactersInDisplayedSQL']
1052     :type: integer
1053     :default: 1000
1055     The maximum number of characters when a :term:`SQL` query is displayed. The
1056     default limit of 1000 should be correct to avoid the display of tons of
1057     hexadecimal codes that represent BLOBs, but some users have real
1058     :term:`SQL` queries that are longer than 1000 characters. Also, if a
1059     query's length exceeds this limit, this query is not saved in the history.
1061 .. config:option:: $cfg['PersistentConnections']
1063     :type: boolean
1064     :default: false
1066     Whether `persistent connections <http://php.net/manual/en/features
1067     .persistent-connections.php>`_ should be used or not. Works with
1068     following extensions:
1070     * mysql (`mysql\_pconnect <http://php.net/manual/en/function.mysql-
1071       pconnect.php>`_),
1072     * mysqli (requires PHP 5.3.0 or newer, `more information
1073       <http://php.net/manual/en/mysqli.persistconns.php>`_).
1075 .. config:option:: $cfg['ForceSSL']
1077     :type: boolean
1078     :default: false
1080     Whether to force using https while accessing phpMyAdmin.
1082 .. config:option:: $cfg['ExecTimeLimit']
1084     :type: integer [number of seconds]
1085     :default: 300
1087     Set the number of seconds a script is allowed to run. If seconds is
1088     set to zero, no time limit is imposed. This setting is used while
1089     importing/exporting dump files but has
1090     no effect when PHP is running in safe mode.
1092 .. config:option:: $cfg['SessionSavePath']
1094     :type: string
1095     :default: ``''``
1097     Path for storing session data (`session\_save\_path PHP parameter
1098     <http://php.net/session_save_path>`_).
1100 .. config:option:: $cfg['MemoryLimit']
1102     :type: string [number of bytes]
1103     :default: ``'0'``
1105     Set the number of bytes a script is allowed to allocate. If set to
1106     zero, no limit is imposed. 
1107     
1108     This setting is used while importing/exporting dump files and at some other
1109     places in phpMyAdmin so you definitely don't want to put here a too low
1110     value. It has no effect when PHP is running in safe mode. 
1111     
1112     You can also use any string as in :file:`php.ini`, eg. '16M'. Ensure you
1113     don't omit the suffix (16 means 16 bytes!)
1115 .. config:option:: $cfg['SkipLockedTables']
1117     :type: boolean
1118     :default: false
1120     Mark used tables and make it possible to show databases with locked
1121     tables (since MySQL 3.23.30).
1123 .. config:option:: $cfg['ShowSQL']
1125     :type: boolean
1126     :default: true
1128     Defines whether :term:`SQL` queries
1129     generated by phpMyAdmin should be displayed or not.
1131 .. config:option:: $cfg['RetainQueryBox']
1133     :type: boolean
1134     :default: false
1136     Defines whether the :term:`SQL` query box
1137     should be kept displayed after its submission.
1139 .. config:option:: $cfg['CodemirrorEnable']
1141     :type: boolean
1142     :default: true
1144     Defines whether to use a Javascript code editor for SQL query boxes.
1145     CodeMirror provides syntax highlighting and line numbers.  However,
1146     middle-clicking for pasting the clipboard contents in some Linux
1147     distributions (such as Ubuntu) is not supported by all browsers.
1149 .. config:option:: $cfg['AllowUserDropDatabase']
1151     :type: boolean
1152     :default: false
1154     Defines whether normal users (non-administrator) are allowed to delete
1155     their own database or not. If set as false, the link :guilabel:`Drop
1156     Database` will not be shown, and even a ``DROP DATABASE mydatabase`` will
1157     be rejected. Quite practical for :term:`ISP` 's with many customers. 
1159     .. note:: 
1160        
1161         This limitation of :term:`SQL` queries is not
1162         as strict as when using MySQL privileges. This is due to nature of
1163         :term:`SQL` queries which might be quite
1164         complicated.  So this choice should be viewed as help to avoid accidental
1165         dropping rather than strict privilege limitation.
1167 .. config:option:: $cfg['Confirm']
1169     :type: boolean
1170     :default: true
1172     Whether a warning ("Are your really sure...") should be displayed when
1173     you're about to lose data.
1175 .. config:option:: $cfg['UseDbSearch']
1177     :type: boolean
1178     :default: true
1180     Define whether the "search string inside database" is enabled or not.
1182 .. config:option:: $cfg['IgnoreMultiSubmitErrors']
1184     :type: boolean
1185     :default: false
1187     Define whether phpMyAdmin will continue executing a multi-query
1188     statement if one of the queries fails. Default is to abort execution.
1190 Cookie authentication options
1191 -----------------------------
1193 .. config:option:: $cfg['blowfish_secret']
1195     :type: string
1196     :default: ``''``
1198     The "cookie" auth\_type uses blowfish algorithm to encrypt the
1199     password. If you are using the "cookie" auth\_type, enter here a
1200     random passphrase of your choice. It will be used internally by the
1201     blowfish algorithm: you won’t be prompted for this passphrase. There
1202     is no maximum length for this secret. 
1204     .. versionchanged:: 3.1.0
1205         Since version 3.1.0 phpMyAdmin can generate this on the fly, but it
1206         makes a bit weaker security as this generated secret is stored in
1207         session and furthermore it makes impossible to recall user name from
1208         cookie.
1210 .. config:option:: $cfg['LoginCookieRecall']
1212     :type: boolean
1213     :default: true
1215     Define whether the previous login should be recalled or not in cookie
1216     authentication mode. 
1217     
1218     This is automatically disabled if you do not have
1219     configured :config:option:`$cfg['blowfish_secret']`.
1221 .. config:option:: $cfg['LoginCookieValidity']
1223     :type: integer [number of seconds]
1224     :default: 1440
1226     Define how long a login cookie is valid. Please note that php
1227     configuration option `session.gc\_maxlifetime
1228     <http://php.net/manual/en/session.configuration.php#ini.session.gc-
1229     maxlifetime>`_ might limit session validity and if the session is lost,
1230     the login cookie is also invalidated. So it is a good idea to set
1231     ``session.gc_maxlifetime`` at least to the same value of
1232     :config:option:`$cfg['LoginCookieValidity']`.
1234 .. config:option:: $cfg['LoginCookieStore']
1236     :type: integer [number of seconds]
1237     :default: 0
1239     Define how long login cookie should be stored in browser. Default 0
1240     means that it will be kept for existing session. This is recommended
1241     for not trusted environments.
1243 .. config:option:: $cfg['LoginCookieDeleteAll']
1245     :type: boolean
1246     :default: true
1248     If enabled (default), logout deletes cookies for all servers,
1249     otherwise only for current one. Setting this to false makes it easy to
1250     forget to log out from other server, when you are using more of them.
1252 .. _AllowArbitraryServer:
1253 .. config:option:: $cfg['AllowArbitraryServer']
1255     :type: boolean
1256     :default: false
1258     If enabled, allows you to log in to arbitrary servers using cookie
1259     authentication.
1261     .. note::
1262        
1263         Please use this carefully, as this may allow users access to MySQL servers
1264         behind the firewall where your :term:`HTTP`
1265         server is placed.
1267 Navigation panel setup
1268 ----------------------
1270 .. config:option:: $cfg['NavigationTreeEnableGrouping']
1272     :type: boolean
1273     :default: true
1275     Defines whether to group the databases based on a common prefix
1276     in their name :config:option:`$cfg['NavigationTreeDbSeparator']`.
1278 .. config:option:: $cfg['NavigationTreeDbSeparator']
1280     :type: string or array
1281     :default: ``'_'``
1283     The string used to separate the parts of the database name when
1284     showing them in a tree. Alternatively you can specify more strings in
1285     an array and all of them will be used as a separator.
1287 .. config:option:: $cfg['NavigationTreeTableSeparator']
1289     :type: string or array
1290     :default: ``'__'``
1292     Defines a string to be used to nest table spaces. This means if you have
1293     tables like ``first__second__third`` this will be shown as a three-level
1294     hierarchy like: first > second > third.  If set to false or empty, the
1295     feature is disabled. NOTE: You should not use this separator at the
1296     beginning or end of a table name or multiple times after another without
1297     any other characters in between.
1299 .. config:option:: $cfg['NavigationTreeTableLevel']
1301     :type: integer
1302     :default: 1
1304     Defines how many sublevels should be displayed when splitting up
1305     tables by the above separator.
1307 .. config:option:: $cfg['NumRecentTables']
1309     :type: integer
1310     :default: 10
1312     The maximum number of recently used tables shown in the navigation
1313     panel. Set this to 0 (zero) to disable the listing of recent tables.
1315 .. config:option:: $cfg['NavigationDisplayLogo']
1317     :type: boolean
1318     :default: true
1320     Defines whether or not to display the phpMyAdmin logo at the top of
1321     the navigation panel.
1323 .. config:option:: $cfg['NavigationLogoLink']
1325     :type: string
1326     :default: ``'index.php'``
1328     Enter :term:`URL` where logo in the
1329     navigation panel will point to. For use especially with self made
1330     theme which changes this.
1332 .. config:option:: $cfg['NavigationLogoLinkWindow']
1334     :type: string
1335     :default: ``'main'``
1337     Whether to open the linked page in the main window (``main``) or in a
1338     new one (``new``). Note: use ``new`` if you are linking to
1339     ``phpmyadmin.net``.
1341 .. config:option:: $cfg['NavigationTreeDisplayItemFilterMinimum']
1343     :type: integer
1344     :default: 30
1346     Defines the minimum number of items (tables, views, routines and
1347     events) to display a JavaScript filter box above the list of items in
1348     the navigation tree. 
1349     
1350     To disable the filter completely some high number can be used (e.g. 9999)
1352 .. config:option:: $cfg['NavigationTreeDisplayDbFilterMinimum']
1354     :type: integer
1355     :default: 30
1357     Defines the minimum number of databases to display a JavaScript filter
1358     box above the list of databases in the navigation tree.
1359     
1360     To disable the filter completely some high number can be used
1361     (e.g. 9999)
1363 .. config:option:: $cfg['NavigationDisplayServers']
1365     :type: boolean
1366     :default: true 
1368     Defines whether or not to display a server choice at the top of the
1369     navigation panel.
1371 .. config:option:: $cfg['DisplayServersList']
1373     :type: boolean
1374     :default: false
1376     Defines whether to display this server choice as links instead of in a
1377     drop-down.
1379 .. config:option:: $cfg['NavigationTreeDefaultTabTable']
1381     :type: string
1382     :default: ``'tbl_structure.php'``
1384     Defines the tab displayed by default when clicking the small icon next
1385     to each table name in the navigation panel. Possible values:
1387     * ``tbl_structure.php``
1388     * ``tbl_sql.php``
1389     * ``tbl_select.php``
1390     * ``tbl_change.php``
1391     * ``sql.php``
1393 Main panel
1394 ----------
1396 .. config:option:: $cfg['ShowStats']
1398     :type: boolean
1399     :default: true
1401     Defines whether or not to display space usage and statistics about
1402     databases and tables. Note that statistics requires at least MySQL
1403     3.23.3 and that, at this date, MySQL doesn't return such information
1404     for Berkeley DB tables.
1406 .. config:option:: $cfg['ShowServerInfo']
1408     :type: boolean
1409     :default: true
1411     Defines whether to display detailed server information on main page.
1412     You can additionally hide more information by using 
1413     :config:option:`$cfg['Servers'][$i]['verbose']`.
1415 .. config:option:: $cfg['ShowPhpInfo']
1417     :type: boolean
1418     :default: false
1420 .. config:option:: $cfg['ShowChgPassword']
1422     :type: boolean
1423     :default: true
1425 .. config:option:: $cfg['ShowCreateDb']
1427     :type: boolean
1428     :default: true
1430     Defines whether to display the :guilabel:`PHP information` and
1431     :guilabel:`Change password` links and form for creating database or not at
1432     the starting main (right) frame. This setting does not check MySQL commands
1433     entered directly. 
1434     
1435     Please note that to block the usage of ``phpinfo()`` in scripts, you have to
1436     put this in your :file:`php.ini`:
1438     .. code-block:: ini
1440         disable_functions = phpinfo()
1442     Also note that enabling the :guilabel:`Change password` link has no effect
1443     with config authentication mode: because of the hard coded password value
1444     in the configuration file, end users can't be allowed to change their
1445     passwords.
1447 Database structure
1448 ------------------
1450 .. config:option:: $cfg['ShowDbStructureCreation']
1452     :type: boolean
1453     :default: false
1455     Defines whether the database structure page (tables list) has a
1456     "Creation" column that displays when each table was created.
1458 .. config:option:: $cfg['ShowDbStructureLastUpdate']
1460     :type: boolean
1461     :default: false
1463     Defines whether the database structure page (tables list) has a "Last
1464     update" column that displays when each table was last updated.
1466 .. config:option:: $cfg['ShowDbStructureLastCheck']
1468     :type: boolean
1469     :default: false
1471     Defines whether the database structure page (tables list) has a "Last
1472     check" column that displays when each table was last checked.
1474 .. config:option:: $cfg['HideStructureActions']
1476     :type: boolean
1477     :default: true
1479     Defines whether the table structure actions are hidden under a "More"
1480     drop-down.
1482 Browse mode
1483 -----------
1485 .. config:option:: $cfg['TableNavigationLinksMode']
1487     :type: string
1488     :default: ``'icons'``
1490     Defines whether the table navigation links contain ``'icons'``, ``'text'`` 
1491     or ``'both'``. 
1493 .. config:option:: $cfg['ShowAll']
1495     :type: boolean
1496     :default: false
1498     Defines whether a user should be displayed a "Show all" button in
1499     browse mode or not in all cases. By default it is shown only on small
1500     tables (less than 5 × :config:option:`$cfg['MaxRows']` rows) to avoid
1501     performance issues while getting too many rows.
1503 .. config:option:: $cfg['MaxRows']
1505     :type: integer
1506     :default: 30
1508     Number of rows displayed when browsing a result set and no LIMIT
1509     clause is used. If the result set contains more rows, "Previous" and
1510     "Next" links will be shown.
1512 .. config:option:: $cfg['Order']
1514     :type: string
1515     :default: ``'SMART'``
1517     Defines whether columns are displayed in ascending (``ASC``) order, in
1518     descending (``DESC``) order or in a "smart" (``SMART``) order - I.E.
1519     descending order for columns of type TIME, DATE, DATETIME and
1520     TIMESTAMP, ascending order else- by default.
1522 .. config:option:: $cfg['DisplayBinaryAsHex']
1524     :type: boolean
1525     :default: true
1527     Defines whether the "Show binary contents as HEX" browse option is
1528     ticked by default.
1530 .. config:option:: $cfg['GridEditing']
1532     :type: string
1533     :default: ``'double-click'``
1535     Defines which action (``double-click`` or ``click``) triggers grid
1536     editing. Can be deactived with the ``disabled`` value.
1538 .. config:option:: $cfg['SaveCellsAtOnce']
1540     :type: boolean
1541     :default: false
1543     Defines whether or not to save all edited cells at once for grid
1544     editing.
1546 Editing mode
1547 ------------
1549 .. config:option:: $cfg['ProtectBinary']
1551     :type: boolean or string
1552     :default: ``'blob'``
1554     Defines whether ``BLOB`` or ``BINARY`` columns are protected from
1555     editing when browsing a table's content. Valid values are:
1557     * ``false`` to allow editing of all columns;
1558     * ``'blob'`` to allow editing of all columns except ``BLOBS``;
1559     * ``'noblob'`` to disallow editing of all columns except ``BLOBS`` (the
1560       opposite of ``'blob'``);
1561     * ``'all'`` to disallow editing of all ``BINARY`` or ``BLOB`` columns.
1563 .. config:option:: $cfg['ShowFunctionFields']
1565     :type: boolean
1566     :default: true
1568     Defines whether or not MySQL functions fields should be initially
1569     displayed in edit/insert mode. Since version 2.10, the user can toggle
1570     this setting from the interface.
1572 .. config:option:: $cfg['ShowFieldTypesInDataEditView']
1574     :type: boolean
1575     :default: true
1577     Defines whether or not type fields should be initially displayed in
1578     edit/insert mode. The user can toggle this setting from the interface.
1580 .. config:option:: $cfg['InsertRows']
1582     :type: integer
1583     :default: 2
1585     Defines the maximum number of concurrent entries for the Insert page.
1587 .. config:option:: $cfg['ForeignKeyMaxLimit']
1589     :type: integer
1590     :default: 100
1592     If there are fewer items than this in the set of foreign keys, then a
1593     drop-down box of foreign keys is presented, in the style described by
1594     the :config:option:`$cfg['ForeignKeyDropdownOrder']` setting.
1596 .. config:option:: $cfg['ForeignKeyDropdownOrder']
1598     :type: array
1599     :default: array('content-id', 'id-content')
1601     For the foreign key drop-down fields, there are several methods of
1602     display, offering both the key and value data. The contents of the
1603     array should be one or both of the following strings: ``content-id``,
1604     ``id-content``.
1606 Export and import settings
1607 --------------------------
1609 .. config:option:: $cfg['ZipDump']
1611     :type: boolean
1612     :default: true
1614 .. config:option:: $cfg['GZipDump']
1616     :type: boolean
1617     :default: true
1619 .. config:option:: $cfg['BZipDump']
1621     :type: boolean
1622     :default: true
1624     Defines whether to allow the use of zip/GZip/BZip2 compression when
1625     creating a dump file
1627 .. config:option:: $cfg['CompressOnFly']
1629     :type: boolean
1630     :default: true
1632     Defines whether to allow on the fly compression for GZip/BZip2
1633     compressed exports. This doesn't affect smaller dumps and allows users
1634     to create larger dumps that won't otherwise fit in memory due to php
1635     memory limit. Produced files contain more GZip/BZip2 headers, but all
1636     normal programs handle this correctly.
1638 .. config:option:: $cfg['Export']
1640     :type: array
1641     :default: array(...)
1643     In this array are defined default parameters for export, names of
1644     items are similar to texts seen on export page, so you can easily
1645     identify what they mean.
1647 .. config:option:: $cfg['Export']['method']
1649     :type: string
1650     :default: ``'quick'``
1652     Defines how the export form is displayed when it loads. Valid values
1653     are:
1655     * ``quick`` to display the minimum number of options to configure
1656     * ``custom`` to display every available option to configure
1657     * ``custom-no-form`` same as ``custom`` but does not display the option
1658       of using quick export
1662 .. config:option:: $cfg['Import']
1664     :type: array
1665     :default: array(...)
1667     In this array are defined default parameters for import, names of
1668     items are similar to texts seen on import page, so you can easily
1669     identify what they mean.
1672 Tabs display settings
1673 ---------------------
1675 .. config:option:: $cfg['TabsMode']
1677     :type: string
1678     :default: ``'both'``
1680     Defines whether the menu tabs contain ``'icons'``, ``'text'`` or ``'both'``. 
1682 .. config:option:: $cfg['ActionLinksMode']
1684     :type: string
1685     :default: ``'both'``
1687     If set to ``icons``, will display icons instead of text for db and table
1688     properties links (like :guilabel:`Browse`, :guilabel:`Select`,
1689     :guilabel:`Insert`, ...). Can be set to ``'both'`` 
1690     if you want icons AND text. When set to ``text``, will only show text.
1692 .. config:option:: $cfg['PropertiesNumColumns']
1694     :type: integer
1695     :default: 1
1697     How many columns will be utilized to display the tables on the database
1698     property view? When setting this to a value larger than 1, the type of the
1699     database will be omitted for more display space.
1701 .. config:option:: $cfg['DefaultTabServer']
1703     :type: string
1704     :default: ``'index.php'``
1706     Defines the tab displayed by default on server view. Possible values:
1708     * ``main.php`` (recommended for multi-user setups)
1709     * ``server_databases.php``,
1710     * ``server_status.php``
1711     * ``server_variables.php``
1712     * ``server_privileges.php``
1714 .. config:option:: $cfg['DefaultTabDatabase']
1716     :type: string
1717     :default: ``'db_structure.php'``
1719     Defines the tab displayed by default on database view. Possible
1720     values: 
1721     
1722     * ``db_structure.php``
1723     * ``db_sql.php`` 
1724     * ``db_search.php``.
1726 .. config:option:: $cfg['DefaultTabTable']
1728     :type: string
1729     :default: ``'sql.php'``
1731     Defines the tab displayed by default on table view. Possible values:
1733     * ``tbl_structure.php``
1734     * ``tbl_sql.php``
1735     * ``tbl_select.php``
1736     * ``tbl_change.php`` 
1737     * ``sql.php``
1739 Documentation
1740 -------------
1742 .. config:option:: $cfg['MySQLManualBase']
1744     :type: string
1745     :default: ``'http://dev.mysql.com/doc/refman'``
1747     If set to an :term:`URL` which points to
1748     the MySQL documentation (type depends on
1749     :config:option:`$cfg['MySQLManualType']`), appropriate help links are
1750     generated. 
1752     See `MySQL Documentation page <http://dev.mysql.com/doc/>`_ for more
1753     information about MySQL manuals and their types.
1755 .. config:option:: $cfg['MySQLManualType']
1757     :type: string
1758     :default: ``'viewable'``
1760     Type of MySQL documentation:
1762     * viewable - "viewable online", current one used on MySQL website
1763     * searchable - "Searchable, with user comments"
1764     * chapters - "HTML, one page per chapter"
1765     * big - "HTML, all on one page"
1766     * none - do not show documentation links
1768 Languages
1769 ---------
1771 .. config:option:: $cfg['DefaultLang']
1773     :type: string
1774     :default: ``'en'``
1776     Defines the default language to use, if not browser-defined or user-
1777     defined. The corresponding language file needs to be in
1778     locale/*code*/LC\_MESSAGES/phpmyadmin.mo.
1780 .. config:option:: $cfg['DefaultConnectionCollation']
1782     :type: string
1783     :default: ``'utf8_general_ci'``
1785     Defines the default connection collation to use, if not user-defined.
1786     See the `MySQL documentation <http://dev.mysql.com/doc/mysql/en
1787     /charset-charsets.html>`_ for list of possible values. This setting is
1788     ignored when connected to Drizzle server.
1790 .. config:option:: $cfg['Lang']
1792     :type: string
1793     :default: not set
1795     Force language to use. The corresponding language file needs to be in
1796     locale/*code*/LC\_MESSAGES/phpmyadmin.mo.
1798 .. config:option:: $cfg['FilterLanguages']
1800     :type: string
1801     :default: ``''``
1803     Limit list of available languages to those matching the given regular
1804     expression. For example if you want only Czech and English, you should
1805     set filter to ``'^(cs|en)'``.
1807 .. config:option:: $cfg['RecodingEngine']
1809     :type: string
1810     :default: ``'auto'``
1812     You can select here which functions will be used for character set
1813     conversion. Possible values are:
1815     * auto - automatically use available one (first is tested iconv, then
1816       recode)
1817     * iconv - use iconv or libiconv functions
1818     * recode - use recode\_string function
1819     * none - disable encoding conversion
1821     Enabled charset conversion activates a pull-down menu in the Export
1822     and Import pages, to choose the character set when exporting a file.
1823     The default value in this menu comes from
1824     :config:option:`$cfg['Export']['charset']` and :config:option:`$cfg['Import']['charset']`.
1826 .. config:option:: $cfg['IconvExtraParams']
1828     :type: string
1829     :default: ``'//TRANSLIT'``
1831     Specify some parameters for iconv used in charset conversion. See
1832     `iconv documentation <http://www.gnu.org/software/libiconv/documentati
1833     on/libiconv/iconv_open.3.html>`_ for details. By default
1834     ``//TRANSLIT`` is used, so that invalid characters will be
1835     transliterated.
1837 .. config:option:: $cfg['AvailableCharsets']
1839     :type: array
1840     :default: array(..._
1842     Available character sets for MySQL conversion. You can add your own
1843     (any of supported by recode/iconv) or remove these which you don't
1844     use. Character sets will be shown in same order as here listed, so if
1845     you frequently use some of these move them to the top.
1847 Web server settings
1848 -------------------
1850 .. config:option:: $cfg['OBGzip']
1852     :type: string/boolean
1853     :default: ``'auto'``
1855     Defines whether to use GZip output buffering for increased speed in
1856     :term:`HTTP` transfers. Set to
1857     true/false for enabling/disabling. When set to 'auto' (string),
1858     phpMyAdmin tries to enable output buffering and will automatically
1859     disable it if your browser has some problems with buffering. IE6 with
1860     a certain patch is known to cause data corruption when having enabled
1861     buffering.
1863 .. config:option:: $cfg['TrustedProxies']
1865     :type: array
1866     :default: array()
1868     Lists proxies and HTTP headers which are trusted for 
1869     :config:option:`$cfg['Servers'][$i]['AllowDeny']['order']`. This list is by
1870     default empty, you need to fill in some trusted proxy servers if you
1871     want to use rules for IP addresses behind proxy. 
1873     The following example specifies that phpMyAdmin should trust a
1874     HTTP\_X\_FORWARDED\_FOR (``X -Forwarded-For``) header coming from the proxy
1875     1.2.3.4:
1877     .. code-block:: php
1878         
1879         $cfg['TrustedProxies'] = array('1.2.3.4' => 'HTTP_X_FORWARDED_FOR');
1881     The :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` directive uses the
1882     client's IP address as usual.
1884 .. config:option:: $cfg['GD2Available']
1886     :type: string
1887     :default: ``'auto'``
1889     Specifies whether GD >= 2 is available. If yes it can be used for MIME
1890     transformations. Possible values are:
1892     * auto - automatically detect
1893     * yes - GD 2 functions can be used
1894     * no - GD 2 function cannot be used
1896 .. config:option:: $cfg['CheckConfigurationPermissions']
1898     :type: boolean
1899     :default: true
1901     We normally check the permissions on the configuration file to ensure
1902     it's not world writable. However, phpMyAdmin could be installed on a
1903     NTFS filesystem mounted on a non-Windows server, in which case the
1904     permissions seems wrong but in fact cannot be detected. In this case a
1905     sysadmin would set this parameter to ``false``.
1907 .. config:option:: $cfg['LinkLengthLimit']
1909     :type: integer
1910     :default: 1000
1912     Limit for length of :term:`URL` in links.  When length would be above this
1913     limit, it is replaced by form with button. This is required as some web
1914     servers (:term:`IIS`) have problems with long :term:`URL` .
1916 .. config:option:: $cfg['CSPAllow']
1918     :type: string
1919     :default: ``''``
1921     Additional string to include in allowed script sources in Content Security
1922     Policy header.
1924     This can be useful when you want to include some external javascript files
1925     in :file:`config.footer.inc.php` or :file:`config.header.inc.php`, which
1926     would be normally not allowed by Content Security Policy.
1928 .. config:option:: $cfg['DisableMultiTableMaintenance']
1930     :type: boolean
1931     :default: false
1933     In the database Structure page, it's possible to mark some tables then
1934     choose an operation like optimizing for many tables. This can slow
1935     down a server; therefore, setting this to ``true`` prevents this kind
1936     of multiple maintenance operation.
1938 Theme settings
1939 --------------
1941 .. config:option:: $cfg['NaviWidth']
1943     :type: integer
1944     :default:
1946     Navigation panel width in pixels. See
1947     :file:`themes/themename/layout.inc.php`.
1949 .. config:option:: $cfg['NaviBackground']
1951     :type: string [CSS color for background]
1952     :default:
1954 .. config:option:: $cfg['MainBackground']
1956     :type: string [CSS color for background]
1957     :default:
1959     The background styles used for both the frames. See
1960     :file:`themes/themename/layout.inc.php`.
1962 .. config:option:: $cfg['NaviPointerBackground']
1964     :type: string [CSS color for background]
1965     :default:
1967 .. config:option:: $cfg['NaviPointerColor']
1969     :type: string [CSS color]
1970     :default:
1972     The style used for the pointer in the navi frame. See
1973     :file:`themes/themename/layout.inc.php`.
1975 .. config:option:: $cfg['Border']
1977     :type: integer
1978     :default:
1980     The size of a table's border. See :file:`themes/themename/layout.inc.php`.
1982 .. config:option:: $cfg['ThBackground']
1984     :type: string [CSS color for background]
1985     :default:
1987 .. config:option:: $cfg['ThColor']
1989     :type: string [CSS color]
1990     :default:
1992     The style used for table headers. See
1993     :file:`themes/themename/layout.inc.php`.
1995 .. _cfg_BgcolorOne:
1996 .. config:option:: $cfg['BgOne']
1998     :type: string [CSS color]
1999     :default:
2001     The color (HTML) #1 for table rows. See
2002     :file:`themes/themename/layout.inc.php`.
2004 .. _cfg_BgcolorTwo:
2005 .. config:option:: $cfg['BgTwo']
2007     :type: string [CSS color]
2008     :default:
2010     The color (HTML) #2 for table rows. See
2011     :file:`themes/themename/layout.inc.php`.
2013 .. config:option:: $cfg['BrowsePointerBackground']
2015     :type: string [CSS color]
2016     :default:
2018 .. config:option:: $cfg['BrowsePointerColor']
2020     :type: string [CSS color]
2021     :default:
2023 .. config:option:: $cfg['BrowseMarkerBackground']
2025     :type: string [CSS color]
2026     :default:
2028 .. config:option:: $cfg['BrowseMarkerColor']
2030     :type: string [CSS color]
2031     :default:
2033     The colors (HTML) uses for the pointer and the marker in browse mode.
2034     The former feature highlights the row over which your mouse is passing
2035     and the latter lets you visually mark/unmark rows by clicking on the
2036     corresponding checkbox. Highlighting / marking a column is done by
2037     hovering over / clicking the column's header (outside of the text).
2038     See :file:`themes/themename/layout.inc.php`.
2040 .. config:option:: $cfg['FontFamily']
2042     :type: string
2043     :default:
2045     You put here a valid CSS font family value, for example ``arial, sans-
2046     serif``. See :file:`themes/themename/layout.inc.php`.
2048 .. config:option:: $cfg['FontFamilyFixed']
2050     :type: string
2051     :default:
2053     You put here a valid CSS font family value, for example ``monospace``.
2054     This one is used in textarea. See :file:`themes/themename/layout.inc.php`.
2056 Design customization
2057 --------------------
2059 .. config:option:: $cfg['NavigationTreePointerEnable']
2061     :type: boolean
2062     :default: true
2064     A value of ``true`` activates the navi pointer.
2066 .. config:option:: $cfg['BrowsePointerEnable']
2068     :type: boolean
2069     :default: true
2071     Whether to activate the browse pointer or not.
2073 .. config:option:: $cfg['BrowseMarkerEnable']
2075     :type: boolean
2076     :default: true
2078     Whether to activate the browse marker or not.
2080 .. config:option:: $cfg['LimitChars']
2082     :type: integer
2083     :default: 50
2085     Maximum number of characters shown in any non-numeric field on browse
2086     view. Can be turned off by a toggle button on the browse page.
2088 .. config:option:: $cfg['RowActionLinks']
2090     :type: string
2091     :default: ``'left'``
2093     Defines the place where table row links (Edit, Copy, Delete) would be
2094     put when tables contents are displayed (you may have them displayed at
2095     the left side, right side, both sides or nowhere). "left" and "right"
2096     are parsed as "top" and "bottom" with vertical display mode.
2098 .. config:option:: $cfg['DefaultDisplay']
2100     :type: string
2101     :default: ``'horizonta'``
2103     There are 3 display modes: horizontal, horizontalflipped and vertical.
2104     Define which one is displayed by default. The first mode displays each
2105     row on a horizontal line, the second rotates the headers by 90
2106     degrees, so you can use descriptive headers even though columns only
2107     contain small values and still print them out. The vertical mode sorts
2108     each row on a vertical lineup.
2110 .. config:option:: $cfg['RememberSorting']
2112     :type: boolean
2113     :default: true
2115     If enabled, remember the sorting of each table when browsing them.
2117 .. config:option:: $cfg['HeaderFlipType']
2119     :type: string
2120     :default: ``'auto'``
2122     The HeaderFlipType can be set to 'auto', 'css' or 'fake'. When using
2123     'css' the rotation of the header for horizontalflipped is done via
2124     CSS. The CSS transformation currently works only in Internet
2125     Explorer.If set to 'fake' PHP does the transformation for you, but of
2126     course this does not look as good as CSS. The 'auto' option enables
2127     CSS transformation when browser supports it and use PHP based one
2128     otherwise.
2130 .. config:option:: $cfg['ShowBrowseComments']
2132     :type: boolean
2133     :default: true
2135 .. config:option:: $cfg['ShowPropertyComments']
2137     :type: boolean
2138     :default: true
2140     By setting the corresponding variable to ``true`` you can enable the
2141     display of column comments in Browse or Property display. In browse
2142     mode, the comments are shown inside the header. In property mode,
2143     comments are displayed using a CSS-formatted dashed-line below the
2144     name of the column. The comment is shown as a tool-tip for that
2145     column.
2147 Text fields
2148 -----------
2150 .. config:option:: $cfg['CharEditing']
2152     :type: string
2153     :default: ``'input'``
2155     Defines which type of editing controls should be used for CHAR and
2156     VARCHAR columns. Possible values are:
2158     * input - this allows to limit size of text to size of columns in MySQL,
2159       but has problems with newlines in columns
2160     * textarea - no problems with newlines in columns, but also no length
2161       limitations
2163 .. config:option:: $cfg['MinSizeForInputField']
2165     :type: integer
2166     :default: 4
2168     Defines the minimum size for input fields generated for CHAR and
2169     VARCHAR columns.
2171 .. config:option:: $cfg['MaxSizeForInputField']
2173     :type: integer
2174     :default: 60
2176     Defines the maximum size for input fields generated for CHAR and
2177     VARCHAR columns.
2179 .. config:option:: $cfg['TextareaCols']
2181     :type: integer
2182     :default: 40
2184 .. config:option:: $cfg['TextareaRows']
2186     :type: integer
2187     :default: 15
2189 .. config:option:: $cfg['CharTextareaCols']
2191     :type: integer
2192     :default: 40
2194 .. config:option:: $cfg['CharTextareaRows']
2196     :type: integer
2197     :default: 2
2199     Number of columns and rows for the textareas. This value will be
2200     emphasized (\*2) for :term:`SQL` query
2201     textareas and (\*1.25) for :term:`SQL`
2202     textareas inside the query window.
2204     The Char\* values are used for CHAR
2205     and VARCHAR editing (if configured via :config:option:`$cfg['CharEditing']`).
2207 .. config:option:: $cfg['LongtextDoubleTextarea']
2209     :type: boolean
2210     :default: true
2212     Defines whether textarea for LONGTEXT columns should have double size.
2214 .. config:option:: $cfg['TextareaAutoSelect']
2216     :type: boolean
2217     :default: false
2219     Defines if the whole textarea of the query box will be selected on
2220     click.
2223 SQL query box settings
2224 ----------------------
2226 .. config:option:: $cfg['SQLQuery']['Edit']
2228     :type: boolean
2229     :default: true
2231     Whether to display an edit link to change a query in any SQL Query
2232     box.
2234 .. config:option:: $cfg['SQLQuery']['Explain']
2236     :type: boolean
2237     :default: true
2239     Whether to display a link to explain a SELECT query in any SQL Query
2240     box.
2242 .. config:option:: $cfg['SQLQuery']['ShowAsPHP']
2244     :type: boolean
2245     :default: true
2247     Whether to display a link to wrap a query in PHP code in any SQL Query
2248     box.
2250 .. config:option:: $cfg['SQLQuery']['Validate']
2252     :type: boolean
2253     :default: false
2255     Whether to display a link to validate a query in any SQL Query box.
2257     .. seealso:: :config:option:`$cfg['SQLValidator']`
2259 .. config:option:: $cfg['SQLQuery']['Refresh']
2261     :type: boolean
2262     :default: true
2264     Whether to display a link to refresh a query in any SQL Query box.
2266 Web server upload/save/import directories
2267 -----------------------------------------
2269 .. config:option:: $cfg['UploadDir']
2271     :type: string
2272     :default: ``''``
2274     The name of the directory where :term:`SQL` files have been uploaded by
2275     other means than phpMyAdmin (for example, ftp). Those files are available
2276     under a drop-down box when you click the database or table name, then the
2277     Import tab. 
2279     If
2280     you want different directory for each user, %u will be replaced with
2281     username. 
2283     Please note that the file names must have the suffix ".sql"
2284     (or ".sql.bz2" or ".sql.gz" if support for compressed formats is
2285     enabled).
2287     This feature is useful when your file is too big to be
2288     uploaded via :term:`HTTP`, or when file
2289     uploads are disabled in PHP.
2291     .. note::
2292        
2293         If PHP is running in safe mode, this directory must be owned by the same
2294         user as the owner of the phpMyAdmin scripts.  See also :ref:`faq1_16` for
2295         alternatives.
2297 .. config:option:: $cfg['SaveDir']
2299     :type: string
2300     :default: ``''``
2302     The name of the directory where dumps can be saved. 
2304     If you want different directory for each user, %u will be replaced with
2305     username.
2307     Please note that the directory must exist and has to be writable for
2308     the user running webserver. 
2310     .. note:: 
2311        
2312         If PHP is running in safe mode, this directory must be owned by the same
2313         user as the owner of the phpMyAdmin scripts.
2315 .. config:option:: $cfg['TempDir']
2317     :type: string
2318     :default: ``''``
2320     The name of the directory where temporary files can be stored. 
2322     This is needed for importing ESRI Shapefiles, see :ref:`faq6_30` and to
2323     work around limitations of ``open_basedir`` for uploaded files, see
2324     :ref:`faq1_11`.  
2326     If the directory where phpMyAdmin is installed is
2327     subject to an ``open_basedir`` restriction, you need to create a
2328     temporary directory in some directory accessible by the web server.
2329     However for security reasons, this directory should be outside the
2330     tree published by webserver. If you cannot avoid having this directory
2331     published by webserver, place at least an empty :file:`index.html` file
2332     there, so that directory listing is not possible.
2334     This directory should have as strict permissions as possible as the only
2335     user required to access this directory is the one who runs the webserver.
2336     If you have root privileges, simply make this user owner of this directory
2337     and make it accessible only by it:
2339     .. code-block:: sh
2341         
2342         chown www-data:www-data tmp
2343         chmod 700 tmp
2345     If you cannot change owner of the directory, you can achieve a similar
2346     setup using :term:`ACL`:
2348     .. code-block:: sh
2350         chmod 700 tmp
2351         setfacl -m "g:www-data:rwx" tmp
2352         setfacl -d -m "g:www-data:rwx" tmp
2354     If neither of above works for you, you can still make the directory
2355     :command:`chmod 777`, but it might impose risk of other users on system
2356     reading and writing data in this directory.
2358 Various display setting
2359 -----------------------
2361 .. config:option:: $cfg['ShowDisplayDirection']
2363     :type: boolean
2364     :default: false
2366     Defines whether or not type display direction option is shown when
2367     browsing a table.
2369 .. config:option:: $cfg['RepeatCells']
2371     :type: integer
2372     :default: 100
2374     Repeat the headers every X cells, or 0 to deactivate.
2376 .. config:option:: $cfg['EditInWindow']
2378     :type: boolean
2379     :default: true
2381 .. config:option:: $cfg['QueryWindowWidth']
2383     :type: integer
2384     :default: 550
2386 .. config:option:: $cfg['QueryWindowHeight']
2388     :type: integer
2389     :default: 310
2391 .. config:option:: $cfg['QueryHistoryDB']
2393     :type: boolean
2394     :default: false
2396 .. config:option:: $cfg['QueryWindowDefTab']
2398     :type: string
2399     :default: ``'sql'``
2401 .. config:option:: $cfg['QueryHistoryMax']
2403     :type: integer
2404     :default: 25
2406     All those variables affect the query window feature. A :term:`SQL` link or
2407     icon is always displayed in the navigation panel. If JavaScript is enabled
2408     in your browser, a click on this opens a distinct query window, which is a
2409     direct interface to enter :term:`SQL` queries. Otherwise, the right panel
2410     changes to display a query box. 
2412     The size of this query window can be customized with
2413     :config:option:`$cfg['QueryWindowWidth']` and
2414     :config:option:`$cfg['QueryWindowHeight']` - both integers for the size in
2415     pixels.  Note that normally, those parameters will be modified in
2416     :file:`layout.inc.php`` for the theme you are using. 
2418     If :config:option:`$cfg['EditInWindow']` is set to true, a click on [Edit]
2419     from the results page (in the :guilabel:`Showing Rows` section) opens the
2420     query window and puts the current query inside it. If set to false,
2421     clicking on the link puts the :term:`SQL` query
2422     in the right panel's query box.  
2424     If :config:option:`$cfg['QueryHistoryDB']` is set to ``true``, all your
2425     Queries are logged to a table, which has to be created by you (see
2426     :config:option:`$cfg['Servers'][$i]['history']`). If set to false, all your
2427     queries will be appended to the form, but only as long as your window is
2428     opened they remain saved.  
2430     When using the JavaScript based query window, it will always get updated
2431     when you click on a new table/db to browse and will focus if you click on
2432     :guilabel:`Edit SQL` after using a query. You can suppress updating the
2433     query window by checking the box :guilabel:`Do not overwrite this query
2434     from outside the window` below the query textarea. Then you can browse
2435     tables/databases in the background without losing the contents of the
2436     textarea, so this is especially useful when composing a query with tables
2437     you first have to look in. The checkbox will get automatically checked
2438     whenever you change the contents of the textarea. Please uncheck the button
2439     whenever you definitely want the query window to get updated even though
2440     you have made alterations. 
2442     If :config:option:`$cfg['QueryHistoryDB']` is set to ``true`` you can
2443     specify the amount of saved history items using
2444     :config:option:`$cfg['QueryHistoryMax']`. 
2446     The query window also has a custom tabbed look to group the features.
2447     Using the variable :config:option:`$cfg['QueryWindowDefTab']` you can
2448     specify the default tab to be used when opening the query window. It can be
2449     set to either ``sql``, ``files``, ``history`` or ``full``.
2451 .. config:option:: $cfg['BrowseMIME']
2453     :type: boolean
2454     :default: true
2456     Enable :ref:`transformations`.
2458 .. config:option:: $cfg['MaxExactCount']
2460     :type: integer
2461     :default: 0
2463     For InnoDB tables, determines for how large tables phpMyAdmin should
2464     get the exact row count using ``SELECT COUNT``. If the approximate row
2465     count as returned by ``SHOW TABLE STATUS`` is smaller than this value,
2466     ``SELECT COUNT`` will be used, otherwise the approximate count will be
2467     used.
2469 .. config:option:: $cfg['MaxExactCountViews']
2471     :type: integer
2472     :default: 0
2474     For VIEWs, since obtaining the exact count could have an impact on
2475     performance, this value is the maximum to be displayed, using a
2476     ``SELECT COUNT ... LIMIT``. Setting this to 0 bypasses any row
2477     counting.
2479 .. config:option:: $cfg['NaturalOrder']
2481     :type: boolean
2482     :default: true
2484     Sorts database and table names according to natural order (for
2485     example, t1, t2, t10). Currently implemented in the navigation panel
2486     and in Database view, for the table list.
2488 .. config:option:: $cfg['InitialSlidersState']
2490     :type: string
2491     :default: ``'closed'``
2493     If set to ``'closed'``, the visual sliders are initially in a closed
2494     state. A value of ``'open'`` does the reverse. To completely disable
2495     all visual sliders, use ``'disabled'``.
2497 .. config:option:: $cfg['UserprefsDisallow']
2499     :type: array
2500     :default: array()
2502     Contains names of configuration options (keys in ``$cfg`` array) that
2503     users can't set through user preferences. For possible values, refer
2504     to :file:`libraries/config/user_preferences.forms.php`.
2506 .. config:option:: $cfg['UserprefsDeveloperTab']
2508     :type: boolean
2509     :default: false
2511     Activates in the user preferences a tab containing options for
2512     developers of phpMyAdmin.
2514 Page titles
2515 -----------
2517 .. config:option:: $cfg['TitleTable']
2519     :type: string
2520     :default: ``'@HTTP_HOST@ / @VSERVER@ / @DATABASE@ / @TABLE@ | @PHPMYADMIN@'``
2522 .. config:option:: $cfg['TitleDatabase']
2524     :type: string
2525     :default: ``'@HTTP_HOST@ / @VSERVER@ / @DATABASE@ | @PHPMYADMIN@'``
2527 .. config:option:: $cfg['TitleServer']
2529     :type: string
2530     :default: ``'@HTTP_HOST@ / @VSERVER@ | @PHPMYADMIN@'``
2532 .. config:option:: $cfg['TitleDefault']
2534     :type: string
2535     :default: ``'@HTTP_HOST@ | @PHPMYADMIN@'``
2537     Allows you to specify window's title bar. You can use :ref:`faq6_27`.
2539 Theme manager settings
2540 ----------------------
2542 .. config:option:: $cfg['ThemePath']
2544     :type: string
2545     :default: ``'./themes'``
2547     If theme manager is active, use this as the path of the subdirectory
2548     containing all the themes.
2550 .. config:option:: $cfg['ThemeManager']
2552     :type: boolean
2553     :default: true
2555     Enables user-selectable themes. See :ref:`faqthemes`.
2557 .. config:option:: $cfg['ThemeDefault']
2559     :type: string
2560     :default: ``'pmahomme'``
2562     The default theme (a subdirectory under :config:option:`$cfg['ThemePath']`).
2564 .. config:option:: $cfg['ThemePerServer']
2566     :type: boolean
2567     :default: false
2569     Whether to allow different theme for each server.
2571 Default queries
2572 ---------------
2574 .. config:option:: $cfg['DefaultQueryTable']
2576     :type: string
2577     :default: ``'SELECT * FROM @TABLE@ WHERE 1'``
2579 .. config:option:: $cfg['DefaultQueryDatabase']
2581     :type: string
2582     :default: ``''``
2584     Default queries that will be displayed in query boxes when user didn't
2585     specify any. You can use standard :ref:`faq6_27`.
2587 SQL parser settings
2588 -------------------
2590 .. config:option:: $cfg['SQP']['fmtType']
2592     :type: string
2593     :default: ``'html'``
2595     The main use of the new :term:`SQL` Parser
2596     is to pretty-print :term:`SQL` queries. By
2597     default we use HTML to format the query, but you can disable this by
2598     setting this variable to ``'none'``.
2600     Available options:
2602     * ``'html'``
2603     * ``'none'``
2605 .. _cfg_SQP:
2606 .. config:option:: $cfg['SQP']['fmtInd']
2608     :type: float
2609     :default: ``'1'``
2611 .. config:option:: $cfg['SQP']['fmtIndUnit']
2613     :type: string
2614     :default: ``'em'``
2616     For the pretty-printing of :term:`SQL` queries,
2617     under some cases the part of a query inside a bracket is indented. By
2618     changing :config:option:`$cfg['SQP']['fmtInd']` you can change the amount
2619     of this indent. 
2621     Related in purpose is :config:option:`$cfg['SQP']['fmtIndUnit']` which
2622     specifies the units of the indent amount that you specified. This is used
2623     via stylesheets.
2625     You can use any HTML unit, for example:
2627     * ``'em'``
2628     * ``'ex'``
2629     * ``'pt'``
2630     * ``'px'``
2632 .. config:option:: $cfg['SQP']['fmtColor']
2634     :type: array of string tuples
2635     :default:
2637     This array is used to define the colours for each type of element of
2638     the pretty-printed :term:`SQL` queries.
2639     The tuple format is *class* => [*HTML colour code* | *empty string*]
2642     If you specify an empty string for the color of a class, it is ignored
2643     in creating the stylesheet. You should not alter the class names, only
2644     the colour strings.
2645     
2646     **Class name key:**
2648     comment
2649         Applies to all comment sub-classes
2650     comment\_mysql
2651         Comments as ``"#...\n"``
2652     comment\_ansi
2653         Comments as ``"-- ...\n"``
2654     comment\_c
2655         Comments as ``"/*...*/"``
2656     digit
2657         Applies to all digit sub-classes
2658     digit\_hex
2659         Hexadecimal numbers
2660     digit\_integer
2661         Integer numbers
2662     digit\_float
2663         Floating point numbers
2664     punct
2665         Applies to all punctuation sub-classes
2666     punct\_bracket\_open\_round
2667         Opening brackets ``"("``
2668     punct\_bracket\_close\_round
2669         Closing brackets ``")"``
2670     punct\_listsep
2671         List item Separator ``","``
2672     punct\_qualifier
2673         Table/Column Qualifier ``"."``
2674     punct\_queryend
2675         End of query marker ``";"``
2676     alpha
2677         Applies to all alphabetic classes
2678     alpha\_columnType
2679         Identifiers matching a column type
2680     alpha\_columnAttrib
2681         Identifiers matching a database/table/column attribute
2682     alpha\_functionName
2683         Identifiers matching a MySQL function name
2684     alpha\_reservedWord
2685         Identifiers matching any other reserved word
2686     alpha\_variable
2687         Identifiers matching a :term:`SQL` variable ``"@foo"``
2688     alpha\_identifier
2689         All other identifiers
2690     quote
2691         Applies to all quotation mark classes
2692     quote\_double
2693         Double quotes ``"``
2694     quote\_single
2695         Single quotes ``'``
2696     quote\_backtick
2697         Backtick quotes `````
2699 SQL validator settings
2700 ----------------------
2702 .. config:option:: $cfg['SQLValidator']
2704     :type: array
2705     :default: array(...)
2709 .. config:option:: $cfg['SQLValidator']['use']
2711     :type: boolean
2712     :default: false
2714     phpMyAdmin now supports use of the `Mimer SQL Validator
2715     <http://developer.mimer.com/validator/index.htm>`_ service, as originally
2716     published on `Slashdot
2717     <http://developers.slashdot.org/article.pl?sid=02/02/19/1720246>`_. For
2718     help in setting up your system to use the service, see the
2719     :ref:`faqsqlvalidator`.
2721 .. config:option:: $cfg['SQLValidator']['username']
2723     :type: string
2724     :default: ``''``
2726 .. config:option:: $cfg['SQLValidator']['password']
2728     :type: string
2729     :default: ``''``
2731     The SOAP service allows you to log in with ``anonymous`` and any password,
2732     so we use those by default. Instead, if you have an account with them, you
2733     can put your login details here, and it will be used in place of the
2734     anonymous login.
2736 MySQL settings
2737 --------------
2739 .. config:option:: $cfg['DefaultFunctions']
2741     :type: array
2742     :default: array(...)
2744     Functions selected by default when inserting/changing row, Functions
2745     are defined for meta types as (FUNC\_NUMBER, FUNC\_DATE, FUNC\_CHAR,
2746     FUNC\_SPATIAL, FUNC\_UUID) and for ``first_timestamp``, which is used
2747     for first timestamp column in table.
2750 Developer
2751 ---------
2753 .. warning::
2755     These settings might have huge effect on performance or security.
2757 .. config:option:: $cfg['DBG']
2759     :type: array
2760     :default: array(...)
2762 .. config:option:: $cfg['DBG']['sql']
2764     :type: boolean
2765     :default: false
2767     Enable logging queries and execution times to be
2768     displayed in the bottom of main page (right frame).
2770 .. config:option:: $cfg['Error_Handler']['display']
2772     :type: boolean
2773     :default: false
2775     Whether to display errors from PHP or not.
2777 .. config:option:: $cfg['Error_Handler']['gather']
2779     :type: boolean
2780     :default: false
2782     Whether to gather errors from PHP or not.