add missing space
[phpmyadmin.git] / doc / config.rst
blob7087ecf243a650308efe11474b3717e4602b1820
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 Server connection settings
123 --------------------------
125 .. config:option:: $cfg['Servers']
127     :type: array
128     :default: one server array with settings listed bellow
130     Since version 1.4.2, phpMyAdmin supports the administration of multiple
131     MySQL servers. Therefore, a :config:option:`$cfg['Servers']`-array has been
132     added which contains the login information for the different servers. The
133     first :config:option:`$cfg['Servers'][$i]['host']` contains the hostname of
134     the first server, the second :config:option:`$cfg['Servers'][$i]['host']`
135     the hostname of the second server, etc. In
136     :file:`libraries/config.default.php`, there is only one section for server
137     definition, however you can put as many as you need in
138     :file:`config.inc.php`, copy that block or needed parts (you don't have to
139     define all settings, just those you need to change).
141     .. note::
142        
143         The :config:option:`$cfg['Servers']` array starts with
144         $cfg['Servers'][1]. Do not use $cfg['Servers'][0]. If you want more
145         than one server, just copy following section (including $i
146         incrementation) serveral times. There is no need to define full server
147         array, just define values you need to change.
150 .. config:option:: $cfg['Servers'][$i]['host']
152     :type: string
153     :default: ``'localhost'``
155     The hostname or :term:`IP` address of your $i-th MySQL-server. E.g.
156     ``localhost``.
158     Possible values are:
160     * hostname, e.g., ``'localhost'`` or ``'mydb.example.org'``
161     * IP address, e.g., ``'127.0.0.1'`` or ``'192.168.10.1'``
162     * dot - ``'.'``, i.e., use named pipes on windows systems
163     * empty - ``''``, disables this server
165 .. config:option:: $cfg['Servers'][$i]['port']
167     :type: string
168     :default: ``''``
170     The port-number of your $i-th MySQL-server. Default is 3306 (leave
171     blank). 
172     
173     .. note::
174        
175        If you use ``localhost`` as the hostname, MySQL ignores this port number
176        and connects with the socket, so if you want to connect to a port
177        different from the default port, use ``127.0.0.1`` or the real hostname
178        in :config:option:`$cfg['Servers'][$i]['host']`.
180 .. config:option:: $cfg['Servers'][$i]['socket']
182     :type: string
183     :default: ``''``
185     The path to the socket to use. Leave blank for default. To determine
186     the correct socket, check your MySQL configuration or, using the
187     :command:`mysql` command–line client, issue the ``status`` command. Among the
188     resulting information displayed will be the socket used.
190 .. config:option:: $cfg['Servers'][$i]['ssl']
192     :type: boolean
193     :default: false
195     Whether to enable SSL for connection to MySQL server.
197 .. config:option:: $cfg['Servers'][$i]['connect_type']
199     :type: string
200     :default: ``'tcp'``
202     What type connection to use with the MySQL server. Your options are
203     ``'socket'`` and ``'tcp'``. It defaults to tcp as that is nearly guaranteed
204     to be available on all MySQL servers, while sockets are not supported on
205     some platforms. To use the socket mode, your MySQL server must be on the
206     same machine as the Web server.
208 .. config:option:: $cfg['Servers'][$i]['extension']
210     :type: string
211     :default: ``'mysqli'``
213     What php MySQL extension to use for the connection. Valid options are:
215     ``mysql``
216         The classic MySQL extension. 
218     ``mysqli`` 
219         The improved MySQL extension. This extension became available with PHP
220         5.0.0 and is the recommended way to connect to a server running MySQL
221         4.1.x or newer.
223 .. config:option:: $cfg['Servers'][$i]['compress']
225     :type: boolean
226     :default: false
228     Whether to use a compressed protocol for the MySQL server connection
229     or not (experimental).
231 .. _controlhost:
232 .. config:option:: $cfg['Servers'][$i]['controlhost']
234     :type: string
235     :default: ``''``
237     Permits to use an alternate host to hold the configuration storage
238     data.
240 .. _controluser:
241 .. config:option:: $cfg['Servers'][$i]['controluser']
243     :type: string
244     :default: ``''``
246 .. config:option:: $cfg['Servers'][$i]['controlpass']
248     :type: string
249     :default: ``''``
251     This special account is used for 2 distinct purposes: to make possible all
252     relational features (see :config:option:`$cfg['Servers'][$i]['pmadb']`) and,
253     for a MySQL server running with ``--skip-show-database``, to enable a
254     multi-user installation (:term:`HTTP` or cookie
255     authentication mode). 
257     When using :term:`HTTP` or
258     cookie authentication modes (or 'config' authentication mode since phpMyAdmin
259     2.2.1), you need to supply the details of a MySQL account that has ``SELECT``
260     privilege on the *mysql.user (all columns except "Password")*, *mysql.db (all
261     columns)* and *mysql.tables\_priv (all columns except "Grantor" and
262     "Timestamp")* tables. This account is used to check what databases the user
263     will see at login.
265     .. versionchanged:: 2.2.5 
266         those were called ``stduser`` and ``stdpass``
268     .. seealso:: :ref:`setup`, :ref:`authentication_modes`
270 .. config:option:: $cfg['Servers'][$i]['auth_type']
272     :type: string
273     :default: ``'cookie'``
275     Whether config or cookie or :term:`HTTP` or signon authentication should be
276     used for this server.
278     * 'config' authentication (``$auth_type = 'config'``) is the plain old
279       way: username and password are stored in :file:`config.inc.php`.
280     * 'cookie' authentication mode (``$auth_type = 'cookie'``) as
281       introduced in 2.2.3 allows you to log in as any valid MySQL user with
282       the help of cookies. Username and password are stored in cookies
283       during the session and password is deleted when it ends. This can also
284       allow you to log in in arbitrary server if :config:option:`$cfg['AllowArbitraryServer']` enabled.
285     * 'http' authentication (was
286       called 'advanced' in previous versions and can be written also as
287       'http') (``$auth_type = 'http';'``) as introduced in 1.3.0 allows you to log in as any
288       valid MySQL user via HTTP-Auth.
289     * 'signon' authentication mode (``$auth_type = 'signon'``) as
290       introduced in 2.10.0 allows you to log in from prepared PHP session
291       data or using supplied PHP script. This is useful for implementing
292       single signon from another application. Sample way how to seed session
293       is in signon example: :file:`examples/signon.php`. There is also
294       alternative example using OpenID - :file:`examples/openid.php` and example
295       for scripts based solution - :file:`examples/signon-script.php`. You need
296       to configure :config:option:`$cfg['Servers'][$i]['SignonSession']` or 
297       :config:option:`$cfg['Servers'][$i]['SignonScript']` and 
298       :config:option:`$cfg['Servers'][$i]['SignonURL']` to use this authentication 
299       method.
301     .. seealso:: :ref:`authentication_modes`
303 .. _servers_auth_http_realm:
304 .. config:option:: $cfg['Servers'][$i]['auth_http_realm']
306     :type: string
307     :default: ``''``
309     When using auth\_type = ``http``, this field allows to define a custom
310     :term:`HTTP` Basic Auth Realm which will be displayed to the user. If not
311     explicitly specified in your configuration, a string combined of
312     "phpMyAdmin " and either :config:option:`$cfg['Servers'][$i]['verbose']` or
313     :config:option:`$cfg['Servers'][$i]['host']` will be used.
315 .. _servers_auth_swekey_config:
316 .. config:option:: $cfg['Servers'][$i]['auth_swekey_config']
318     :type: string
319     :default: ``''``
321     The name of the file containing :ref:`swekey` ids and login names for hardware
322     authentication. Leave empty to deactivate this feature.
324 .. _servers_user:
325 .. config:option:: $cfg['Servers'][$i]['user']
327     :type: string
328     :default: ``'root'``
330 .. config:option:: $cfg['Servers'][$i]['password']
332     :type: string
333     :default: ``''``
335     When using :config:option:`$cfg['Servers'][$i]['auth_type']` set to
336     'config', this is the user/password-pair which phpMyAdmin will use to
337     connect to the MySQL server. This user/password pair is not needed when
338     :term:`HTTP` or cookie authentication is used
339     and should be empty.
341 .. _servers_nopassword:
342 .. config:option:: $cfg['Servers'][$i]['nopassword']
344     :type: boolean
345     :default: false
347     Allow attempt to log in without password when a login with password
348     fails. This can be used together with http authentication, when
349     authentication is done some other way and phpMyAdmin gets user name
350     from auth and uses empty password for connecting to MySQL. Password
351     login is still tried first, but as fallback, no password method is
352     tried.
354 .. _servers_only_db:
355 .. config:option:: $cfg['Servers'][$i]['only_db']
357     :type: string or array
358     :default: ``''``
360     If set to a (an array of) database name(s), only this (these)
361     database(s) will be shown to the user. Since phpMyAdmin 2.2.1,
362     this/these database(s) name(s) may contain MySQL wildcards characters
363     ("\_" and "%"): if you want to use literal instances of these
364     characters, escape them (I.E. use ``'my\_db'`` and not ``'my_db'``).
366     This setting is an efficient way to lower the server load since the
367     latter does not need to send MySQL requests to build the available
368     database list. But **it does not replace the privileges rules of the
369     MySQL database server**. If set, it just means only these databases
370     will be displayed but **not that all other databases can't be used.**
372     An example of using more that one database:
374     .. code-block:: php
375         
376         $cfg['Servers'][$i]['only_db'] = array('db1', 'db2');
378     .. versionchanged:: 4.0.0 
379         Previous versions permitted to specify the display order of 
380         the database names via this directive. 
382 .. config:option:: $cfg['Servers'][$i]['hide_db']
384     :type: string
385     :default: ``''``
387     Regular expression for hiding some databases from unprivileged users.
388     This only hides them from listing, but a user is still able to access
389     them (using, for example, the SQL query area). To limit access, use
390     the MySQL privilege system.  For example, to hide all databases
391     starting with the letter "a", use
393     .. code-block:: php
395         $cfg['Servers'][$i]['hide_db'] = '^a';
397     and to hide both "db1" and "db2" use
399     .. code-block:: php
401         $cfg['Servers'][$i]['hide_db'] = '^(db1|db2)$';
403     More information on regular expressions can be found in the `PCRE
404     pattern syntax
405     <http://php.net/manual/en/reference.pcre.pattern.syntax.php>`_ portion
406     of the PHP reference manual.
408 .. config:option:: $cfg['Servers'][$i]['verbose']
410     :type: string
411     :default: ``''``
413     Only useful when using phpMyAdmin with multiple server entries. If
414     set, this string will be displayed instead of the hostname in the
415     pull-down menu on the main page. This can be useful if you want to
416     show only certain databases on your system, for example. For HTTP
417     auth, all non-US-ASCII characters will be stripped.
419 .. config:option:: $cfg['Servers'][$i]['pmadb']
421     :type: string
422     :default: ``''``
424     The name of the database containing the phpMyAdmin configuration
425     storage.  
427     See the :ref:`linked-tables`  section in this document to see the benefits of
428     this feature, and for a quick way of creating this database and the needed
429     tables.  
431     If you are the only user of this phpMyAdmin installation, you can use your
432     current database to store those special tables; in this case, just put your
433     current database name in :config:option:`$cfg['Servers'][$i]['pmadb']`. For a
434     multi-user installation, set this parameter to the name of your central
435     database containing the phpMyAdmin configuration storage.
437 .. _bookmark:
438 .. config:option:: $cfg['Servers'][$i]['bookmarktable']
440     :type: string
441     :default: ``''``
443     Since release 2.2.0 phpMyAdmin allows users to bookmark queries. This
444     can be useful for queries you often run. To allow the usage of this
445     functionality:
447     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
448     * enter the table name in :config:option:`$cfg['Servers'][$i]['bookmarktable']`
451 .. _relation:
452 .. config:option:: $cfg['Servers'][$i]['relation']
454     :type: string
455     :default: ``''``
457     Since release 2.2.4 you can describe, in a special 'relation' table,
458     which column is a key in another table (a foreign key). phpMyAdmin
459     currently uses this to
461     * make clickable, when you browse the master table, the data values that
462       point to the foreign table;
463     * display in an optional tool-tip the "display column" when browsing the
464       master table, if you move the mouse to a column containing a foreign
465       key (use also the 'table\_info' table); (see :ref:`faqdisplay`)
466     * in edit/insert mode, display a drop-down list of possible foreign keys
467       (key value and "display column" are shown) (see :ref:`faq6_21`)
468     * display links on the table properties page, to check referential
469       integrity (display missing foreign keys) for each described key;
470     * in query-by-example, create automatic joins (see :ref:`faq6_6`)
471     * enable you to get a :term:`PDF` schema of
472       your database (also uses the table\_coords table).
474     The keys can be numeric or character. 
476     To allow the usage of this functionality:
478     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
479     * put the relation table name in :config:option:`$cfg['Servers'][$i]['relation']`
480     * now as normal user open phpMyAdmin and for each one of your tables
481       where you want to use this feature, click :guilabel:`Structure/Relation view/`
482       and choose foreign columns.
484     .. note:: 
485        
486         In the current version, ``master_db`` must be the same as ``foreign_db``.
487         Those columns have been put in future development of the cross-db
488         relations.
490 .. _table_info:
491 .. config:option:: $cfg['Servers'][$i]['table_info']
493     :type: string
494     :default: ``''``
496     Since release 2.3.0 you can describe, in a special 'table\_info'
497     table, which column is to be displayed as a tool-tip when moving the
498     cursor over the corresponding key. This configuration variable will
499     hold the name of this special table. To allow the usage of this
500     functionality:
502     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
503     * put the table name in :config:option:`$cfg['Servers'][$i]['table\_info']` (e.g.
504       ``pma__table_info``)
505     * then for each table where you want to use this feature, click
506       "Structure/Relation view/Choose column to display" to choose the
507       column.
509     .. seealso:: :ref:`faqdisplay`
511 .. _table_coords:
512 .. config:option:: $cfg['Servers'][$i]['table_coords']
514     :type: string
515     :default: ``''``
517 .. config:option:: $cfg['Servers'][$i]['pdf_pages']
519     :type: string
520     :default: ``''``
522     Since release 2.3.0 you can have phpMyAdmin create :term:`PDF` pages
523     showing the relations between your tables. To do this it needs two tables
524     "pdf\_pages" (storing information about the available :term:`PDF` pages)
525     and "table\_coords" (storing coordinates where each table will be placed on
526     a :term:`PDF` schema output).  You must be using the "relation" feature. 
528     To allow the usage of this functionality:
530     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
531     * put the correct table names in
532       :config:option:`$cfg['Servers'][$i]['table\_coords']` and
533       :config:option:`$cfg['Servers'][$i]['pdf\_pages']`
535     .. seealso:: :ref:`faqpdf`.
537 .. _col_com:
538 .. config:option:: $cfg['Servers'][$i]['column_info']
540     :type: string
541     :default: ``''``
543     This part requires a content update!  Since release 2.3.0 you can
544     store comments to describe each column for each table. These will then
545     be shown on the "printview". 
547     Starting with release 2.5.0, comments are consequently used on the table
548     property pages and table browse view, showing up as tool-tips above the
549     column name (properties page) or embedded within the header of table in
550     browse view. They can also be shown in a table dump. Please see the
551     relevant configuration directives later on. 
553     Also new in release 2.5.0 is a MIME- transformation system which is also
554     based on the following table structure. See :ref:`transformations` for
555     further information. To use the MIME- transformation system, your
556     column\_info table has to have the three new columns 'mimetype',
557     'transformation', 'transformation\_options'.
560     To allow the usage of this functionality:
562     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
563     * put the table name in :config:option:`$cfg['Servers'][$i]['column\_info']` (e.g.
564       ``pma__column_info``)
565     * to update your PRE-2.5.0 Column\_comments Table use this:  and
566       remember that the Variable in :file:`config.inc.php` has been renamed from
567       :config:option:`$cfg['Servers'][$i]['column\_comments']` to
568       :config:option:`$cfg['Servers'][$i]['column\_info']`
570       .. code-block:: mysql
572            ALTER TABLE `pma__column_comments`
573            ADD `mimetype` VARCHAR( 255 ) NOT NULL,
574            ADD `transformation` VARCHAR( 255 ) NOT NULL,
575            ADD `transformation_options` VARCHAR( 255 ) NOT NULL;
577 .. _history:
578 .. config:option:: $cfg['Servers'][$i]['history']
580     :type: string
581     :default: ``''``
583     Since release 2.5.0 you can store your :term:`SQL` history, which means all
584     queries you entered manually into the phpMyAdmin interface. If you don't
585     want to use a table-based history, you can use the JavaScript-based
586     history. 
588     Using that, all your history items are deleted when closing the window.
589     Using :config:option:`$cfg['QueryHistoryMax']` you can specify an amount of
590     history items you want to have on hold. On every login, this list gets cut
591     to the maximum amount.
593     The query history is only available if JavaScript is enabled in
594     your browser. 
596     To allow the usage of this functionality:
598     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
599     * put the table name in :config:option:`$cfg['Servers'][$i]['history']` (e.g.
600       ``pma__history``)
602 .. _recent:
603 .. config:option:: $cfg['Servers'][$i]['recent']
605     :type: string
606     :default: ``''``
608     Since release 3.5.0 you can show recently used tables in the
609     navigation panel. It helps you to jump across table directly, without
610     the need to select the database, and then select the table. Using
611     :config:option:`$cfg['NumRecentTables']` you can configure the maximum number
612     of recent tables shown. When you select a table from the list, it will jump to
613     the page specified in :config:option:`$cfg['NavigationTreeDefaultTabTable']`.
616     Without configuring the storage, you can still access the recently used tables,
617     but it will disappear after you logout. 
619     To allow the usage of this functionality persistently:
621     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
622     * put the table name in :config:option:`$cfg['Servers'][$i]['recent']` (e.g.
623       ``pma__recent``)
625 .. _table_uiprefs:
626 .. config:option:: $cfg['Servers'][$i]['table_uiprefs']
628     :type: string
629     :default: ``''``
631     Since release 3.5.0 phpMyAdmin can be configured to remember several
632     things (sorted column :config:option:`$cfg['RememberSorting']`, column order,
633     and column visibility from a database table) for browsing tables. Without
634     configuring the storage, these features still can be used, but the values will
635     disappear after you logout. 
637     To allow the usage of these functionality persistently:
639     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
640     * put the table name in :config:option:`$cfg['Servers'][$i]['table\_uiprefs']` (e.g.
641       ``pma__table_uiprefs``)
644 .. _tracking:
645 .. config:option:: $cfg['Servers'][$i]['tracking']
647     :type: string
648     :default: ``''``
650     Since release 3.3.x a tracking mechanism is available. It helps you to
651     track every :term:`SQL` command which is
652     executed by phpMyAdmin. The mechanism supports logging of data
653     manipulation and data definition statements. After enabling it you can
654     create versions of tables.  
656     The creation of a version has two effects:
658     * phpMyAdmin saves a snapshot of the table, including structure and
659       indexes.
660     * phpMyAdmin logs all commands which change the structure and/or data of
661       the table and links these commands with the version number.
663     Of course you can view the tracked changes. On the :guilabel:`Tracking`
664     page a complete report is available for every version. For the report you
665     can use filters, for example you can get a list of statements within a date
666     range. When you want to filter usernames you can enter \* for all names or
667     you enter a list of names separated by ','. In addition you can export the
668     (filtered) report to a file or to a temporary database.
670     To allow the usage of this functionality:
672     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
673     * put the table name in :config:option:`$cfg['Servers'][$i]['tracking']` (e.g.
674       ``pma__tracking``)
677 .. _tracking2:
678 .. config:option:: $cfg['Servers'][$i]['tracking_version_auto_create']
680     :type: boolean
681     :default: false
683     Whether the tracking mechanism creates versions for tables and views
684     automatically.
686     If this is set to true and you create a table or view with
688     * CREATE TABLE ...
689     * CREATE VIEW ...
691     and no version exists for it, the mechanism will create a version for
692     you automatically.
694 .. _tracking3:
695 .. config:option:: $cfg['Servers'][$i]['tracking_default_statements']
697     :type: string
698     :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'``
700     Defines the list of statements the auto-creation uses for new
701     versions. 
703 .. _tracking4:
704 .. config:option:: $cfg['Servers'][$i]['tracking_add_drop_view']
706     :type: boolean
707     :default: true
709     Whether a DROP VIEW IF EXISTS statement will be added as first line to
710     the log when creating a view.
712 .. _tracking5:
713 .. config:option:: $cfg['Servers'][$i]['tracking_add_drop_table']
715     :type: boolean
716     :default: true
718     Whether a DROP TABLE IF EXISTS statement will be added as first line
719     to the log when creating a table.
721 .. _tracking6:
722 .. config:option:: $cfg['Servers'][$i]['tracking_add_drop_database']
724     :type: boolean
725     :default: true
727     Whether a DROP DATABASE IF EXISTS statement will be added as first
728     line to the log when creating a database.
730 .. _userconfig:
731 .. config:option:: $cfg['Servers'][$i]['userconfig']
733     :type: string
734     :default: ``''``
736     Since release 3.4.x phpMyAdmin allows users to set most preferences by
737     themselves and store them in the database.
739     If you don't allow for storing preferences in
740     :config:option:`$cfg['Servers'][$i]['pmadb']`, users can still personalize
741     phpMyAdmin, but settings will be saved in browser's local storage, or, it
742     is is unavailable, until the end of session.  
744     To allow the usage of this functionality:
746     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
747     * put the table name in :config:option:`$cfg['Servers'][$i]['userconfig']`
751 .. _designer_coords:
752 .. config:option:: $cfg['Servers'][$i]['designer_coords']
754     :type: string
755     :default: ``''``
757     Since release 2.10.0 a Designer interface is available; it permits to
758     visually manage the relations.  
760     To allow the usage of this functionality:
762     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
763     * put the table name in :config:option:`$cfg['Servers'][$i]['designer\_coords']`
764       (e.g. ``pma__designer_coords``)
768 .. config:option:: $cfg['Servers'][$i]['MaxTableUiprefs']
770     :type: integer
771     :default: 100
773     Maximum number of rows saved in
774     :config:option:`$cfg['Servers'][$i]['table_uiprefs']` table. 
776     When tables are dropped or renamed,
777     :config:option:`$cfg['Servers'][$i]['table_uiprefs']` may contain invalid data
778     (referring to tables which no longer exist). We only keep this number of newest
779     rows in :config:option:`$cfg['Servers'][$i]['table_uiprefs']` and automatically
780     delete older rows.
782 .. config:option:: $cfg['Servers'][$i]['AllowRoot']
784     :type: boolean
785     :default: true
787     Whether to allow root access. This is just a shortcut for the
788     :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` below.
790 .. config:option:: $cfg['Servers'][$i]['AllowNoPassword']
792     :type: boolean
793     :default: false
795     Whether to allow logins without a password. The default value of
796     ``false`` for this parameter prevents unintended access to a MySQL
797     server with was left with an empty password for root or on which an
798     anonymous (blank) user is defined.
800 .. _servers_allowdeny_order:
801 .. config:option:: $cfg['Servers'][$i]['AllowDeny']['order']
803     :type: string
804     :default: ``''``
806     If your rule order is empty, then :term:`IP`
807     authorization is disabled. 
809     If your rule order is set to
810     ``'deny,allow'`` then the system applies all deny rules followed by
811     allow rules. Access is allowed by default. Any client which does not
812     match a Deny command or does match an Allow command will be allowed
813     access to the server. 
815     If your rule order is set to ``'allow,deny'``
816     then the system applies all allow rules followed by deny rules. Access
817     is denied by default. Any client which does not match an Allow
818     directive or does match a Deny directive will be denied access to the
819     server. 
821     If your rule order is set to ``'explicit'``, authorization is
822     performed in a similar fashion to rule order 'deny,allow', with the
823     added restriction that your host/username combination **must** be
824     listed in the *allow* rules, and not listed in the *deny* rules. This
825     is the **most** secure means of using Allow/Deny rules, and was
826     available in Apache by specifying allow and deny rules without setting
827     any order. 
829     Please also see :config:option:`$cfg['TrustedProxies']` for
830     detecting IP address behind proxies.
832 .. _servers_allowdeny_rules:
833 .. config:option:: $cfg['Servers'][$i]['AllowDeny']['rules']
835     :type: array of strings
836     :default: array()
838     The general format for the rules is as such:
840     .. code-block:: none
841         
842         <'allow' | 'deny'> <username> [from] <ipmask>
844     If you wish to match all users, it is possible to use a ``'%'`` as a
845     wildcard in the *username* field.
847     There are a few shortcuts you can
848     use in the *ipmask* field as well (please note that those containing
849     SERVER\_ADDRESS might not be available on all webservers):
851     .. code-block:: none
853         
854         'all' -> 0.0.0.0/0
855         'localhost' -> 127.0.0.1/8
856         'localnetA' -> SERVER_ADDRESS/8
857         'localnetB' -> SERVER_ADDRESS/16
858         'localnetC' -> SERVER_ADDRESS/24
860     Having an empty rule list is equivalent to either using ``'allow %
861     from all'`` if your rule order is set to ``'deny,allow'`` or ``'deny %
862     from all'`` if your rule order is set to ``'allow,deny'`` or
863     ``'explicit'``.
865     For the :term:`IP address` matching
866     system, the following work: 
868     * ``xxx.xxx.xxx.xxx`` (an exact :term:`IP address`) 
869     * ``xxx.xxx.xxx.[yyy-zzz]`` (an :term:`IP address` range) 
870     * ``xxx.xxx.xxx.xxx/nn`` (CIDR, Classless Inter-Domain Routing type :term:`IP` addresses) 
872     But the following does not work: 
874     * ``xxx.xxx.xxx.xx[yyy-zzz]`` (partial :term:`IP` address range) 
876     For :term:`IPv6` addresses, the following work:
878     * ``xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx`` (an exact :term:`IPv6` address)
879     * ``xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:[yyyy-zzzz]`` (an :term:`IPv6` address range)
880     * ``xxxx:xxxx:xxxx:xxxx/nn`` (CIDR, Classless Inter-Domain Routing type :term:`IPv6` addresses)
882     But the following does not work:
884     * ``xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx[yyy-zzz]`` (partial :term:`IPv6` address range)
886 .. config:option:: $cfg['Servers'][$i]['DisableIS']
888     :type: boolean
889     :default: true
891     Disable using ``INFORMATION_SCHEMA`` to retrieve information (use
892     ``SHOW`` commands instead), because of speed issues when many
893     databases are present. Currently used in some parts of the code, more
894     to come.
896 .. config:option:: $cfg['Servers'][$i]['ShowDatabasesCommand']
898     :type: string
899     :default: ``'SHOW DATABASES'``
901     On a server with a huge number of databases, the default ``SHOW DATABASES``
902     command used to fetch the name of available databases will probably be too
903     slow, so it can be replaced by faster commands. You can use ``#user#``
904     string will be replaced by current user.
906     When using ``false``, it will disable fetching databases from the server,
907     only databases in :config:option:`$cfg['Servers'][$i]['only_db']` will be
908     displayed.
909     
910     Examples:
912     * ``'SHOW DATABASES'``
913     * ``"SHOW DATABASES LIKE '#user#\_%'"``
914     * ``'SELECT DISTINCT TABLE_SCHEMA FROM information_schema.SCHEMA_PRIVILEGES'``
915     * ``'SELECT SCHEMA_NAME FROM information_schema.SCHEMATA'``
916     * ``false``
918 .. config:option:: $cfg['Servers'][$i]['CountTables']
920     :type: boolean
921     :default: false
923     Whether to count the number of tables for each database when preparing
924     the list of databases for the navigation panel.
926 .. config:option:: $cfg['Servers'][$i]['SignonScript']
928     :type: string
929     :default: ``''``
931     Name of PHP script to be sourced and executed to obtain login
932     credentials. This is alternative approach to session based single
933     signon. The script needs to provide function
934     ``get_login_credentials`` which returns list of username and
935     password, accepting single parameter of existing username (can be
936     empty). See :file:`examples/signon-script.php` for an example.
938 .. config:option:: $cfg['Servers'][$i]['SignonSession']
940     :type: string
941     :default: ``''``
943     Name of session which will be used for signon authentication method.
944     You should use something different than ``phpMyAdmin``, because this
945     is session which phpMyAdmin uses internally. Takes effect only if 
946     :config:option:`$cfg['Servers'][$i]['SignonScript']` is not configured.
948 .. config:option:: $cfg['Servers'][$i]['SignonURL']
950     :type: string
951     :default: ``''``
953     :term:`URL` where user will be redirected
954     to log in for signon authentication method. Should be absolute
955     including protocol.
957 .. config:option:: $cfg['Servers'][$i]['LogoutURL']
959     :type: string
960     :default: ``''``
962     :term:`URL` where user will be redirected
963     after logout (doesn't affect config authentication method). Should be
964     absolute including protocol.
966 .. config:option:: $cfg['Servers'][$i]['StatusCacheDatabases']
968     :type: array of strings
969     :default: array()
971     Enables caching of ``TABLE STATUS`` outputs for specific databases on
972     this server (in some cases ``TABLE STATUS`` can be very slow, so you
973     may want to cache it). APC is used (if the PHP extension is available,
974     if not, this setting is ignored silently). You have to provide 
975     :config:option:`$cfg['Servers'][$i]['StatusCacheLifetime']`. 
976     
977     Takes effect only if :config:option:`$cfg['Servers'][$i]['DisableIS']` is
978     ``true``.
980 .. config:option:: $cfg['Servers'][$i]['StatusCacheLifetime']
982     :type: integer
983     :default: 0
985     Lifetime in seconds of the ``TABLE STATUS`` cache if 
986     :config:option:`$cfg['Servers'][$i]['StatusCacheDatabases']` is used.
988 Generic settings
989 ----------------
991 .. config:option:: $cfg['ServerDefault']
993     :type: integer
994     :default: 1
996     If you have more than one server configured, you can set
997     :config:option:`$cfg['ServerDefault']` to any one of them to autoconnect to that
998     server when phpMyAdmin is started, or set it to 0 to be given a list
999     of servers without logging in. 
1000     
1001     If you have only one server configured,
1002     :config:option:`$cfg['ServerDefault']` MUST be set to that server.
1004 .. config:option:: $cfg['VersionCheck']
1006     :type: boolean
1007     :default: true
1009     Enables check for latest versions using javascript on main phpMyAdmin
1010     page.
1012     .. note::
1014         This setting can be adjusted by your vendor.
1016 .. config:option:: $cfg['MaxDbList']
1018     :type: integer
1019     :default: 100
1021     The maximum number of database names to be displayed in the main panel's
1022     database list.
1024 .. config:option:: $cfg['MaxNavigationItems']
1026     :type: integer
1027     :default: 25
1029     The number of items that can be displayed on each page of the
1030     navigation tree.
1032 .. config:option:: $cfg['MaxTableList']
1034     :type: integer
1035     :default: 250
1037     The maximum number of table names to be displayed in the main panel's
1038     list (except on the Export page). This limit is also enforced in the
1039     navigation panel when in Light mode.
1041 .. config:option:: $cfg['ShowHint']
1043     :type: boolean
1044     :default: true
1046     Whether or not to show hints (for example, hints when hovering over
1047     table headers).
1049 .. config:option:: $cfg['MaxCharactersInDisplayedSQL']
1051     :type: integer
1052     :default: 1000
1054     The maximum number of characters when a :term:`SQL` query is displayed. The
1055     default limit of 1000 should be correct to avoid the display of tons of
1056     hexadecimal codes that represent BLOBs, but some users have real
1057     :term:`SQL` queries that are longer than 1000 characters. Also, if a
1058     query's length exceeds this limit, this query is not saved in the history.
1060 .. config:option:: $cfg['PersistentConnections']
1062     :type: boolean
1063     :default: false
1065     Whether `persistent connections <http://php.net/manual/en/features
1066     .persistent-connections.php>`_ should be used or not. Works with
1067     following extensions:
1069     * mysql (`mysql\_pconnect <http://php.net/manual/en/function.mysql-
1070       pconnect.php>`_),
1071     * mysqli (requires PHP 5.3.0 or newer, `more information
1072       <http://php.net/manual/en/mysqli.persistconns.php>`_).
1074 .. config:option:: $cfg['ForceSSL']
1076     :type: boolean
1077     :default: false
1079     Whether to force using https while accessing phpMyAdmin.
1081 .. config:option:: $cfg['ExecTimeLimit']
1083     :type: integer [number of seconds]
1084     :default: 300
1086     Set the number of seconds a script is allowed to run. If seconds is
1087     set to zero, no time limit is imposed. This setting is used while
1088     importing/exporting dump files but has
1089     no effect when PHP is running in safe mode.
1091 .. config:option:: $cfg['SessionSavePath']
1093     :type: string
1094     :default: ``''``
1096     Path for storing session data (`session\_save\_path PHP parameter
1097     <http://php.net/session_save_path>`_).
1099 .. config:option:: $cfg['MemoryLimit']
1101     :type: string [number of bytes]
1102     :default: ``'0'``
1104     Set the number of bytes a script is allowed to allocate. If set to
1105     zero, no limit is imposed. 
1106     
1107     This setting is used while importing/exporting dump files and at some other
1108     places in phpMyAdmin so you definitely don't want to put here a too low
1109     value. It has no effect when PHP is running in safe mode. 
1110     
1111     You can also use any string as in :file:`php.ini`, eg. '16M'. Ensure you
1112     don't omit the suffix (16 means 16 bytes!)
1114 .. config:option:: $cfg['SkipLockedTables']
1116     :type: boolean
1117     :default: false
1119     Mark used tables and make it possible to show databases with locked
1120     tables (since MySQL 3.23.30).
1122 .. config:option:: $cfg['ShowSQL']
1124     :type: boolean
1125     :default: true
1127     Defines whether :term:`SQL` queries
1128     generated by phpMyAdmin should be displayed or not.
1130 .. config:option:: $cfg['RetainQueryBox']
1132     :type: boolean
1133     :default: false
1135     Defines whether the :term:`SQL` query box
1136     should be kept displayed after its submission.
1138 .. config:option:: $cfg['CodemirrorEnable']
1140     :type: boolean
1141     :default: true
1143     Defines whether to use a Javascript code editor for SQL query boxes.
1144     CodeMirror provides syntax highlighting and line numbers.  However,
1145     middle-clicking for pasting the clipboard contents in some Linux
1146     distributions (such as Ubuntu) is not supported by all browsers.
1148 .. config:option:: $cfg['AllowUserDropDatabase']
1150     :type: boolean
1151     :default: false
1153     Defines whether normal users (non-administrator) are allowed to delete
1154     their own database or not. If set as false, the link :guilabel:`Drop
1155     Database` will not be shown, and even a ``DROP DATABASE mydatabase`` will
1156     be rejected. Quite practical for :term:`ISP` 's with many customers. 
1158     .. note:: 
1159        
1160         This limitation of :term:`SQL` queries is not
1161         as strict as when using MySQL privileges. This is due to nature of
1162         :term:`SQL` queries which might be quite
1163         complicated.  So this choice should be viewed as help to avoid accidental
1164         dropping rather than strict privilege limitation.
1166 .. config:option:: $cfg['Confirm']
1168     :type: boolean
1169     :default: true
1171     Whether a warning ("Are your really sure...") should be displayed when
1172     you're about to lose data.
1174 .. config:option:: $cfg['UseDbSearch']
1176     :type: boolean
1177     :default: true
1179     Define whether the "search string inside database" is enabled or not.
1181 .. config:option:: $cfg['IgnoreMultiSubmitErrors']
1183     :type: boolean
1184     :default: false
1186     Define whether phpMyAdmin will continue executing a multi-query
1187     statement if one of the queries fails. Default is to abort execution.
1189 Cookie authentication options
1190 -----------------------------
1192 .. config:option:: $cfg['blowfish_secret']
1194     :type: string
1195     :default: ``''``
1197     The "cookie" auth\_type uses blowfish algorithm to encrypt the
1198     password. If you are using the "cookie" auth\_type, enter here a
1199     random passphrase of your choice. It will be used internally by the
1200     blowfish algorithm: you won’t be prompted for this passphrase. There
1201     is no maximum length for this secret. 
1203     .. versionchanged:: 3.1.0
1204         Since version 3.1.0 phpMyAdmin can generate this on the fly, but it
1205         makes a bit weaker security as this generated secret is stored in
1206         session and furthermore it makes impossible to recall user name from
1207         cookie.
1209 .. config:option:: $cfg['LoginCookieRecall']
1211     :type: boolean
1212     :default: true
1214     Define whether the previous login should be recalled or not in cookie
1215     authentication mode. 
1216     
1217     This is automatically disabled if you do not have
1218     configured :config:option:`$cfg['blowfish_secret']`.
1220 .. config:option:: $cfg['LoginCookieValidity']
1222     :type: integer [number of seconds]
1223     :default: 1440
1225     Define how long a login cookie is valid. Please note that php
1226     configuration option `session.gc\_maxlifetime
1227     <http://php.net/manual/en/session.configuration.php#ini.session.gc-
1228     maxlifetime>`_ might limit session validity and if the session is lost,
1229     the login cookie is also invalidated. So it is a good idea to set
1230     ``session.gc_maxlifetime`` at least to the same value of
1231     :config:option:`$cfg['LoginCookieValidity']`.
1233 .. config:option:: $cfg['LoginCookieStore']
1235     :type: integer [number of seconds]
1236     :default: 0
1238     Define how long login cookie should be stored in browser. Default 0
1239     means that it will be kept for existing session. This is recommended
1240     for not trusted environments.
1242 .. config:option:: $cfg['LoginCookieDeleteAll']
1244     :type: boolean
1245     :default: true
1247     If enabled (default), logout deletes cookies for all servers,
1248     otherwise only for current one. Setting this to false makes it easy to
1249     forget to log out from other server, when you are using more of them.
1251 .. _AllowArbitraryServer:
1252 .. config:option:: $cfg['AllowArbitraryServer']
1254     :type: boolean
1255     :default: false
1257     If enabled, allows you to log in to arbitrary servers using cookie
1258     authentication.
1260     .. note::
1261        
1262         Please use this carefully, as this may allow users access to MySQL servers
1263         behind the firewall where your :term:`HTTP`
1264         server is placed.
1266 Navigation panel setup
1267 ----------------------
1269 .. config:option:: $cfg['NavigationTreeEnableGrouping']
1271     :type: boolean
1272     :default: true
1274     Defines whether to group the databases based on a common prefix
1275     in their name :config:option:`$cfg['NavigationTreeDbSeparator']`.
1277 .. config:option:: $cfg['NavigationTreeDbSeparator']
1279     :type: string or array
1280     :default: ``'_'``
1282     The string used to separate the parts of the database name when
1283     showing them in a tree. Alternatively you can specify more strings in
1284     an array and all of them will be used as a separator.
1286 .. config:option:: $cfg['NavigationTreeTableSeparator']
1288     :type: string or array
1289     :default: ``'__'``
1291     Defines a string to be used to nest table spaces. This means if you have
1292     tables like ``first__second__third`` this will be shown as a three-level
1293     hierarchy like: first > second > third.  If set to false or empty, the
1294     feature is disabled. NOTE: You should not use this separator at the
1295     beginning or end of a table name or multiple times after another without
1296     any other characters in between.
1298 .. config:option:: $cfg['NavigationTreeTableLevel']
1300     :type: integer
1301     :default: 1
1303     Defines how many sublevels should be displayed when splitting up
1304     tables by the above separator.
1306 .. config:option:: $cfg['NumRecentTables']
1308     :type: integer
1309     :default: 10
1311     The maximum number of recently used tables shown in the navigation
1312     panel. Set this to 0 (zero) to disable the listing of recent tables.
1314 .. config:option:: $cfg['ShowTooltip']
1316     :type: boolean
1317     :default: true
1319     Defines whether to display item comments as tooltips in navigation
1320     panel or not.
1322 .. config:option:: $cfg['NavigationDisplayLogo']
1324     :type: boolean
1325     :default: true
1327     Defines whether or not to display the phpMyAdmin logo at the top of
1328     the navigation panel.
1330 .. config:option:: $cfg['NavigationLogoLink']
1332     :type: string
1333     :default: ``'index.php'``
1335     Enter :term:`URL` where logo in the
1336     navigation panel will point to. For use especially with self made
1337     theme which changes this.
1339 .. config:option:: $cfg['NavigationLogoLinkWindow']
1341     :type: string
1342     :default: ``'main'``
1344     Whether to open the linked page in the main window (``main``) or in a
1345     new one (``new``). Note: use ``new`` if you are linking to
1346     ``phpmyadmin.net``.
1348 .. config:option:: $cfg['NavigationTreeDisplayItemFilterMinimum']
1350     :type: integer
1351     :default: 30
1353     Defines the minimum number of items (tables, views, routines and
1354     events) to display a JavaScript filter box above the list of items in
1355     the navigation tree. 
1356     
1357     To disable the filter completely some high number can be used (e.g. 9999)
1359 .. config:option:: $cfg['NavigationTreeDisplayDbFilterMinimum']
1361     :type: integer
1362     :default: 30
1364     Defines the minimum number of databases to display a JavaScript filter
1365     box above the list of databases in the navigation tree.
1366     
1367     To disable the filter completely some high number can be used
1368     (e.g. 9999)
1370 .. config:option:: $cfg['NavigationDisplayServers']
1372     :type: boolean
1373     :default: true 
1375     Defines whether or not to display a server choice at the top of the
1376     navigation panel.
1378 .. config:option:: $cfg['DisplayServersList']
1380     :type: boolean
1381     :default: false
1383     Defines whether to display this server choice as links instead of in a
1384     drop-down.
1386 .. config:option:: $cfg['NavigationTreeDefaultTabTable']
1388     :type: string
1389     :default: ``'tbl_structure.php'``
1391     Defines the tab displayed by default when clicking the small icon next
1392     to each table name in the navigation panel. Possible values:
1394     * ``tbl_structure.php``
1395     * ``tbl_sql.php``
1396     * ``tbl_select.php``
1397     * ``tbl_change.php``
1398     * ``sql.php``
1400 Main panel
1401 ----------
1403 .. config:option:: $cfg['ShowStats']
1405     :type: boolean
1406     :default: true
1408     Defines whether or not to display space usage and statistics about
1409     databases and tables. Note that statistics requires at least MySQL
1410     3.23.3 and that, at this date, MySQL doesn't return such information
1411     for Berkeley DB tables.
1413 .. config:option:: $cfg['ShowServerInfo']
1415     :type: boolean
1416     :default: true
1418     Defines whether to display detailed server information on main page.
1419     You can additionally hide more information by using 
1420     :config:option:`$cfg['Servers'][$i]['verbose']`.
1422 .. config:option:: $cfg['ShowPhpInfo']
1424     :type: boolean
1425     :default: false
1427 .. config:option:: $cfg['ShowChgPassword']
1429     :type: boolean
1430     :default: true
1432 .. config:option:: $cfg['ShowCreateDb']
1434     :type: boolean
1435     :default: true
1437     Defines whether to display the :guilabel:`PHP information` and
1438     :guilabel:`Change password` links and form for creating database or not at
1439     the starting main (right) frame. This setting does not check MySQL commands
1440     entered directly. 
1441     
1442     Please note that to block the usage of ``phpinfo()`` in scripts, you have to
1443     put this in your :file:`php.ini`:
1445     .. code-block:: ini
1447         disable_functions = phpinfo()
1449     Also note that enabling the :guilabel:`Change password` link has no effect
1450     with config authentication mode: because of the hard coded password value
1451     in the configuration file, end users can't be allowed to change their
1452     passwords.
1454 Database structure
1455 ------------------
1457 .. config:option:: $cfg['ShowDbStructureCreation']
1459     :type: boolean
1460     :default: false
1462     Defines whether the database structure page (tables list) has a
1463     "Creation" column that displays when each table was created.
1465 .. config:option:: $cfg['ShowDbStructureLastUpdate']
1467     :type: boolean
1468     :default: false
1470     Defines whether the database structure page (tables list) has a "Last
1471     update" column that displays when each table was last updated.
1473 .. config:option:: $cfg['ShowDbStructureLastCheck']
1475     :type: boolean
1476     :default: false
1478     Defines whether the database structure page (tables list) has a "Last
1479     check" column that displays when each table was last checked.
1481 .. config:option:: $cfg['HideStructureActions']
1483     :type: boolean
1484     :default: true
1486     Defines whether the table structure actions are hidden under a "More"
1487     drop-down.
1489 Browse mode
1490 -----------
1492 .. config:option:: $cfg['NavigationBarIconic']
1494     :type: string
1495     :default: true
1497     Defines whether navigation bar buttons and the right panel top menu
1498     contain text or symbols only. A value of true displays icons, false
1499     displays text and 'both' displays both icons and text.
1501 .. config:option:: $cfg['ShowAll']
1503     :type: boolean
1504     :default: false
1506     Defines whether a user should be displayed a "Show all" button in
1507     browse mode or not in all cases. By default it is shown only on small
1508     tables (less than 5 × :config:option:`$cfg['MaxRows']` rows) to avoid
1509     performance issues while getting too many rows.
1511 .. config:option:: $cfg['MaxRows']
1513     :type: integer
1514     :default: 30
1516     Number of rows displayed when browsing a result set and no LIMIT
1517     clause is used. If the result set contains more rows, "Previous" and
1518     "Next" links will be shown.
1520 .. config:option:: $cfg['Order']
1522     :type: string
1523     :default: ``'SMART'``
1525     Defines whether columns are displayed in ascending (``ASC``) order, in
1526     descending (``DESC``) order or in a "smart" (``SMART``) order - I.E.
1527     descending order for columns of type TIME, DATE, DATETIME and
1528     TIMESTAMP, ascending order else- by default.
1530 .. config:option:: $cfg['DisplayBinaryAsHex']
1532     :type: boolean
1533     :default: true
1535     Defines whether the "Show binary contents as HEX" browse option is
1536     ticked by default.
1538 .. config:option:: $cfg['GridEditing']
1540     :type: string
1541     :default: ``'double-click'``
1543     Defines which action (``double-click`` or ``click``) triggers grid
1544     editing. Can be deactived with the ``disabled`` value.
1546 .. config:option:: $cfg['SaveCellsAtOnce']
1548     :type: boolean
1549     :default: false
1551     Defines whether or not to save all edited cells at once for grid
1552     editing.
1554 Editing mode
1555 ------------
1557 .. config:option:: $cfg['ProtectBinary']
1559     :type: boolean or string
1560     :default: ``'blob'``
1562     Defines whether ``BLOB`` or ``BINARY`` columns are protected from
1563     editing when browsing a table's content. Valid values are:
1565     * ``false`` to allow editing of all columns;
1566     * ``'blob'`` to allow editing of all columns except ``BLOBS``;
1567     * ``'noblob'`` to disallow editing of all columns except ``BLOBS`` (the
1568       opposite of ``'blob'``);
1569     * ``'all'`` to disallow editing of all ``BINARY`` or ``BLOB`` columns.
1571 .. config:option:: $cfg['ShowFunctionFields']
1573     :type: boolean
1574     :default: true
1576     Defines whether or not MySQL functions fields should be initially
1577     displayed in edit/insert mode. Since version 2.10, the user can toggle
1578     this setting from the interface.
1580 .. config:option:: $cfg['ShowFieldTypesInDataEditView']
1582     :type: boolean
1583     :default: true
1585     Defines whether or not type fields should be initially displayed in
1586     edit/insert mode. The user can toggle this setting from the interface.
1588 .. config:option:: $cfg['InsertRows']
1590     :type: integer
1591     :default: 2
1593     Defines the maximum number of concurrent entries for the Insert page.
1595 .. config:option:: $cfg['ForeignKeyMaxLimit']
1597     :type: integer
1598     :default: 100
1600     If there are fewer items than this in the set of foreign keys, then a
1601     drop-down box of foreign keys is presented, in the style described by
1602     the :config:option:`$cfg['ForeignKeyDropdownOrder']` setting.
1604 .. config:option:: $cfg['ForeignKeyDropdownOrder']
1606     :type: array
1607     :default: array('content-id', 'id-content')
1609     For the foreign key drop-down fields, there are several methods of
1610     display, offering both the key and value data. The contents of the
1611     array should be one or both of the following strings: ``content-id``,
1612     ``id-content``.
1614 Export and import settings
1615 --------------------------
1617 .. config:option:: $cfg['ZipDump']
1619     :type: boolean
1620     :default: true
1622 .. config:option:: $cfg['GZipDump']
1624     :type: boolean
1625     :default: true
1627 .. config:option:: $cfg['BZipDump']
1629     :type: boolean
1630     :default: true
1632     Defines whether to allow the use of zip/GZip/BZip2 compression when
1633     creating a dump file
1635 .. config:option:: $cfg['CompressOnFly']
1637     :type: boolean
1638     :default: true
1640     Defines whether to allow on the fly compression for GZip/BZip2
1641     compressed exports. This doesn't affect smaller dumps and allows users
1642     to create larger dumps that won't otherwise fit in memory due to php
1643     memory limit. Produced files contain more GZip/BZip2 headers, but all
1644     normal programs handle this correctly.
1646 .. config:option:: $cfg['Export']
1648     :type: array
1649     :default: array(...)
1651     In this array are defined default parameters for export, names of
1652     items are similar to texts seen on export page, so you can easily
1653     identify what they mean.
1655 .. config:option:: $cfg['Export']['method']
1657     :type: string
1658     :default: ``'quick'``
1660     Defines how the export form is displayed when it loads. Valid values
1661     are:
1663     * ``quick`` to display the minimum number of options to configure
1664     * ``custom`` to display every available option to configure
1665     * ``custom-no-form`` same as ``custom`` but does not display the option
1666       of using quick export
1670 .. config:option:: $cfg['Import']
1672     :type: array
1673     :default: array(...)
1675     In this array are defined default parameters for import, names of
1676     items are similar to texts seen on import page, so you can easily
1677     identify what they mean.
1680 Tabs display settings
1681 ---------------------
1683 .. config:option:: $cfg['PropertiesIconic']
1685     :type: string
1686     :default: ``'both'``
1688     If set to ``true``, will display icons instead of text for db and table
1689     properties links (like :guilabel:`Browse`, :guilabel:`Select`,
1690     :guilabel:`Insert`, ...). Can be set to ``'both'`` if you want icons AND
1691     text. When set to ``false``, will only show text.
1693 .. config:option:: $cfg['PropertiesNumColumns']
1695     :type: integer
1696     :default: 1
1698     How many columns will be utilized to display the tables on the database
1699     property view? When setting this to a value larger than 1, the type of the
1700     database will be omitted for more display space.
1702 .. config:option:: $cfg['DefaultTabServer']
1704     :type: string
1705     :default: ``'index.php'``
1707     Defines the tab displayed by default on server view. Possible values:
1709     * ``main.php`` (recommended for multi-user setups)
1710     * ``server_databases.php``,
1711     * ``server_status.php``
1712     * ``server_variables.php``
1713     * ``server_privileges.php``
1715 .. config:option:: $cfg['DefaultTabDatabase']
1717     :type: string
1718     :default: ``'db_structure.php'``
1720     Defines the tab displayed by default on database view. Possible
1721     values: 
1722     
1723     * ``db_structure.php``
1724     * ``db_sql.php`` 
1725     * ``db_search.php``.
1727 .. config:option:: $cfg['DefaultTabTable']
1729     :type: string
1730     :default: ``'sql.php'``
1732     Defines the tab displayed by default on table view. Possible values:
1734     * ``tbl_structure.php``
1735     * ``tbl_sql.php``
1736     * ``tbl_select.php``
1737     * ``tbl_change.php`` 
1738     * ``sql.php``
1740 Documentation
1741 -------------
1743 .. config:option:: $cfg['MySQLManualBase']
1745     :type: string
1746     :default: ``'http://dev.mysql.com/doc/refman'``
1748     If set to an :term:`URL` which points to
1749     the MySQL documentation (type depends on
1750     :config:option:`$cfg['MySQLManualType']`), appropriate help links are
1751     generated. 
1753     See `MySQL Documentation page <http://dev.mysql.com/doc/>`_ for more
1754     information about MySQL manuals and their types.
1756 .. config:option:: $cfg['MySQLManualType']
1758     :type: string
1759     :default: ``'viewable'``
1761     Type of MySQL documentation:
1763     * viewable - "viewable online", current one used on MySQL website
1764     * searchable - "Searchable, with user comments"
1765     * chapters - "HTML, one page per chapter"
1766     * big - "HTML, all on one page"
1767     * none - do not show documentation links
1769 Languages
1770 ---------
1772 .. config:option:: $cfg['DefaultLang']
1774     :type: string
1775     :default: ``'en'``
1777     Defines the default language to use, if not browser-defined or user-
1778     defined. The corresponding language file needs to be in
1779     locale/*code*/LC\_MESSAGES/phpmyadmin.mo.
1781 .. config:option:: $cfg['DefaultConnectionCollation']
1783     :type: string
1784     :default: ``'utf8_general_ci'``
1786     Defines the default connection collation to use, if not user-defined.
1787     See the `MySQL documentation <http://dev.mysql.com/doc/mysql/en
1788     /charset-charsets.html>`_ for list of possible values. This setting is
1789     ignored when connected to Drizzle server.
1791 .. config:option:: $cfg['Lang']
1793     :type: string
1794     :default: not set
1796     Force language to use. The corresponding language file needs to be in
1797     locale/*code*/LC\_MESSAGES/phpmyadmin.mo.
1799 .. config:option:: $cfg['FilterLanguages']
1801     :type: string
1802     :default: ``''``
1804     Limit list of available languages to those matching the given regular
1805     expression. For example if you want only Czech and English, you should
1806     set filter to ``'^(cs|en)'``.
1808 .. config:option:: $cfg['RecodingEngine']
1810     :type: string
1811     :default: ``'auto'``
1813     You can select here which functions will be used for character set
1814     conversion. Possible values are:
1816     * auto - automatically use available one (first is tested iconv, then
1817       recode)
1818     * iconv - use iconv or libiconv functions
1819     * recode - use recode\_string function
1820     * none - disable encoding conversion
1822     Enabled charset conversion activates a pull-down menu in the Export
1823     and Import pages, to choose the character set when exporting a file.
1824     The default value in this menu comes from
1825     :config:option:`$cfg['Export']['charset']` and :config:option:`$cfg['Import']['charset']`.
1827 .. config:option:: $cfg['IconvExtraParams']
1829     :type: string
1830     :default: ``'//TRANSLIT'``
1832     Specify some parameters for iconv used in charset conversion. See
1833     `iconv documentation <http://www.gnu.org/software/libiconv/documentati
1834     on/libiconv/iconv_open.3.html>`_ for details. By default
1835     ``//TRANSLIT`` is used, so that invalid characters will be
1836     transliterated.
1838 .. config:option:: $cfg['AvailableCharsets']
1840     :type: array
1841     :default: array(..._
1843     Available character sets for MySQL conversion. You can add your own
1844     (any of supported by recode/iconv) or remove these which you don't
1845     use. Character sets will be shown in same order as here listed, so if
1846     you frequently use some of these move them to the top.
1848 Web server settings
1849 -------------------
1851 .. config:option:: $cfg['OBGzip']
1853     :type: string/boolean
1854     :default: ``'auto'``
1856     Defines whether to use GZip output buffering for increased speed in
1857     :term:`HTTP` transfers. Set to
1858     true/false for enabling/disabling. When set to 'auto' (string),
1859     phpMyAdmin tries to enable output buffering and will automatically
1860     disable it if your browser has some problems with buffering. IE6 with
1861     a certain patch is known to cause data corruption when having enabled
1862     buffering.
1864 .. config:option:: $cfg['TrustedProxies']
1866     :type: array
1867     :default: array()
1869     Lists proxies and HTTP headers which are trusted for 
1870     :config:option:`$cfg['Servers'][$i]['AllowDeny']['order']`. This list is by
1871     default empty, you need to fill in some trusted proxy servers if you
1872     want to use rules for IP addresses behind proxy. 
1874     The following example specifies that phpMyAdmin should trust a
1875     HTTP\_X\_FORWARDED\_FOR (``X -Forwarded-For``) header coming from the proxy
1876     1.2.3.4:
1878     .. code-block:: php
1879         
1880         $cfg['TrustedProxies'] = array('1.2.3.4' => 'HTTP_X_FORWARDED_FOR');
1882     The :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` directive uses the
1883     client's IP address as usual.
1885 .. config:option:: $cfg['GD2Available']
1887     :type: string
1888     :default: ``'auto'``
1890     Specifies whether GD >= 2 is available. If yes it can be used for MIME
1891     transformations. Possible values are:
1893     * auto - automatically detect
1894     * yes - GD 2 functions can be used
1895     * no - GD 2 function cannot be used
1897 .. config:option:: $cfg['CheckConfigurationPermissions']
1899     :type: boolean
1900     :default: true
1902     We normally check the permissions on the configuration file to ensure
1903     it's not world writable. However, phpMyAdmin could be installed on a
1904     NTFS filesystem mounted on a non-Windows server, in which case the
1905     permissions seems wrong but in fact cannot be detected. In this case a
1906     sysadmin would set this parameter to ``false``.
1908 .. config:option:: $cfg['LinkLengthLimit']
1910     :type: integer
1911     :default: 1000
1913     Limit for length of :term:`URL` in links.  When length would be above this
1914     limit, it is replaced by form with button. This is required as some web
1915     servers (:term:`IIS`) have problems with long :term:`URL` .
1917 .. config:option:: $cfg['DisableMultiTableMaintenance']
1919     :type: boolean
1920     :default: false
1922     In the database Structure page, it's possible to mark some tables then
1923     choose an operation like optimizing for many tables. This can slow
1924     down a server; therefore, setting this to ``true`` prevents this kind
1925     of multiple maintenance operation.
1927 Theme settings
1928 --------------
1930 .. config:option:: $cfg['NaviWidth']
1932     :type: integer
1933     :default:
1935     Navigation panel width in pixels. See
1936     :file:`themes/themename/layout.inc.php`.
1938 .. config:option:: $cfg['NaviBackground']
1940     :type: string [CSS color for background]
1941     :default:
1943 .. config:option:: $cfg['MainBackground']
1945     :type: string [CSS color for background]
1946     :default:
1948     The background styles used for both the frames. See
1949     :file:`themes/themename/layout.inc.php`.
1951 .. config:option:: $cfg['NaviPointerBackground']
1953     :type: string [CSS color for background]
1954     :default:
1956 .. config:option:: $cfg['NaviPointerColor']
1958     :type: string [CSS color]
1959     :default:
1961     The style used for the pointer in the navi frame. See
1962     :file:`themes/themename/layout.inc.php`.
1964 .. config:option:: $cfg['Border']
1966     :type: integer
1967     :default:
1969     The size of a table's border. See :file:`themes/themename/layout.inc.php`.
1971 .. config:option:: $cfg['ThBackground']
1973     :type: string [CSS color for background]
1974     :default:
1976 .. config:option:: $cfg['ThColor']
1978     :type: string [CSS color]
1979     :default:
1981     The style used for table headers. See
1982     :file:`themes/themename/layout.inc.php`.
1984 .. _cfg_BgcolorOne:
1985 .. config:option:: $cfg['BgOne']
1987     :type: string [CSS color]
1988     :default:
1990     The color (HTML) #1 for table rows. See
1991     :file:`themes/themename/layout.inc.php`.
1993 .. _cfg_BgcolorTwo:
1994 .. config:option:: $cfg['BgTwo']
1996     :type: string [CSS color]
1997     :default:
1999     The color (HTML) #2 for table rows. See
2000     :file:`themes/themename/layout.inc.php`.
2002 .. config:option:: $cfg['BrowsePointerBackground']
2004     :type: string [CSS color]
2005     :default:
2007 .. config:option:: $cfg['BrowsePointerColor']
2009     :type: string [CSS color]
2010     :default:
2012 .. config:option:: $cfg['BrowseMarkerBackground']
2014     :type: string [CSS color]
2015     :default:
2017 .. config:option:: $cfg['BrowseMarkerColor']
2019     :type: string [CSS color]
2020     :default:
2022     The colors (HTML) uses for the pointer and the marker in browse mode.
2023     The former feature highlights the row over which your mouse is passing
2024     and the latter lets you visually mark/unmark rows by clicking on the
2025     corresponding checkbox. Highlighting / marking a column is done by
2026     hovering over / clicking the column's header (outside of the text).
2027     See :file:`themes/themename/layout.inc.php`.
2029 .. config:option:: $cfg['FontFamily']
2031     :type: string
2032     :default:
2034     You put here a valid CSS font family value, for example ``arial, sans-
2035     serif``. See :file:`themes/themename/layout.inc.php`.
2037 .. config:option:: $cfg['FontFamilyFixed']
2039     :type: string
2040     :default:
2042     You put here a valid CSS font family value, for example ``monospace``.
2043     This one is used in textarea. See :file:`themes/themename/layout.inc.php`.
2045 Design customization
2046 --------------------
2048 .. config:option:: $cfg['NavigationTreePointerEnable']
2050     :type: boolean
2051     :default: true
2053     A value of ``true`` activates the navi pointer.
2055 .. config:option:: $cfg['BrowsePointerEnable']
2057     :type: boolean
2058     :default: true
2060     Whether to activate the browse pointer or not.
2062 .. config:option:: $cfg['BrowseMarkerEnable']
2064     :type: boolean
2065     :default: true
2067     Whether to activate the browse marker or not.
2069 .. config:option:: $cfg['LimitChars']
2071     :type: integer
2072     :default: 50
2074     Maximum number of characters shown in any non-numeric field on browse
2075     view. Can be turned off by a toggle button on the browse page.
2077 .. config:option:: $cfg['RowActionLinks']
2079     :type: string
2080     :default: ``'left'``
2082     Defines the place where table row links (Edit, Copy, Delete) would be
2083     put when tables contents are displayed (you may have them displayed at
2084     the left side, right side, both sides or nowhere). "left" and "right"
2085     are parsed as "top" and "bottom" with vertical display mode.
2087 .. config:option:: $cfg['DefaultDisplay']
2089     :type: string
2090     :default: ``'horizonta'``
2092     There are 3 display modes: horizontal, horizontalflipped and vertical.
2093     Define which one is displayed by default. The first mode displays each
2094     row on a horizontal line, the second rotates the headers by 90
2095     degrees, so you can use descriptive headers even though columns only
2096     contain small values and still print them out. The vertical mode sorts
2097     each row on a vertical lineup.
2099 .. config:option:: $cfg['RememberSorting']
2101     :type: boolean
2102     :default: true
2104     If enabled, remember the sorting of each table when browsing them.
2106 .. config:option:: $cfg['HeaderFlipType']
2108     :type: string
2109     :default: ``'auto'``
2111     The HeaderFlipType can be set to 'auto', 'css' or 'fake'. When using
2112     'css' the rotation of the header for horizontalflipped is done via
2113     CSS. The CSS transformation currently works only in Internet
2114     Explorer.If set to 'fake' PHP does the transformation for you, but of
2115     course this does not look as good as CSS. The 'auto' option enables
2116     CSS transformation when browser supports it and use PHP based one
2117     otherwise.
2119 .. config:option:: $cfg['ShowBrowseComments']
2121     :type: boolean
2122     :default: true
2124 .. config:option:: $cfg['ShowPropertyComments']
2126     :type: boolean
2127     :default: true
2129     By setting the corresponding variable to ``true`` you can enable the
2130     display of column comments in Browse or Property display. In browse
2131     mode, the comments are shown inside the header. In property mode,
2132     comments are displayed using a CSS-formatted dashed-line below the
2133     name of the column. The comment is shown as a tool-tip for that
2134     column.
2136 Text fields
2137 -----------
2139 .. config:option:: $cfg['CharEditing']
2141     :type: string
2142     :default: ``'input'``
2144     Defines which type of editing controls should be used for CHAR and
2145     VARCHAR columns. Possible values are:
2147     * input - this allows to limit size of text to size of columns in MySQL,
2148       but has problems with newlines in columns
2149     * textarea - no problems with newlines in columns, but also no length
2150       limitations
2152 .. config:option:: $cfg['MinSizeForInputField']
2154     :type: integer
2155     :default: 4
2157     Defines the minimum size for input fields generated for CHAR and
2158     VARCHAR columns.
2160 .. config:option:: $cfg['MaxSizeForInputField']
2162     :type: integer
2163     :default: 60
2165     Defines the maximum size for input fields generated for CHAR and
2166     VARCHAR columns.
2168 .. config:option:: $cfg['TextareaCols']
2170     :type: integer
2171     :default: 40
2173 .. config:option:: $cfg['TextareaRows']
2175     :type: integer
2176     :default: 15
2178 .. config:option:: $cfg['CharTextareaCols']
2180     :type: integer
2181     :default: 40
2183 .. config:option:: $cfg['CharTextareaRows']
2185     :type: integer
2186     :default: 2
2188     Number of columns and rows for the textareas. This value will be
2189     emphasized (\*2) for :term:`SQL` query
2190     textareas and (\*1.25) for :term:`SQL`
2191     textareas inside the query window.
2193     The Char\* values are used for CHAR
2194     and VARCHAR editing (if configured via :config:option:`$cfg['CharEditing']`).
2196 .. config:option:: $cfg['LongtextDoubleTextarea']
2198     :type: boolean
2199     :default: true
2201     Defines whether textarea for LONGTEXT columns should have double size.
2203 .. config:option:: $cfg['TextareaAutoSelect']
2205     :type: boolean
2206     :default: false
2208     Defines if the whole textarea of the query box will be selected on
2209     click.
2212 SQL query box settings
2213 ----------------------
2215 .. config:option:: $cfg['SQLQuery']['Edit']
2217     :type: boolean
2218     :default: true
2220     Whether to display an edit link to change a query in any SQL Query
2221     box.
2223 .. config:option:: $cfg['SQLQuery']['Explain']
2225     :type: boolean
2226     :default: true
2228     Whether to display a link to explain a SELECT query in any SQL Query
2229     box.
2231 .. config:option:: $cfg['SQLQuery']['ShowAsPHP']
2233     :type: boolean
2234     :default: true
2236     Whether to display a link to wrap a query in PHP code in any SQL Query
2237     box.
2239 .. config:option:: $cfg['SQLQuery']['Validate']
2241     :type: boolean
2242     :default: false
2244     Whether to display a link to validate a query in any SQL Query box.
2246     .. seealso:: :config:option:`$cfg['SQLValidator']`
2248 .. config:option:: $cfg['SQLQuery']['Refresh']
2250     :type: boolean
2251     :default: true
2253     Whether to display a link to refresh a query in any SQL Query box.
2255 Web server upload/save/import directories
2256 -----------------------------------------
2258 .. config:option:: $cfg['UploadDir']
2260     :type: string
2261     :default: ``''``
2263     The name of the directory where :term:`SQL` files have been uploaded by
2264     other means than phpMyAdmin (for example, ftp). Those files are available
2265     under a drop-down box when you click the database or table name, then the
2266     Import tab. 
2268     If
2269     you want different directory for each user, %u will be replaced with
2270     username. 
2272     Please note that the file names must have the suffix ".sql"
2273     (or ".sql.bz2" or ".sql.gz" if support for compressed formats is
2274     enabled).
2276     This feature is useful when your file is too big to be
2277     uploaded via :term:`HTTP`, or when file
2278     uploads are disabled in PHP.
2280     .. note::
2281        
2282         If PHP is running in safe mode, this directory must be owned by the same
2283         user as the owner of the phpMyAdmin scripts.  See also :ref:`faq1_16` for
2284         alternatives.
2286 .. config:option:: $cfg['SaveDir']
2288     :type: string
2289     :default: ``''``
2291     The name of the directory where dumps can be saved. 
2293     If you want different directory for each user, %u will be replaced with
2294     username.
2296     Please note that the directory must exist and has to be writable for
2297     the user running webserver. 
2299     .. note:: 
2300        
2301         If PHP is running in safe mode, this directory must be owned by the same
2302         user as the owner of the phpMyAdmin scripts.
2304 .. config:option:: $cfg['TempDir']
2306     :type: string
2307     :default: ``''``
2309     The name of the directory where temporary files can be stored. 
2311     This is needed for importing ESRI Shapefiles, see :ref:`faq6_30` and to
2312     work around limitations of ``open_basedir`` for uploaded files, see
2313     :ref:`faq1_11`.  
2315     If the directory where phpMyAdmin is installed is
2316     subject to an ``open_basedir`` restriction, you need to create a
2317     temporary directory in some directory accessible by the web server.
2318     However for security reasons, this directory should be outside the
2319     tree published by webserver. If you cannot avoid having this directory
2320     published by webserver, place at least an empty :file:`index.html` file
2321     there, so that directory listing is not possible.
2323     This directory should have as strict permissions as possible as the only
2324     user required to access this directory is the one who runs the webserver.
2325     If you have root privileges, simply make this user owner of this directory
2326     and make it accessible only by it:
2328     .. code-block:: sh
2330         
2331         chown www-data:www-data tmp
2332         chmod 700 tmp
2334     If you cannot change owner of the directory, you can achieve a similar
2335     setup using :term:`ACL`:
2337     .. code-block:: sh
2339         chmod 700 tmp
2340         setfacl -m "g:www-data:rwx" tmp
2341         setfacl -d -m "g:www-data:rwx" tmp
2343     If neither of above works for you, you can still make the directory
2344     :command:`chmod 777`, but it might impose risk of other users on system
2345     reading and writing data in this directory.
2347 Various display setting
2348 -----------------------
2350 .. config:option:: $cfg['ShowDisplayDirection']
2352     :type: boolean
2353     :default: false
2355     Defines whether or not type display direction option is shown when
2356     browsing a table.
2358 .. config:option:: $cfg['RepeatCells']
2360     :type: integer
2361     :default: 100
2363     Repeat the headers every X cells, or 0 to deactivate.
2365 .. config:option:: $cfg['EditInWindow']
2367     :type: boolean
2368     :default: true
2370 .. config:option:: $cfg['QueryWindowWidth']
2372     :type: integer
2373     :default: 550
2375 .. config:option:: $cfg['QueryWindowHeight']
2377     :type: integer
2378     :default: 310
2380 .. config:option:: $cfg['QueryHistoryDB']
2382     :type: boolean
2383     :default: false
2385 .. config:option:: $cfg['QueryWindowDefTab']
2387     :type: string
2388     :default: ``'sql'``
2390 .. config:option:: $cfg['QueryHistoryMax']
2392     :type: integer
2393     :default: 25
2395     All those variables affect the query window feature. A :term:`SQL` link or
2396     icon is always displayed in the navigation panel. If JavaScript is enabled
2397     in your browser, a click on this opens a distinct query window, which is a
2398     direct interface to enter :term:`SQL` queries. Otherwise, the right panel
2399     changes to display a query box. 
2401     The size of this query window can be customized with
2402     :config:option:`$cfg['QueryWindowWidth']` and
2403     :config:option:`$cfg['QueryWindowHeight']` - both integers for the size in
2404     pixels.  Note that normally, those parameters will be modified in
2405     :file:`layout.inc.php`` for the theme you are using. 
2407     If :config:option:`$cfg['EditInWindow']` is set to true, a click on [Edit]
2408     from the results page (in the :guilabel:`Showing Rows` section) opens the
2409     query window and puts the current query inside it. If set to false,
2410     clicking on the link puts the :term:`SQL` query
2411     in the right panel's query box.  
2413     If :config:option:`$cfg['QueryHistoryDB']` is set to ``true``, all your
2414     Queries are logged to a table, which has to be created by you (see
2415     :config:option:`$cfg['Servers'][$i]['history']`). If set to false, all your
2416     queries will be appended to the form, but only as long as your window is
2417     opened they remain saved.  
2419     When using the JavaScript based query window, it will always get updated
2420     when you click on a new table/db to browse and will focus if you click on
2421     :guilabel:`Edit SQL` after using a query. You can suppress updating the
2422     query window by checking the box :guilabel:`Do not overwrite this query
2423     from outside the window` below the query textarea. Then you can browse
2424     tables/databases in the background without losing the contents of the
2425     textarea, so this is especially useful when composing a query with tables
2426     you first have to look in. The checkbox will get automatically checked
2427     whenever you change the contents of the textarea. Please uncheck the button
2428     whenever you definitely want the query window to get updated even though
2429     you have made alterations. 
2431     If :config:option:`$cfg['QueryHistoryDB']` is set to ``true`` you can
2432     specify the amount of saved history items using
2433     :config:option:`$cfg['QueryHistoryMax']`. 
2435     The query window also has a custom tabbed look to group the features.
2436     Using the variable :config:option:`$cfg['QueryWindowDefTab']` you can
2437     specify the default tab to be used when opening the query window. It can be
2438     set to either ``sql``, ``files``, ``history`` or ``full``.
2440 .. config:option:: $cfg['BrowseMIME']
2442     :type: boolean
2443     :default: true
2445     Enable :ref:`transformations`.
2447 .. config:option:: $cfg['MaxExactCount']
2449     :type: integer
2450     :default: 0
2452     For InnoDB tables, determines for how large tables phpMyAdmin should
2453     get the exact row count using ``SELECT COUNT``. If the approximate row
2454     count as returned by ``SHOW TABLE STATUS`` is smaller than this value,
2455     ``SELECT COUNT`` will be used, otherwise the approximate count will be
2456     used.
2458 .. config:option:: $cfg['MaxExactCountViews']
2460     :type: integer
2461     :default: 0
2463     For VIEWs, since obtaining the exact count could have an impact on
2464     performance, this value is the maximum to be displayed, using a
2465     ``SELECT COUNT ... LIMIT``. Setting this to 0 bypasses any row
2466     counting.
2468 .. config:option:: $cfg['NaturalOrder']
2470     :type: boolean
2471     :default: true
2473     Sorts database and table names according to natural order (for
2474     example, t1, t2, t10). Currently implemented in the navigation panel
2475     and in Database view, for the table list.
2477 .. config:option:: $cfg['InitialSlidersState']
2479     :type: string
2480     :default: ``'closed'``
2482     If set to ``'closed'``, the visual sliders are initially in a closed
2483     state. A value of ``'open'`` does the reverse. To completely disable
2484     all visual sliders, use ``'disabled'``.
2486 .. config:option:: $cfg['UserprefsDisallow']
2488     :type: array
2489     :default: array()
2491     Contains names of configuration options (keys in ``$cfg`` array) that
2492     users can't set through user preferences. For possible values, refer
2493     to :file:`libraries/config/user_preferences.forms.php`.
2495 .. config:option:: $cfg['UserprefsDeveloperTab']
2497     :type: boolean
2498     :default: false
2500     Activates in the user preferences a tab containing options for
2501     developers of phpMyAdmin.
2503 Page titles
2504 -----------
2506 .. config:option:: $cfg['TitleTable']
2508     :type: string
2509     :default: ``'@HTTP_HOST@ / @VSERVER@ / @DATABASE@ / @TABLE@ | @PHPMYADMIN@'``
2511 .. config:option:: $cfg['TitleDatabase']
2513     :type: string
2514     :default: ``'@HTTP_HOST@ / @VSERVER@ / @DATABASE@ | @PHPMYADMIN@'``
2516 .. config:option:: $cfg['TitleServer']
2518     :type: string
2519     :default: ``'@HTTP_HOST@ / @VSERVER@ | @PHPMYADMIN@'``
2521 .. config:option:: $cfg['TitleDefault']
2523     :type: string
2524     :default: ``'@HTTP_HOST@ | @PHPMYADMIN@'``
2526     Allows you to specify window's title bar. You can use :ref:`faq6_27`.
2528 Theme manager settings
2529 ----------------------
2531 .. config:option:: $cfg['ThemePath']
2533     :type: string
2534     :default: ``'./themes'``
2536     If theme manager is active, use this as the path of the subdirectory
2537     containing all the themes.
2539 .. config:option:: $cfg['ThemeManager']
2541     :type: boolean
2542     :default: true
2544     Enables user-selectable themes. See :ref:`faqthemes`.
2546 .. config:option:: $cfg['ThemeDefault']
2548     :type: string
2549     :default: ``'pmahomme'``
2551     The default theme (a subdirectory under :config:option:`$cfg['ThemePath']`).
2553 .. config:option:: $cfg['ThemePerServer']
2555     :type: boolean
2556     :default: false
2558     Whether to allow different theme for each server.
2560 Default queries
2561 ---------------
2563 .. config:option:: $cfg['DefaultQueryTable']
2565     :type: string
2566     :default: ``'SELECT * FROM @TABLE@ WHERE 1'``
2568 .. config:option:: $cfg['DefaultQueryDatabase']
2570     :type: string
2571     :default: ``''``
2573     Default queries that will be displayed in query boxes when user didn't
2574     specify any. You can use standard :ref:`faq6_27`.
2576 SQL parser settings
2577 -------------------
2579 .. config:option:: $cfg['SQP']['fmtType']
2581     :type: string
2582     :default: ``'html'``
2584     The main use of the new :term:`SQL` Parser
2585     is to pretty-print :term:`SQL` queries. By
2586     default we use HTML to format the query, but you can disable this by
2587     setting this variable to ``'none'``.
2589     Available options:
2591     * ``'html'``
2592     * ``'none'``
2594 .. _cfg_SQP:
2595 .. config:option:: $cfg['SQP']['fmtInd']
2597     :type: float
2598     :default: ``'1'``
2600 .. config:option:: $cfg['SQP']['fmtIndUnit']
2602     :type: string
2603     :default: ``'em'``
2605     For the pretty-printing of :term:`SQL` queries,
2606     under some cases the part of a query inside a bracket is indented. By
2607     changing :config:option:`$cfg['SQP']['fmtInd']` you can change the amount
2608     of this indent. 
2610     Related in purpose is :config:option:`$cfg['SQP']['fmtIndUnit']` which
2611     specifies the units of the indent amount that you specified. This is used
2612     via stylesheets.
2614     You can use any HTML unit, for example:
2616     * ``'em'``
2617     * ``'ex'``
2618     * ``'pt'``
2619     * ``'px'``
2621 .. config:option:: $cfg['SQP']['fmtColor']
2623     :type: array of string tuples
2624     :default:
2626     This array is used to define the colours for each type of element of
2627     the pretty-printed :term:`SQL` queries.
2628     The tuple format is *class* => [*HTML colour code* | *empty string*]
2631     If you specify an empty string for the color of a class, it is ignored
2632     in creating the stylesheet. You should not alter the class names, only
2633     the colour strings.
2634     
2635     **Class name key:**
2637     comment
2638         Applies to all comment sub-classes
2639     comment\_mysql
2640         Comments as ``"#...\n"``
2641     comment\_ansi
2642         Comments as ``"-- ...\n"``
2643     comment\_c
2644         Comments as ``"/*...*/"``
2645     digit
2646         Applies to all digit sub-classes
2647     digit\_hex
2648         Hexadecimal numbers
2649     digit\_integer
2650         Integer numbers
2651     digit\_float
2652         Floating point numbers
2653     punct
2654         Applies to all punctuation sub-classes
2655     punct\_bracket\_open\_round
2656         Opening brackets ``"("``
2657     punct\_bracket\_close\_round
2658         Closing brackets ``")"``
2659     punct\_listsep
2660         List item Separator ``","``
2661     punct\_qualifier
2662         Table/Column Qualifier ``"."``
2663     punct\_queryend
2664         End of query marker ``";"``
2665     alpha
2666         Applies to all alphabetic classes
2667     alpha\_columnType
2668         Identifiers matching a column type
2669     alpha\_columnAttrib
2670         Identifiers matching a database/table/column attribute
2671     alpha\_functionName
2672         Identifiers matching a MySQL function name
2673     alpha\_reservedWord
2674         Identifiers matching any other reserved word
2675     alpha\_variable
2676         Identifiers matching a :term:`SQL` variable ``"@foo"``
2677     alpha\_identifier
2678         All other identifiers
2679     quote
2680         Applies to all quotation mark classes
2681     quote\_double
2682         Double quotes ``"``
2683     quote\_single
2684         Single quotes ``'``
2685     quote\_backtick
2686         Backtick quotes `````
2688 SQL validator settings
2689 ----------------------
2691 .. config:option:: $cfg['SQLValidator']
2693     :type: array
2694     :default: array(...)
2698 .. config:option:: $cfg['SQLValidator']['use']
2700     :type: boolean
2701     :default: false
2703     phpMyAdmin now supports use of the `Mimer SQL Validator
2704     <http://developer.mimer.com/validator/index.htm>`_ service, as originally
2705     published on `Slashdot
2706     <http://developers.slashdot.org/article.pl?sid=02/02/19/1720246>`_. For
2707     help in setting up your system to use the service, see the
2708     :ref:`faqsqlvalidator`.
2710 .. config:option:: $cfg['SQLValidator']['username']
2712     :type: string
2713     :default: ``''``
2715 .. config:option:: $cfg['SQLValidator']['password']
2717     :type: string
2718     :default: ``''``
2720     The SOAP service allows you to log in with ``anonymous`` and any password,
2721     so we use those by default. Instead, if you have an account with them, you
2722     can put your login details here, and it will be used in place of the
2723     anonymous login.
2725 MySQL settings
2726 --------------
2728 .. config:option:: $cfg['DefaultFunctions']
2730     :type: array
2731     :default: array(...)
2733     Functions selected by default when inserting/changing row, Functions
2734     are defined for meta types as (FUNC\_NUMBER, FUNC\_DATE, FUNC\_CHAR,
2735     FUNC\_SPATIAL, FUNC\_UUID) and for ``first_timestamp``, which is used
2736     for first timestamp column in table.
2739 Developer
2740 ---------
2742 .. warning::
2744     These settings might have huge effect on performance or security.
2746 .. config:option:: $cfg['DBG']
2748     :type: array
2749     :default: array(...)
2751 .. config:option:: $cfg['DBG']['sql']
2753     :type: boolean
2754     :default: false
2756     Enable logging queries and execution times to be
2757     displayed in the bottom of main page (right frame).
2759 .. config:option:: $cfg['Error_Handler']['display']
2761     :type: boolean
2762     :default: false
2764     Whether to display errors from PHP or not.
2766 .. config:option:: $cfg['Error_Handler']['gather']
2768     :type: boolean
2769     :default: false
2771     Whether to gather errors from PHP or not.