Merge remote-tracking branch 'origin/master'
[phpmyadmin.git] / doc / faq.rst
blob40e8040cf4c2ce692f38892f4f648987bbf64f31
1 .. _faq:
3 FAQ - Frequently Asked Questions
4 ================================
6 Please have a look at our `Link section
7 <https://www.phpmyadmin.net/docs/>`_ on the official
8 phpMyAdmin homepage for in-depth coverage of phpMyAdmin's features and
9 or interface.
11 .. _faqserver:
13 Server
14 ++++++
16 .. _faq1_1:
18 1.1 My server is crashing each time a specific action is required or phpMyAdmin sends a blank page or a page full of cryptic characters to my browser, what can I do?
19 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
21 Try to set the :config:option:`$cfg['OBGzip']`  directive to ``false`` in your
22 :file:`config.inc.php` file and the ``zlib.output_compression`` directive to
23 ``Off`` in your php configuration file.
25 .. _faq1_2:
27 1.2 My Apache server crashes when using phpMyAdmin.
28 ---------------------------------------------------
30 You should first try the latest versions of Apache (and possibly MySQL). If
31 your server keeps crashing, please ask for help in the various Apache support
32 groups.
34 .. seealso:: :ref:`faq1_1`
36 .. _faq1_3:
38 1.3 (withdrawn).
39 ----------------
41 .. _faq1_4:
43 1.4 Using phpMyAdmin on IIS, I'm displayed the error message: "The specified CGI application misbehaved by not returning a complete set of HTTP headers ...".
44 -------------------------------------------------------------------------------------------------------------------------------------------------------------
46 You just forgot to read the *install.txt* file from the PHP
47 distribution. Have a look at the last message in this `PHP bug report #12061
48 <https://bugs.php.net/bug.php?id=12061>`_ from the official PHP bug
49 database.
51 .. _faq1_5:
53 1.5 Using phpMyAdmin on IIS, I'm facing crashes and/or many error messages with the HTTP.
54 -----------------------------------------------------------------------------------------
56 This is a known problem with the PHP :term:`ISAPI` filter: it's not so stable.
57 Please use instead the cookie authentication mode.
59 .. _faq1_6:
61 1.6 I can't use phpMyAdmin on PWS: nothing is displayed!
62 --------------------------------------------------------
64 This seems to be a PWS bug. Filippo Simoncini found a workaround (at
65 this time there is no better fix): remove or comment the ``DOCTYPE``
66 declarations (2 lines) from the scripts :file:`libraries/Header.class.php`
67 and :file:`index.php`.
69 .. _faq1_7:
71 1.7 How can I gzip a dump or a CSV export? It does not seem to work.
72 --------------------------------------------------------------------
74 This feature is based on the ``gzencode()``
75 PHP function to be more independent of the platform (Unix/Windows,
76 Safe Mode or not, and so on). So, you must have Zlib support
77 (``--with-zlib``).
79 .. _faq1_8:
81 1.8 I cannot insert a text file in a table, and I get an error about safe mode being in effect.
82 -----------------------------------------------------------------------------------------------
84 Your uploaded file is saved by PHP in the "upload dir", as defined in
85 :file:`php.ini` by the variable ``upload_tmp_dir`` (usually the system
86 default is */tmp*). We recommend the following setup for Apache
87 servers running in safe mode, to enable uploads of files while being
88 reasonably secure:
90 * create a separate directory for uploads: :command:`mkdir /tmp/php`
91 * give ownership to the Apache server's user.group: :command:`chown
92   apache.apache /tmp/php`
93 * give proper permission: :command:`chmod 600 /tmp/php`
94 * put ``upload_tmp_dir = /tmp/php`` in :file:`php.ini`
95 * restart Apache
97 .. _faq1_9:
99 1.9 (withdrawn).
100 ----------------
102 .. _faq1_10:
104 1.10 I'm having troubles when uploading files with phpMyAdmin running on a secure server. My browser is Internet Explorer and I'm using the Apache server.
105 ----------------------------------------------------------------------------------------------------------------------------------------------------------
107 As suggested by "Rob M" in the phpWizard forum, add this line to your
108 *httpd.conf*:
110 .. code-block:: apache
112     SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
114 It seems to clear up many problems between Internet Explorer and SSL.
116 .. _faq1_11:
118 1.11 I get an 'open\_basedir restriction' while uploading a file from the import tab.
119 -------------------------------------------------------------------------------------
121 Since version 2.2.4, phpMyAdmin supports servers with open\_basedir
122 restrictions. However you need to create temporary directory and configure it
123 as :config:option:`$cfg['TempDir']`. The uploaded files will be moved there,
124 and after execution of your :term:`SQL` commands, removed.
126 .. _faq1_12:
128 1.12 I have lost my MySQL root password, what can I do?
129 -------------------------------------------------------
131 The MySQL manual explains how to `reset the permissions
132 <https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html>`_.
134 .. _faq1_13:
136 1.13 (withdrawn).
137 -----------------
139 .. _faq1_14:
141 1.14 (withdrawn).
142 -----------------
144 .. _faq1_15:
146 1.15 I have problems with *mysql.user* column names.
147 ----------------------------------------------------
149 In previous MySQL versions, the ``User`` and ``Password``columns were
150 named ``user`` and ``password``. Please modify your column names to
151 align with current standards.
153 .. _faq1_16:
155 1.16 I cannot upload big dump files (memory, HTTP or timeout problems).
156 -----------------------------------------------------------------------
158 Starting with version 2.7.0, the import engine has been re–written and
159 these problems should not occur. If possible, upgrade your phpMyAdmin
160 to the latest version to take advantage of the new import features.
162 The first things to check (or ask your host provider to check) are the
163 values of ``upload_max_filesize``, ``memory_limit`` and
164 ``post_max_size`` in the :file:`php.ini` configuration file. All of these
165 three settings limit the maximum size of data that can be submitted
166 and handled by PHP. One user also said that ``post_max_size`` and
167 ``memory_limit`` need to be larger than ``upload_max_filesize``.
168 There exist several workarounds if your upload is too big or your
169 hosting provider is unwilling to change the settings:
171 * Look at the :config:option:`$cfg['UploadDir']` feature. This allows one to upload a file to the server
172   via scp, ftp, or your favorite file transfer method. PhpMyAdmin is
173   then able to import the files from the temporary directory. More
174   information is available in the :ref:`config`  of this document.
175 * Using a utility (such as `BigDump
176   <http://www.ozerov.de/bigdump/>`_) to split the files before
177   uploading. We cannot support this or any third party applications, but
178   are aware of users having success with it.
179 * If you have shell (command line) access, use MySQL to import the files
180   directly. You can do this by issuing the "source" command from within
181   MySQL:
183   .. code-block:: mysql
185     source filename.sql;
187 .. _faq1_17:
189 1.17 Which Database versions does phpMyAdmin support?
190 -----------------------------------------------------
192 For `MySQL <https://www.mysql.com/>`_, versions 5.5 and newer are supported. 
193 For older MySQL versions, our `Downloads <https://www.phpmyadmin.net/downloads/>`_ page offers older phpMyAdmin versions 
194 (which may have become unsupported).
196 For `MariaDB <https://mariadb.org/>`_, versions 5.5 and newer are supported.
198 .. _faq1_17a:
200 1.17a I cannot connect to the MySQL server. It always returns the error message, "Client does not support authentication protocol requested by server; consider upgrading MySQL client"
201 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
203 You tried to access MySQL with an old MySQL client library. The
204 version of your MySQL client library can be checked in your phpinfo()
205 output. In general, it should have at least the same minor version as
206 your server - as mentioned in :ref:`faq1_17`. This problem is
207 generally caused by using MySQL version 4.1 or newer. MySQL changed
208 the authentication hash and your PHP is trying to use the old method.
209 The proper solution is to use the `mysqli extension
210 <https://secure.php.net/mysqli>`_ with the proper client library to match
211 your MySQL installation. More
212 information (and several workarounds) are located in the `MySQL
213 Documentation <https://dev.mysql.com/doc/refman/5.7/en/old-client.html>`_.
215 .. _faq1_18:
217 1.18 (withdrawn).
218 -----------------
220 .. _faq1_19:
222 1.19 I can't run the "display relations" feature because the script seems not to know the font face I'm using!
223 --------------------------------------------------------------------------------------------------------------
225 The :term:`TCPDF` library we're using for this feature requires some special
226 files to use font faces. Please refers to the `TCPDF manual
227 <https://tcpdf.org/>`_ to build these files.
229 .. _faqmysql:
231 1.20 I receive an error about missing mysqli and mysql extensions.
232 ------------------------------------------------------------------
234 To connect to a MySQL server, PHP needs a set of MySQL functions
235 called "MySQL extension". This extension may be part of the PHP
236 distribution (compiled-in), otherwise it needs to be loaded
237 dynamically. Its name is probably *mysqli.so* or *php\_mysqli.dll*.
238 phpMyAdmin tried to load the extension but failed. Usually, the
239 problem is solved by installing a software package called "PHP-MySQL"
240 or something similar.
242 There are currently two interfaces PHP provides as MySQL extensions - ``mysql``
243 and ``mysqli``. The ``mysqli`` is tried first, because it's the best one.
245 This problem can be also caused by wrong paths in the :file:`php.ini` or using
246 wrong :file:`php.ini`.
248 Make sure that the extension files do exist in the folder which the
249 ``extension_dir`` points to and that the corresponding lines in your
250 :file:`php.ini` are not commented out (you can use ``phpinfo()`` to check
251 current setup):
253 .. code-block:: ini
255     [PHP]
257     ; Directory in which the loadable extensions (modules) reside.
258     extension_dir = "C:/Apache2/modules/php/ext"
260 The :file:`php.ini` can be loaded from several locations (especially on
261 Windows), so please check you're updating the correct one. If using Apache, you
262 can tell it to use specific path for this file using ``PHPIniDir`` directive:
264 .. code-block:: apache
266     LoadFile "C:/php/php5ts.dll"
267     LoadModule php5_module "C:/php/php5apache2_2.dll"
268     <IfModule php5_module>
269         PHPIniDir "C:/PHP"
270         <Location>
271            AddType text/html .php
272            AddHandler application/x-httpd-php .php
273         </Location>
274     </IfModule>
276 In some rare cases this problem can be also caused by other extensions loaded
277 in PHP which prevent MySQL extensions to be loaded. If anything else fails, you
278 can try commenting out extensions for other databses from :file:`php.ini`.
280 .. _faq1_21:
282 1.21 I am running the CGI version of PHP under Unix, and I cannot log in using cookie auth.
283 -------------------------------------------------------------------------------------------
285 In :file:`php.ini`, set ``mysql.max_links`` higher than 1.
287 .. _faq1_22:
289 1.22 I don't see the "Location of text file" field, so I cannot upload.
290 -----------------------------------------------------------------------
292 This is most likely because in :file:`php.ini`, your ``file_uploads``
293 parameter is not set to "on".
295 .. _faq1_23:
297 1.23 I'm running MySQL on a Win32 machine. Each time I create a new table the table and column names are changed to lowercase!
298 ------------------------------------------------------------------------------------------------------------------------------
300 This happens because the MySQL directive ``lower_case_table_names``
301 defaults to 1 (``ON``) in the Win32 version of MySQL. You can change
302 this behavior by simply changing the directive to 0 (``OFF``): Just
303 edit your ``my.ini`` file that should be located in your Windows
304 directory and add the following line to the group [mysqld]:
306 .. code-block:: ini
308     set-variable = lower_case_table_names=0
310 .. note::
311     
312     Forcing this variable to 0 with --lower-case-table-names=0 on a
313     case-insensitive filesystem and access MyISAM tablenames using different
314     lettercases, index corruption may result.
316 Next, save the file and restart the MySQL service. You can always
317 check the value of this directive using the query
319 .. code-block:: mysql
321     SHOW VARIABLES LIKE 'lower_case_table_names';
323 .. seealso:: `Identifier Case Sensitivity in the MySQL Reference Manual <https://dev.mysql.com/doc/refman/5.7/en/identifier-case-sensitivity.html>`_
325 .. _faq1_24:
327 1.24 (withdrawn).
328 -----------------
330 .. _faq1_25:
332 1.25 I am running Apache with mod\_gzip-1.3.26.1a on Windows XP, and I get problems, such as undefined variables when I run a SQL query.
333 ----------------------------------------------------------------------------------------------------------------------------------------
335 A tip from Jose Fandos: put a comment on the following two lines in
336 httpd.conf, like this:
338 .. code-block:: apache
341     # mod_gzip_item_include file \.php$
342     # mod_gzip_item_include mime "application/x-httpd-php.*"
344 as this version of mod\_gzip on Apache (Windows) has problems handling
345 PHP scripts. Of course you have to restart Apache.
347 .. _faq1_26:
349 1.26 I just installed phpMyAdmin in my document root of IIS but I get the error "No input file specified" when trying to run phpMyAdmin.
350 ----------------------------------------------------------------------------------------------------------------------------------------
352 This is a permission problem. Right-click on the phpmyadmin folder and
353 choose properties. Under the tab Security, click on "Add" and select
354 the user "IUSR\_machine" from the list. Now set his permissions and it
355 should work.
357 .. _faq1_27:
359 1.27 I get empty page when I want to view huge page (eg. db\_structure.php with plenty of tables).
360 --------------------------------------------------------------------------------------------------
362 This was caused by a `PHP bug <https://bugs.php.net/bug.php?id=21079>`_ that occur when
363 GZIP output buffering is enabled. If you turn off it (by
364 :config:option:`$cfg['OBGzip']` in :file:`config.inc.php`), it should work.
365 This bug will has been fixed in PHP 5.0.0.
367 .. _faq1_28:
369 1.28 My MySQL server sometimes refuses queries and returns the message 'Errorcode: 13'. What does this mean?
370 ------------------------------------------------------------------------------------------------------------
372 This can happen due to a MySQL bug when having database / table names
373 with upper case characters although ``lower_case_table_names`` is
374 set to 1. To fix this, turn off this directive, convert all database
375 and table names to lower case and turn it on again. Alternatively,
376 there's a bug-fix available starting with MySQL 3.23.56 /
377 4.0.11-gamma.
379 .. _faq1_29:
381 1.29 When I create a table or modify a column, I get an error and the columns are duplicated.
382 ---------------------------------------------------------------------------------------------
384 It is possible to configure Apache in such a way that PHP has problems
385 interpreting .php files.
387 The problems occur when two different (and conflicting) set of
388 directives are used:
390 .. code-block:: apache
393     SetOutputFilter PHP
394     SetInputFilter PHP
398 .. code-block:: apache
400     AddType application/x-httpd-php .php
402 In the case we saw, one set of directives was in
403 ``/etc/httpd/conf/httpd.conf``, while the other set was in
404 ``/etc/httpd/conf/addon-modules/php.conf``. The recommended way is
405 with ``AddType``, so just comment out the first set of lines and
406 restart Apache:
408 .. code-block:: apache
411     #SetOutputFilter PHP
412     #SetInputFilter PHP
414 .. _faq1_30:
416 1.30 I get the error "navigation.php: Missing hash".
417 ----------------------------------------------------
419 This problem is known to happen when the server is running Turck
420 MMCache but upgrading MMCache to version 2.3.21 solves the problem.
422 .. _faq1_31:
424 1.31 Does phpMyAdmin support PHP 5?
425 -----------------------------------
427 Yes.
429 Since release 4.5, phpMyAdmin supports only PHP 5.5 and newer. Since release 4.1 phpMyAdmin supports only PHP 5.3 and newer. For PHP 5.2 you can use 4.0.x releases.
431 .. _faq1_32:
433 1.32 Can I use HTTP authentication with IIS?
434 --------------------------------------------
436 Yes. This procedure was tested with phpMyAdmin 2.6.1, PHP 4.3.9 in
437 :term:`ISAPI` mode under :term:`IIS` 5.1.
439 #. In your :file:`php.ini` file, set ``cgi.rfc2616_headers = 0``
440 #. In ``Web Site Properties -> File/Directory Security -> Anonymous
441    Access`` dialog box, check the ``Anonymous access`` checkbox and
442    uncheck any other checkboxes (i.e. uncheck ``Basic authentication``,
443    ``Integrated Windows authentication``, and ``Digest`` if it's
444    enabled.) Click ``OK``.
445 #. In ``Custom Errors``, select the range of ``401;1`` through ``401;5``
446    and click the ``Set to Default`` button.
448 .. seealso:: :rfc:`2616`
450 .. _faq1_33:
452 1.33 (withdrawn).
453 -----------------
455 .. _faq1_34:
457 1.34 Can I access directly to database or table pages?
458 ------------------------------------------------------
460 Yes. Out of the box, you can use :term:`URL` like
461 ``http://server/phpMyAdmin/index.php?server=X&db=database&table=table&target=script``.
462 For ``server`` you use the server number
463 which refers to the order of the server paragraph in
464 :file:`config.inc.php`. Table and script parts are optional. If you want
465 ``http://server/phpMyAdmin/database[/table][/script]`` :term:`URL`, you need to do some configuration. Following
466 lines apply only for `Apache <https://httpd.apache.org>`_ web server.
467 First make sure, that you have enabled some features within global
468 configuration. You need ``Options SymLinksIfOwnerMatch`` and ``AllowOverride
469 FileInfo`` enabled for directory where phpMyAdmin is installed and you
470 need mod\_rewrite to be enabled. Then you just need to create
471 following :term:`.htaccess` file in root folder of phpMyAdmin installation (don't
472 forget to change directory name inside of it):
474 .. code-block:: apache
477     RewriteEngine On
478     RewriteBase /path_to_phpMyAdmin
479     RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-z_]+\.php)$ index.php?db=$1&table=$2&target=$3 [R]
480     RewriteRule ^([a-zA-Z0-9_]+)/([a-z_]+\.php)$ index.php?db=$1&target=$2 [R]
481     RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$ index.php?db=$1&table=$2 [R]
482     RewriteRule ^([a-zA-Z0-9_]+)$ index.php?db=$1 [R]
484 .. _faq1_35:
486 1.35 Can I use HTTP authentication with Apache CGI?
487 ---------------------------------------------------
489 Yes. However you need to pass authentication variable to :term:`CGI` using
490 following rewrite rule:
492 .. code-block:: apache
495     RewriteEngine On
496     RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]
498 .. _faq1_36:
500 1.36 I get an error "500 Internal Server Error".
501 ------------------------------------------------
503 There can be many explanations to this and a look at your server's
504 error log file might give a clue.
506 .. _faq1_37:
508 1.37 I run phpMyAdmin on cluster of different machines and password encryption in cookie auth doesn't work.
509 -----------------------------------------------------------------------------------------------------------
511 If your cluster consist of different architectures, PHP code used for
512 encryption/decryption won't work correct. This is caused by use of
513 pack/unpack functions in code. Only solution is to use mcrypt
514 extension which works fine in this case.
516 .. _faq1_38:
518 1.38 Can I use phpMyAdmin on a server on which Suhosin is enabled?
519 ------------------------------------------------------------------
521 Yes but the default configuration values of Suhosin are known to cause
522 problems with some operations, for example editing a table with many
523 columns and no :term:`primary key` or with textual :term:`primary key`.
525 Suhosin configuration might lead to malfunction in some cases and it
526 can not be fully avoided as phpMyAdmin is kind of application which
527 needs to transfer big amounts of columns in single HTTP request, what
528 is something what Suhosin tries to prevent. Generally all
529 ``suhosin.request.*``, ``suhosin.post.*`` and ``suhosin.get.*``
530 directives can have negative effect on phpMyAdmin usability. You can
531 always find in your error logs which limit did cause dropping of
532 variable, so you can diagnose the problem and adjust matching
533 configuration variable.
535 The default values for most Suhosin configuration options will work in
536 most scenarios, however you might want to adjust at least following
537 parameters:
539 * `suhosin.request.max\_vars <https://suhosin.org/stories/configuration.html#suhosin-request-max-vars>`_ should
540   be increased (eg. 2048)
541 * `suhosin.post.max\_vars <https://suhosin.org/stories/configuration.html#suhosin-post-max-vars>`_ should be
542   increased (eg. 2048)
543 * `suhosin.request.max\_array\_index\_length <https://suhosin.org/stories/configuration.html#suhosin-request-max-array-index-length>`_
544   should be increased (eg. 256)
545 * `suhosin.post.max\_array\_index\_length <https://suhosin.org/stories/configuration.html#suhosin-post-max-array-index-length>`_
546   should be increased (eg. 256)
547 * `suhosin.request.max\_totalname\_length <https://suhosin.org/stories/configuration.html#suhosin-request-max-totalname-length>`_
548   should be increased (eg. 8192)
549 * `suhosin.post.max\_totalname\_length <https://suhosin.org/stories/configuration.html#suhosin-post-max-totalname-length>`_ should be
550   increased (eg. 8192)
551 * `suhosin.get.max\_value\_length <https://suhosin.org/stories/configuration.html#suhosin-get-max-value-length>`_
552   should be increased (eg. 1024)
553 * `suhosin.sql.bailout\_on\_error <https://suhosin.org/stories/configuration.html#suhosin-sql-bailout-on-error>`_
554   needs to be disabled (the default)
555 * `suhosin.log.\* <https://suhosin.org/stories/configuration.html#logging-configuration>`_ should not
556   include :term:`SQL`, otherwise you get big
557   slowdown
559 You can also disable the warning using the :config:option:`$cfg['SuhosinDisableWarning']`.
561 .. _faq1_39:
563 1.39 When I try to connect via https, I can log in, but then my connection is redirected back to http. What can cause this behavior?
564 ------------------------------------------------------------------------------------------------------------------------------------
566 This is caused by the fact that PHP scripts have no knowledge that the site is
567 using https. Depending on used webserver, you should configure it to let PHP
568 know about URL and scheme used to access it.
570 For example in Apache ensure that you have enabled ``SSLOptions`` and
571 ``StdEnvVars`` in the configuration.
573 .. seealso:: <https://httpd.apache.org/docs/2.4/mod/mod_ssl.html>
575 .. _faq1_40:
577 1.40 When accessing phpMyAdmin via an Apache reverse proxy, cookie login does not work.
578 ---------------------------------------------------------------------------------------
580 To be able to use cookie auth Apache must know that it has to rewrite
581 the set-cookie headers. Example from the Apache 2.2 documentation:
583 .. code-block:: apache
586     ProxyPass /mirror/foo/ http://backend.example.com/
587     ProxyPassReverse /mirror/foo/ http://backend.example.com/
588     ProxyPassReverseCookieDomain backend.example.com public.example.com
589     ProxyPassReverseCookiePath / /mirror/foo/
591 Note: if the backend url looks like ``http://server/~user/phpmyadmin``, the
592 tilde (~) must be url encoded as %7E in the ProxyPassReverse\* lines.
593 This is not specific to phpmyadmin, it's just the behavior of Apache.
595 .. code-block:: apache
598     ProxyPass /mirror/foo/ http://backend.example.com/~user/phpmyadmin
599     ProxyPassReverse /mirror/foo/ http://backend.example.com/%7Euser/phpmyadmin
600     ProxyPassReverseCookiePath /%7Euser/phpmyadmin /mirror/foo
602 .. seealso:: <https://httpd.apache.org/docs/2.2/mod/mod_proxy.html>, :config:option:`$cfg['PmaAbsoluteUri']`
604 .. _faq1_41:
606 1.41 When I view a database and ask to see its privileges, I get an error about an unknown column.
607 --------------------------------------------------------------------------------------------------
609 The MySQL server's privilege tables are not up to date, you need to
610 run the :command:`mysql_upgrade` command on the server.
612 .. _faq1_42:
614 1.42 How can I prevent robots from accessing phpMyAdmin?
615 --------------------------------------------------------
617 You can add various rules to :term:`.htaccess` to filter access based on user agent
618 field. This is quite easy to circumvent, but could prevent at least
619 some robots accessing your installation.
621 .. code-block:: apache
624     RewriteEngine on
626     # Allow only GET and POST verbs
627     RewriteCond %{REQUEST_METHOD} !^(GET|POST)$ [NC,OR]
629     # Ban Typical Vulnerability Scanners and others
630     # Kick out Script Kiddies
631     RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget).* [NC,OR]
632     RewriteCond %{HTTP_USER_AGENT} ^.*(libwww-perl|curl|wget|python|nikto|wkito|pikto|scan|acunetix).* [NC,OR]
633     RewriteCond %{HTTP_USER_AGENT} ^.*(winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner).* [NC,OR]
635     # Ban Search Engines, Crawlers to your administrative panel
636     # No reasons to access from bots
637     # Ultimately Better than the useless robots.txt
638     # Did google respect robots.txt?
639     # Try google: intitle:phpMyAdmin intext:"Welcome to phpMyAdmin *.*.*" intext:"Log in" -wiki -forum -forums -questions intext:"Cookies must be enabled"
640     RewriteCond %{HTTP_USER_AGENT} ^.*(AdsBot-Google|ia_archiver|Scooter|Ask.Jeeves|Baiduspider|Exabot|FAST.Enterprise.Crawler|FAST-WebCrawler|www\.neomo\.de|Gigabot|Mediapartners-Google|Google.Desktop|Feedfetcher-Google|Googlebot|heise-IT-Markt-Crawler|heritrix|ibm.com\cs/crawler|ICCrawler|ichiro|MJ12bot|MetagerBot|msnbot-NewsBlogs|msnbot|msnbot-media|NG-Search|lucene.apache.org|NutchCVS|OmniExplorer_Bot|online.link.validator|psbot0|Seekbot|Sensis.Web.Crawler|SEO.search.Crawler|Seoma.\[SEO.Crawler\]|SEOsearch|Snappy|www.urltrends.com|www.tkl.iis.u-tokyo.ac.jp/~crawler|SynooBot|crawleradmin.t-info@telekom.de|TurnitinBot|voyager|W3.SiteSearch.Crawler|W3C-checklink|W3C_Validator|www.WISEnutbot.com|yacybot|Yahoo-MMCrawler|Yahoo\!.DE.Slurp|Yahoo\!.Slurp|YahooSeeker).* [NC]
641     RewriteRule .* - [F]
643 .. _faq1_43:
645 1.43 Why can't I display the structure of my table containing hundreds of columns?
646 ----------------------------------------------------------------------------------
648 Because your PHP's ``memory_limit`` is too low; adjust it in :file:`php.ini`.
650 .. _faq1:44:
652 1.44 How can I reduce the installed size of phpMyAdmin on disk?
653 ---------------------------------------------------------------
655 Some users have requested to be able to reduce the size of the phpMyAdmin installation.
656 This is not recommended and could lead to confusion over missing features, but can be done.
657 A list of files and corresponding functionality which degrade gracefully when removed include:
659 * :file:`./vendor/tecnickcom/tcpdf` folder (exporting to PDF)
660 * :file:`./locale/` folder, or unused subfolders (interface translations)
661 * Any unused themes in :file:`./themes/`
662 * :file:`./js/jquery/src/` (included for licensing reasons)
663 * :file:`./js/line_counts.php`
664 * :file:`./doc/` (documentation)
665 * :file:`./setup/` (setup script)
666 * :file:`./examples/`
667 * :file:`./sql/` (SQL scripts to configure advanced functionality)
668 * :file:`./js/openlayers/` (GIS visualization)
670 .. _faqconfig:
672 Configuration
673 +++++++++++++
675 .. _faq2_1:
677 2.1 The error message "Warning: Cannot add header information - headers already sent by ..." is displayed, what's the problem?
678 ------------------------------------------------------------------------------------------------------------------------------
680 Edit your :file:`config.inc.php` file and ensure there is nothing (I.E. no
681 blank lines, no spaces, no characters...) neither before the ``<?php`` tag at
682 the beginning, neither after the ``?>`` tag at the end. We also got a report
683 from a user under :term:`IIS`, that used a zipped distribution kit: the file
684 :file:`libraries/Config.php` contained an end-of-line character (hex 0A)
685 at the end; removing this character cleared his errors.
687 .. _faq2_2:
689 2.2 phpMyAdmin can't connect to MySQL. What's wrong?
690 ----------------------------------------------------
692 Either there is an error with your PHP setup or your username/password
693 is wrong. Try to make a small script which uses mysql\_connect and see
694 if it works. If it doesn't, it may be you haven't even compiled MySQL
695 support into PHP.
697 .. _faq2_3:
699 2.3 The error message "Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) ..." is displayed. What can I do?
700 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
702 The error message can also be: :guilabel:`Error #2002 - The server is not
703 responding (or the local MySQL server's socket is not correctly configured)`.
705 First, you need to determine what socket is being used by MySQL. To do this,
706 connect to your server and go to the MySQL bin directory. In this directory
707 there should be a file named *mysqladmin*. Type ``./mysqladmin variables``, and
708 this should give you a bunch of info about your MySQL server, including the
709 socket (*/tmp/mysql.sock*, for example). You can also ask your ISP for the
710 connection info or, if you're hosting your own, connect from the 'mysql'
711 command-line client and type 'status' to get the connection type and socket or
712 port number.
714 Then, you need to tell PHP to use this socket. You can do this for all PHP in
715 the :file:`php.ini` or for phpMyAdmin only in the :file:`config.inc.php`. For
716 example: :config:option:`$cfg['Servers'][$i]['socket']`  Please also make sure
717 that the permissions of this file allow to be readable by your webserver.
719 On my RedHat-Box the socket of MySQL is */var/lib/mysql/mysql.sock*.
720 In your :file:`php.ini` you will find a line
722 .. code-block:: ini
724     mysql.default_socket = /tmp/mysql.sock
726 change it to
728 .. code-block:: ini
730     mysql.default_socket = /var/lib/mysql/mysql.sock
732 Then restart apache and it will work.
734 Have also a look at the `corresponding section of the MySQL
735 documentation <https://dev.mysql.com/doc/refman/5.7/en/can-not-connect-to-server.html>`_.
737 .. _faq2_4:
739 2.4 Nothing is displayed by my browser when I try to run phpMyAdmin, what can I do?
740 -----------------------------------------------------------------------------------
742 Try to set the :config:option:`$cfg['OBGzip']` directive to ``false`` in the phpMyAdmin configuration
743 file. It helps sometime. Also have a look at your PHP version number:
744 if it contains "b" or "alpha" it means you're running a testing
745 version of PHP. That's not a so good idea, please upgrade to a plain
746 revision.
748 .. _faq2_5:
750 2.5 Each time I want to insert or change a row or drop a database or a table, an error 404 (page not found) is displayed or, with HTTP or cookie authentication, I'm asked to log in again. What's wrong?
751 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
753 Check your webserver setup if it correctly fills in either PHP_SELF or REQUEST_URI variables.
755 If you are running phpMyAdmin behind reverse proxy, please set the
756 :config:option:`$cfg['PmaAbsoluteUri']` directive in the phpMyAdmin
757 configuration file to match your setup.
759 .. _faq2_6:
761 2.6 I get an "Access denied for user: 'root@localhost' (Using password: YES)"-error when trying to access a MySQL-Server on a host which is port-forwarded for my localhost.
762 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
764 When you are using a port on your localhost, which you redirect via
765 port-forwarding to another host, MySQL is not resolving the localhost
766 as expected. Erik Wasser explains: The solution is: if your host is
767 "localhost" MySQL (the command line tool :command:`mysql` as well) always
768 tries to use the socket connection for speeding up things. And that
769 doesn't work in this configuration with port forwarding. If you enter
770 "127.0.0.1" as hostname, everything is right and MySQL uses the
771 :term:`TCP` connection.
773 .. _faqthemes:
775 2.7 Using and creating themes
776 -----------------------------
778 Themes are configured with :config:option:`$cfg['ThemeManager']` and
779 :config:option:`$cfg['ThemeDefault']`.  Under :file:`./themes/`, you should not
780 delete the directory ``pmahomme`` or its underlying structure, because this is
781 the system theme used by phpMyAdmin. ``pmahomme`` contains all images and
782 styles, for backwards compatibility and for all themes that would not include
783 images or css-files.  If :config:option:`$cfg['ThemeManager']` is enabled, you
784 can select your favorite theme on the main page. Your selected theme will be
785 stored in a cookie.
787 To create a theme:
789 * make a new subdirectory (for example "your\_theme\_name") under :file:`./themes/`.
790 * copy the files and directories from ``pmahomme`` to "your\_theme\_name"
791 * edit the css-files in "your\_theme\_name/css"
792 * put your new images in "your\_theme\_name/img"
793 * edit :file:`layout.inc.php` in "your\_theme\_name"
794 * edit :file:`info.inc.php` in "your\_theme\_name" to contain your chosen
795   theme name, that will be visible in user interface
796 * make a new screenshot of your theme and save it under
797   "your\_theme\_name/screen.png"
799 In theme directory there is file :file:`info.inc.php` which contains theme
800 verbose name, theme generation and theme version. These versions and
801 generations are enumerated from 1 and do not have any direct
802 dependence on phpMyAdmin version. Themes within same generation should
803 be backwards compatible - theme with version 2 should work in
804 phpMyAdmin requiring version 1. Themes with different generation are
805 incompatible.
807 If you do not want to use your own symbols and buttons, remove the
808 directory "img" in "your\_theme\_name". phpMyAdmin will use the
809 default icons and buttons (from the system-theme ``pmahomme``).
811 .. _faqmissingparameters:
813 2.8 I get "Missing parameters" errors, what can I do?
814 -----------------------------------------------------
816 Here are a few points to check:
818 * In :file:`config.inc.php`, try to leave the :config:option:`$cfg['PmaAbsoluteUri']` directive empty. See also
819   :ref:`faq4_7`.
820 * Maybe you have a broken PHP installation or you need to upgrade your
821   Zend Optimizer. See <https://bugs.php.net/bug.php?id=31134>.
822 * If you are using Hardened PHP with the ini directive
823   ``varfilter.max_request_variables`` set to the default (200) or
824   another low value, you could get this error if your table has a high
825   number of columns. Adjust this setting accordingly. (Thanks to Klaus
826   Dorninger for the hint).
827 * In the :file:`php.ini` directive ``arg_separator.input``, a value of ";"
828   will cause this error. Replace it with "&;".
829 * If you are using `Suhosin <https://suhosin.org/stories/index.html>`_, you
830   might want to increase `request limits <https://suhosin.org/stories/faq.html>`_.
831 * The directory specified in the :file:`php.ini` directive
832   ``session.save_path`` does not exist or is read-only (this can be caused
833   by `bug in the PHP installer <https://bugs.php.net/bug.php?id=39842>`_).
835 .. _faq2_9:
837 2.9 Seeing an upload progress bar
838 ---------------------------------
840 To be able to see a progress bar during your uploads, your server must
841 have the `APC <https://secure.php.net/manual/en/book.apc.php>`_ extension, the
842 `uploadprogress <https://pecl.php.net/package/uploadprogress>`_ one, or
843 you must be running PHP 5.4.0 or higher. Moreover, the JSON extension
844 has to be enabled in your PHP.
846 If using APC, you must set ``apc.rfc1867`` to ``on`` in your :file:`php.ini`.
848 If using PHP 5.4.0 or higher, you must set
849 ``session.upload_progress.enabled`` to ``1`` in your :file:`php.ini`. However,
850 starting from phpMyAdmin version 4.0.4, session-based upload progress has
851 been temporarily deactivated due to its problematic behavior.
853 .. seealso:: :rfc:`1867`
855 .. _faqlimitations:
857 Known limitations
858 +++++++++++++++++
860 .. _login_bug:
862 3.1 When using HTTP authentication, a user who logged out can not log in again in with the same nick.
863 -----------------------------------------------------------------------------------------------------
865 This is related to the authentication mechanism (protocol) used by
866 phpMyAdmin. To bypass this problem: just close all the opened browser
867 windows and then go back to phpMyAdmin. You should be able to log in
868 again.
870 .. _faq3_2:
872 3.2 When dumping a large table in compressed mode, I get a memory limit error or a time limit error.
873 ----------------------------------------------------------------------------------------------------
875 Compressed dumps are built in memory and because of this are limited
876 to php's memory limit. For gzip/bzip2 exports this can be overcome
877 since 2.5.4 using :config:option:`$cfg['CompressOnFly']` (enabled by default).
878 zip exports can not be handled this way, so if you need zip files for larger
879 dump, you have to use another way.
881 .. _faq3_3:
883 3.3 With InnoDB tables, I lose foreign key relationships when I rename a table or a column.
884 -------------------------------------------------------------------------------------------
886 This is an InnoDB bug, see <https://bugs.mysql.com/bug.php?id=21704>.
888 .. _faq3_4:
890 3.4 I am unable to import dumps I created with the mysqldump tool bundled with the MySQL server distribution.
891 -------------------------------------------------------------------------------------------------------------
893 The problem is that older versions of ``mysqldump`` created invalid
894 comments like this:
896 .. code-block:: mysql
899     -- MySQL dump 8.22
900     --
901     -- Host: localhost Database: database
902     ---------------------------------------------------------
903     -- Server version 3.23.54
905 The invalid part of the code is the horizontal line made of dashes
906 that appears once in every dump created with mysqldump. If you want to
907 run your dump you have to turn it into valid MySQL. This means, you
908 have to add a whitespace after the first two dashes of the line or add
909 a # before it:  ``-- -------------------------------------------------------`` or
910 ``#---------------------------------------------------------``
912 .. _faq3_5:
914 3.5 When using nested folders, multiple hierarchies are displayed in a wrong manner.
915 ------------------------------------------------------------------------------------
917 Please note that you should not use the separating string multiple
918 times without any characters between them, or at the beginning/end of
919 your table name. If you have to, think about using another
920 TableSeparator or disabling that feature.
922 .. seealso:: :config:option:`$cfg['NavigationTreeTableSeparator']`
924 .. _faq3_6:
926 3.6 (withdrawn).
927 -----------------
929 .. _faq3_7:
931 3.7 I have table with many (100+) columns and when I try to browse table I get series of errors like "Warning: unable to parse url". How can this be fixed?
932 -----------------------------------------------------------------------------------------------------------------------------------------------------------
934 Your table neither have a :term:`primary key` nor an :term:`unique key`, so we must
935 use a long expression to identify this row. This causes problems to
936 parse\_url function. The workaround is to create a :term:`primary key` 
937 or :term:`unique key`.
939 .. _faq3_8:
941 3.8 I cannot use (clickable) HTML-forms in columns where I put a MIME-Transformation onto!
942 ------------------------------------------------------------------------------------------
944 Due to a surrounding form-container (for multi-row delete checkboxes),
945 no nested forms can be put inside the table where phpMyAdmin displays
946 the results. You can, however, use any form inside of a table if keep
947 the parent form-container with the target to tbl\_row\_delete.php and
948 just put your own input-elements inside. If you use a custom submit
949 input field, the form will submit itself to the displaying page again,
950 where you can validate the $HTTP\_POST\_VARS in a transformation. For
951 a tutorial on how to effectively use transformations, see our `Link
952 section <https://www.phpmyadmin.net/docs/>`_ on the
953 official phpMyAdmin-homepage.
955 .. _faq3_9:
957 3.9 I get error messages when using "--sql\_mode=ANSI" for the MySQL server.
958 ----------------------------------------------------------------------------
960 When MySQL is running in ANSI-compatibility mode, there are some major
961 differences in how :term:`SQL` is structured (see
962 <https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html>). Most important of all, the
963 quote-character (") is interpreted as an identifier quote character and not as
964 a string quote character, which makes many internal phpMyAdmin operations into
965 invalid :term:`SQL` statements. There is no
966 workaround to this behaviour.  News to this item will be posted in `issue
967 #7383 <https://github.com/phpmyadmin/phpmyadmin/issues/7383>`_.
969 .. _faq3_10:
971 3.10 Homonyms and no primary key: When the results of a SELECT display more that one column with the same value (for example ``SELECT lastname from employees where firstname like 'A%'`` and two "Smith" values are displayed), if I click Edit I cannot be sure that I am editing the intended row.
972 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
974 Please make sure that your table has a :term:`primary key`, so that phpMyAdmin
975 can use it for the Edit and Delete links.
977 .. _faq3_11:
979 3.11 The number of rows for InnoDB tables is not correct.
980 ---------------------------------------------------------
982 phpMyAdmin uses a quick method to get the row count, and this method only
983 returns an approximate count in the case of InnoDB tables. See
984 :config:option:`$cfg['MaxExactCount']` for a way to modify those results, but
985 this could have a serious impact on performance.
986 However, one can easily replace the approximate row count with exact count by
987 simply clicking on the approximate count. This can also be done for all tables
988 at once by clicking on the rows sum displayed at the bottom.
990 .. seealso:: :config:option:`$cfg['MaxExactCount']`
992 .. _faq3_12:
994 3.12 (withdrawn).
995 -----------------
997 .. _faq3_13:
999 3.13 I get an error when entering ``USE`` followed by a db name containing an hyphen.
1000 -------------------------------------------------------------------------------------
1002 The tests I have made with MySQL 5.1.49 shows that the API does not
1003 accept this syntax for the USE command.
1005 .. _faq3_14:
1007 3.14 I am not able to browse a table when I don't have the right to SELECT one of the columns.
1008 ----------------------------------------------------------------------------------------------
1010 This has been a known limitation of phpMyAdmin since the beginning and
1011 it's not likely to be solved in the future.
1013 .. _faq3_15:
1015 3.15 (withdrawn).
1016 -----------------
1018 .. _faq3_16:
1020 3.16 (withdrawn).
1021 -----------------
1023 .. _faq3_17:
1025 3.17 (withdrawn).
1026 -----------------
1028 .. _faq3_18:
1030 3.18 When I import a CSV file that contains multiple tables, they are lumped together into a single table.
1031 ----------------------------------------------------------------------------------------------------------
1033 There is no reliable way to differentiate tables in :term:`CSV` format. For the
1034 time being, you will have to break apart :term:`CSV` files containing multiple
1035 tables.
1037 .. _faq3_19:
1039 3.19 When I import a file and have phpMyAdmin determine the appropriate data structure it only uses int, decimal, and varchar types.
1040 ------------------------------------------------------------------------------------------------------------------------------------
1042 Currently, the import type-detection system can only assign these
1043 MySQL types to columns. In future, more will likely be added but for
1044 the time being you will have to edit the structure to your liking
1045 post-import.  Also, you should note the fact that phpMyAdmin will use
1046 the size of the largest item in any given column as the column size
1047 for the appropriate type. If you know you will be adding larger items
1048 to that column then you should manually adjust the column sizes
1049 accordingly. This is done for the sake of efficiency.
1051 .. _faq3_20:
1053 3.20 After upgrading, some bookmarks are gone or their content cannot be shown.
1054 -------------------------------------------------------------------------------
1056 At some point, the character set used to store bookmark content has changed.
1057 It's better to recreate your bookmark from the newer phpMyAdmin version.
1059 .. _faq3_21:
1061 3.21 I am unable to log in with a username containing unicode characters such as Ăˇ.
1062 -----------------------------------------------------------------------------------
1064 This can happen if MySQL server is not configured to use utf-8 as default
1065 charset. This is a limitation of how PHP and the MySQL server interact; there
1066 is no way for PHP to set the charset before authenticating.
1068 .. seealso::
1070     `phpMyAdmin issue 12232 <https://github.com/phpmyadmin/phpmyadmin/issues/12232>`_,
1071     `MySQL documentation note <https://secure.php.net/manual/en/mysqli.real-connect.php#refsect1-mysqli.real-connect-notes>`_
1073 .. _faqmultiuser:
1075 ISPs, multi-user installations
1076 ++++++++++++++++++++++++++++++
1078 .. _faq4_1:
1080 4.1 I'm an ISP. Can I setup one central copy of phpMyAdmin or do I need to install it for each customer?
1081 --------------------------------------------------------------------------------------------------------
1083 Since version 2.0.3, you can setup a central copy of phpMyAdmin for all your
1084 users. The development of this feature was kindly sponsored by NetCologne GmbH.
1085 This requires a properly setup MySQL user management and phpMyAdmin
1086 :term:`HTTP` or cookie authentication.
1088 .. seealso:: :ref:`authentication_modes`
1090 .. _faq4_2:
1092 4.2 What's the preferred way of making phpMyAdmin secure against evil access?
1093 -----------------------------------------------------------------------------
1095 This depends on your system. If you're running a server which cannot be
1096 accessed by other people, it's sufficient to use the directory protection
1097 bundled with your webserver (with Apache you can use :term:`.htaccess` files,
1098 for example). If other people have telnet access to your server, you should use
1099 phpMyAdmin's :term:`HTTP` or cookie authentication features.
1101 Suggestions:
1103 * Your :file:`config.inc.php` file should be ``chmod 660``.
1104 * All your phpMyAdmin files should be chown -R phpmy.apache, where phpmy
1105   is a user whose password is only known to you, and apache is the group
1106   under which Apache runs.
1107 * Follow security recommendations for PHP and your webserver.
1109 .. _faq4_3:
1111 4.3 I get errors about not being able to include a file in */lang* or in */libraries*.
1112 --------------------------------------------------------------------------------------
1114 Check :file:`php.ini`, or ask your sysadmin to check it. The
1115 ``include_path`` must contain "." somewhere in it, and
1116 ``open_basedir``, if used, must contain "." and "./lang" to allow
1117 normal operation of phpMyAdmin.
1119 .. _faq4_4:
1121 4.4 phpMyAdmin always gives "Access denied" when using HTTP authentication.
1122 ---------------------------------------------------------------------------
1124 This could happen for several reasons:
1126 * :config:option:`$cfg['Servers'][$i]['controluser']` and/or :config:option:`$cfg['Servers'][$i]['controlpass']`  are wrong.
1127 * The username/password you specify in the login dialog are invalid.
1128 * You have already setup a security mechanism for the phpMyAdmin-
1129   directory, eg. a :term:`.htaccess` file. This would interfere with phpMyAdmin's
1130   authentication, so remove it.
1132 .. _faq4_5:
1134 4.5 Is it possible to let users create their own databases?
1135 -----------------------------------------------------------
1137 Starting with 2.2.5, in the user management page, you can enter a
1138 wildcard database name for a user (for example "joe%"), and put the
1139 privileges you want. For example, adding ``SELECT, INSERT, UPDATE,
1140 DELETE, CREATE, DROP, INDEX, ALTER`` would let a user create/manage
1141 his/her database(s).
1143 .. _faq4_6:
1145 4.6 How can I use the Host-based authentication additions?
1146 ----------------------------------------------------------
1148 If you have existing rules from an old :term:`.htaccess` file, you can take them and
1149 add a username between the ``'deny'``/``'allow'`` and ``'from'``
1150 strings. Using the username wildcard of ``'%'`` would be a major
1151 benefit here if your installation is suited to using it. Then you can
1152 just add those updated lines into the
1153 :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` array.
1155 If you want a pre-made sample, you can try this fragment. It stops the
1156 'root' user from logging in from any networks other than the private
1157 network :term:`IP` blocks.
1159 .. code-block:: php
1162     //block root from logging in except from the private networks
1163     $cfg['Servers'][$i]['AllowDeny']['order'] = 'deny,allow';
1164     $cfg['Servers'][$i]['AllowDeny']['rules'] = array(
1165         'deny root from all',
1166         'allow root from localhost',
1167         'allow root from 10.0.0.0/8',
1168         'allow root from 192.168.0.0/16',
1169         'allow root from 172.16.0.0/12',
1170     );
1172 .. _faq4_7:
1174 4.7 Authentication window is displayed more than once, why?
1175 -----------------------------------------------------------
1177 This happens if you are using a :term:`URL` to start phpMyAdmin which is
1178 different than the one set in your :config:option:`$cfg['PmaAbsoluteUri']`. For
1179 example, a missing "www", or entering with an :term:`IP` address while a domain
1180 name is defined in the config file.
1182 .. _faq4_8:
1184 4.8 Which parameters can I use in the URL that starts phpMyAdmin?
1185 -----------------------------------------------------------------
1187 When starting phpMyAdmin, you can use the ``db``, ``pma_username``,
1188 ``pma_password`` and ``server`` parameters. This last one can contain
1189 either the numeric host index (from ``$i`` of the configuration file)
1190 or one of the host names present in the configuration file. Using
1191 ``pma_username`` and ``pma_password`` has been tested along with the
1192 usage of 'cookie' ``auth_type``.
1194 .. _faqbrowsers:
1196 Browsers or client OS
1197 +++++++++++++++++++++
1199 .. _faq5_1:
1201 5.1 I get an out of memory error, and my controls are non-functional, when trying to create a table with more than 14 columns.
1202 ------------------------------------------------------------------------------------------------------------------------------
1204 We could reproduce this problem only under Win98/98SE. Testing under
1205 WinNT4 or Win2K, we could easily create more than 60 columns.  A
1206 workaround is to create a smaller number of columns, then come back to
1207 your table properties and add the other columns.
1209 .. _faq5_2:
1211 5.2 With Xitami 2.5b4, phpMyAdmin won't process form fields.
1212 ------------------------------------------------------------
1214 This is not a phpMyAdmin problem but a Xitami known bug: you'll face
1215 it with each script/website that use forms. Upgrade or downgrade your
1216 Xitami server.
1218 .. _faq5_3:
1220 5.3 I have problems dumping tables with Konqueror (phpMyAdmin 2.2.2).
1221 ---------------------------------------------------------------------
1223 With Konqueror 2.1.1: plain dumps, zip and gzip dumps work ok, except
1224 that the proposed file name for the dump is always 'tbl\_dump.php'.
1225 The bzip2 dumps don't seem to work. With Konqueror 2.2.1: plain dumps
1226 work; zip dumps are placed into the user's temporary directory, so
1227 they must be moved before closing Konqueror, or else they disappear.
1228 gzip dumps give an error message. Testing needs to be done for
1229 Konqueror 2.2.2.
1231 .. _faq5_4:
1233 5.4 I can't use the cookie authentication mode because Internet Explorer never stores the cookies.
1234 --------------------------------------------------------------------------------------------------
1236 MS Internet Explorer seems to be really buggy about cookies, at least
1237 till version 6.
1239 .. _faq5_5:
1241 5.5 (withdrawn).
1242 ----------------------------------------------------------------------------
1244 .. _faq5_6:
1246 5.6 (withdrawn).
1247 -----------------------------------------------------------------------------------------------------------------------------------------------------------------
1249 .. _faq5_7:
1251 5.7 I refresh (reload) my browser, and come back to the welcome page.
1252 ---------------------------------------------------------------------
1254 Some browsers support right-clicking into the frame you want to
1255 refresh, just do this in the right frame.
1257 .. _faq5_8:
1259 5.8 With Mozilla 0.9.7 I have problems sending a query modified in the query box.
1260 ---------------------------------------------------------------------------------
1262 Looks like a Mozilla bug: 0.9.6 was OK. We will keep an eye on future
1263 Mozilla versions.
1265 .. _faq5_9:
1267 5.9 With Mozilla 0.9.? to 1.0 and Netscape 7.0-PR1 I can't type a whitespace in the SQL-Query edit area: the page scrolls down.
1268 -------------------------------------------------------------------------------------------------------------------------------
1270 This is a Mozilla bug (see bug #26882 at `BugZilla
1271 <https://bugzilla.mozilla.org/>`_).
1273 .. _faq5_10:
1275 5.10 (withdrawn).
1276 -----------------------------------------------------------------------------------------
1278 .. _faq5_11:
1280 5.11 Extended-ASCII characters like German umlauts are displayed wrong.
1281 -----------------------------------------------------------------------
1283 Please ensure that you have set your browser's character set to the
1284 one of the language file you have selected on phpMyAdmin's start page.
1285 Alternatively, you can try the auto detection mode that is supported
1286 by the recent versions of the most browsers.
1288 .. _faq5_12:
1290 5.12 Mac OS X Safari browser changes special characters to "?".
1291 ---------------------------------------------------------------
1293 This issue has been reported by a :term:`Mac OS X` user, who adds that Chimera,
1294 Netscape and Mozilla do not have this problem.
1296 .. _faq5_13:
1298 5.13 (withdrawn)
1299 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1301 .. _faq5_14:
1303 5.14 (withdrawn)
1304 ------------------------------------------------------------------------------------------------------------------
1306 .. _faq5_15:
1308 5.15 (withdrawn)
1309 -----------------------------------------
1311 .. _faq5_16:
1313 5.16 With Internet Explorer, I get "Access is denied" Javascript errors. Or I cannot make phpMyAdmin work under Windows.
1314 ------------------------------------------------------------------------------------------------------------------------
1316 Please check the following points:
1318 * Maybe you have defined your :config:option:`$cfg['PmaAbsoluteUri']` setting in
1319   :file:`config.inc.php` to an :term:`IP` address and you are starting phpMyAdmin
1320   with a :term:`URL` containing a domain name, or the reverse situation.
1321 * Security settings in IE and/or Microsoft Security Center are too high,
1322   thus blocking scripts execution.
1323 * The Windows Firewall is blocking Apache and MySQL. You must allow
1324   :term:`HTTP` ports (80 or 443) and MySQL
1325   port (usually 3306) in the "in" and "out" directions.
1327 .. _faq5_17:
1329 5.17 With Firefox, I cannot delete rows of data or drop a database.
1330 -------------------------------------------------------------------
1332 Many users have confirmed that the Tabbrowser Extensions plugin they
1333 installed in their Firefox is causing the problem.
1335 .. _faq5_18:
1337 5.18 (withdrawn)
1338 -----------------------------------------------------------------------------------------
1340 .. _faq5_19:
1342 5.19 I get JavaScript errors in my browser.
1343 -------------------------------------------
1345 Issues have been reported with some combinations of browser
1346 extensions. To troubleshoot, disable all extensions then clear your
1347 browser cache to see if the problem goes away.
1349 .. _faq5_20:
1351 5.20 I get errors about violating Content Security Policy.
1352 ----------------------------------------------------------
1354 If you see errors like:
1356 .. code-block:: text
1358     Refused to apply inline style because it violates the following Content Security Policy directive
1360 This is usually caused by some software, which wrongly rewrites
1361 :mailheader:`Content Security Policy` headers. Usually this is caused by
1362 antivirus proxy or browser addons which are causing such errors.
1364 If you see these errors, try disabling the HTTP proxy in antivirus or disable
1365 the :mailheader:`Content Security Policy` rewriting in it. If that doesn't
1366 help, try disabling browser extensions.
1368 Alternatively it can be also server configuration issue (if the webserver is
1369 configured to emit :mailheader:`Content Security Policy` headers, they can
1370 override the ones from phpMyAdmin).
1372 Programs known to cause these kind of errors:
1374 * Kaspersky Internet Security
1376 .. _faq5_21:
1378 5.21 I get errors about potentially unsafe operation when browsing table or executing SQL query.
1379 ------------------------------------------------------------------------------------------------
1381 If you see errors like:
1383 .. code-block:: text
1385     A potentially unsafe operation has been detected in your request to this site.
1387 This is usually caused by web application firewall doing requests filtering. It
1388 tries to prevent SQL injection, however phpMyAdmin is tool designed to execute 
1389 SQL queries, thus it makes it unusable.
1391 Please whitelist phpMyAdmin scripts from the web application firewall settings
1392 or disable it completely for phpMyAdmin path.
1394 Programs known to cause these kind of errors:
1396 * Wordfence Web Application Firewall
1398 .. _faqusing:
1400 Using phpMyAdmin
1401 ++++++++++++++++
1403 .. _faq6_1:
1405 6.1 I can't insert new rows into a table / I can't create a table - MySQL brings up a SQL error.
1406 ------------------------------------------------------------------------------------------------
1408 Examine the :term:`SQL` error with care.
1409 Often the problem is caused by specifying a wrong column-type. Common
1410 errors include:
1412 * Using ``VARCHAR`` without a size argument
1413 * Using ``TEXT`` or ``BLOB`` with a size argument
1415 Also, look at the syntax chapter in the MySQL manual to confirm that
1416 your syntax is correct.
1418 .. _faq6_2:
1420 6.2 When I create a table, I set an index for two columns and phpMyAdmin generates only one index with those two columns.
1421 -------------------------------------------------------------------------------------------------------------------------
1423 This is the way to create a multi-columns index. If you want two
1424 indexes, create the first one when creating the table, save, then
1425 display the table properties and click the Index link to create the
1426 other index.
1428 .. _faq6_3:
1430 6.3 How can I insert a null value into my table?
1431 ------------------------------------------------
1433 Since version 2.2.3, you have a checkbox for each column that can be
1434 null. Before 2.2.3, you had to enter "null", without the quotes, as
1435 the column's value. Since version 2.5.5, you have to use the checkbox
1436 to get a real NULL value, so if you enter "NULL" this means you want a
1437 literal NULL in the column, and not a NULL value (this works in PHP4).
1439 .. _faq6_4:
1441 6.4 How can I backup my database or table?
1442 ------------------------------------------
1444 Click on a database or table name in the navigation panel, the properties will
1445 be displayed. Then on the menu, click "Export", you can dump the structure, the
1446 data, or both. This will generate standard :term:`SQL` statements that can be
1447 used to recreate your database/table.  You will need to choose "Save as file",
1448 so that phpMyAdmin can transmit the resulting dump to your station.  Depending
1449 on your PHP configuration, you will see options to compress the dump. See also
1450 the :config:option:`$cfg['ExecTimeLimit']` configuration variable. For
1451 additional help on this subject, look for the word "dump" in this document.
1453 .. _faq6_5:
1455 6.5 How can I restore (upload) my database or table using a dump? How can I run a ".sql" file?
1456 ----------------------------------------------------------------------------------------------
1458 Click on a database name in the navigation panel, the properties will
1459 be displayed. Select "Import" from the list of tabs in the right–hand
1460 frame (or ":term:`SQL`" if your phpMyAdmin
1461 version is previous to 2.7.0). In the "Location of the text file"
1462 section, type in the path to your dump filename, or use the Browse
1463 button. Then click Go.  With version 2.7.0, the import engine has been
1464 re–written, if possible it is suggested that you upgrade to take
1465 advantage of the new features.  For additional help on this subject,
1466 look for the word "upload" in this document.
1468 Note: For errors while importing of dumps exported from older MySQL versions to newer MySQL versions,
1469 please check :ref:`faq6_41`.
1471 .. _faq6_6:
1473 6.6 How can I use the relation table in Query-by-example?
1474 ---------------------------------------------------------
1476 Here is an example with the tables persons, towns and countries, all
1477 located in the database "mydb". If you don't have a ``pma__relation``
1478 table, create it as explained in the configuration section. Then
1479 create the example tables:
1481 .. code-block:: mysql
1484     CREATE TABLE REL_countries (
1485     country_code char(1) NOT NULL default '',
1486     description varchar(10) NOT NULL default '',
1487     PRIMARY KEY (country_code)
1488     ) TYPE=MyISAM;
1490     INSERT INTO REL_countries VALUES ('C', 'Canada');
1492     CREATE TABLE REL_persons (
1493     id tinyint(4) NOT NULL auto_increment,
1494     person_name varchar(32) NOT NULL default '',
1495     town_code varchar(5) default '0',
1496     country_code char(1) NOT NULL default '',
1497     PRIMARY KEY (id)
1498     ) TYPE=MyISAM;
1500     INSERT INTO REL_persons VALUES (11, 'Marc', 'S', '');
1501     INSERT INTO REL_persons VALUES (15, 'Paul', 'S', 'C');
1503     CREATE TABLE REL_towns (
1504     town_code varchar(5) NOT NULL default '0',
1505     description varchar(30) NOT NULL default '',
1506     PRIMARY KEY (town_code)
1507     ) TYPE=MyISAM;
1509     INSERT INTO REL_towns VALUES ('S', 'Sherbrooke');
1510     INSERT INTO REL_towns VALUES ('M', 'MontrĂ©al');
1512 To setup appropriate links and display information:
1514 * on table "REL\_persons" click Structure, then Relation view
1515 * for "town\_code", choose from dropdowns, "mydb", "REL\_towns", "code"
1516   for foreign database, table and column respectively
1517 * for "country\_code", choose  from dropdowns, "mydb", "REL\_countries",
1518   "country\_code" for foreign database, table and column respectively
1519 * on table "REL\_towns" click Structure, then Relation view
1520 * in "Choose column to display", choose "description"
1521 * repeat the two previous steps for table "REL\_countries"
1523 Then test like this:
1525 * Click on your db name in the navigation panel
1526 * Choose "Query"
1527 * Use tables: persons, towns, countries
1528 * Click "Update query"
1529 * In the columns row, choose persons.person\_name and click the "Show"
1530   tickbox
1531 * Do the same for towns.description and countries.descriptions in the
1532   other 2 columns
1533 * Click "Update query" and you will see in the query box that the
1534   correct joins have been generated
1535 * Click "Submit query"
1537 .. _faqdisplay:
1539 6.7 How can I use the "display column" feature?
1540 -----------------------------------------------
1542 Starting from the previous example, create the ``pma__table_info`` as
1543 explained in the configuration section, then browse your persons
1544 table, and move the mouse over a town code or country code.  See also
1545 :ref:`faq6_21` for an additional feature that "display column"
1546 enables: drop-down list of possible values.
1548 .. _faqpdf:
1550 6.8 How can I produce a PDF schema of my database?
1551 --------------------------------------------------
1553 First the configuration variables "relation", "table\_coords" and
1554 "pdf\_pages" have to be filled in.  Then you need to think about your
1555 schema layout. Which tables will go on which pages?
1557 * Select your database in the navigation panel.
1558 * Choose "Operations" in the navigation bar at the top.
1559 * Choose "Edit :term:`PDF` Pages" near the
1560   bottom of the page.
1561 * Enter a name for the first :term:`PDF` page
1562   and click Go. If you like, you can use the "automatic layout," which
1563   will put all your linked tables onto the new page.
1564 * Select the name of the new page (making sure the Edit radio button is
1565   selected) and click Go.
1566 * Select a table from the list, enter its coordinates and click Save.
1567   Coordinates are relative; your diagram will be automatically scaled to
1568   fit the page. When initially placing tables on the page, just pick any
1569   coordinates -- say, 50x50. After clicking Save, you can then use the
1570   :ref:`wysiwyg` to position the element correctly.
1571 * When you'd like to look at your :term:`PDF`, first be sure to click the Save
1572   button beneath the list of tables and coordinates, to save any changes you
1573   made there. Then scroll all the way down, select the :term:`PDF` options you
1574   want, and click Go.
1575 * Internet Explorer for Windows may suggest an incorrect filename when
1576   you try to save a generated :term:`PDF`.
1577   When saving a generated :term:`PDF`, be
1578   sure that the filename ends in ".pdf", for example "schema.pdf".
1579   Browsers on other operating systems, and other browsers on Windows, do
1580   not have this problem.
1582 .. seealso:: 
1584     :ref:`relations`
1586 .. _faq6_9:
1588 6.9 phpMyAdmin is changing the type of one of my columns!
1589 ---------------------------------------------------------
1591 No, it's MySQL that is doing `silent column type changing
1592 <https://dev.mysql.com/doc/refman/5.7/en/silent-column-changes.html>`_.
1594 .. _underscore:
1596 6.10 When creating a privilege, what happens with underscores in the database name?
1597 -----------------------------------------------------------------------------------
1599 If you do not put a backslash before the underscore, this is a
1600 wildcard grant, and the underscore means "any character". So, if the
1601 database name is "john\_db", the user would get rights to john1db,
1602 john2db ... If you put a backslash before the underscore, it means
1603 that the database name will have a real underscore.
1605 .. _faq6_11:
1607 6.11 What is the curious symbol Ă¸ in the statistics pages?
1608 ----------------------------------------------------------
1610 It means "average".
1612 .. _faqexport:
1614 6.12 I want to understand some Export options.
1615 ----------------------------------------------
1617 **Structure:**
1619 * "Add DROP TABLE" will add a line telling MySQL to `drop the table
1620   <https://dev.mysql.com/doc/refman/5.7/en/drop-table.html>`_, if it already
1621   exists during the import. It does NOT drop the table after your
1622   export, it only affects the import file.
1623 * "If Not Exists" will only create the table if it doesn't exist.
1624   Otherwise, you may get an error if the table name exists but has a
1625   different structure.
1626 * "Add AUTO\_INCREMENT value" ensures that AUTO\_INCREMENT value (if
1627   any) will be included in backup.
1628 * "Enclose table and column names with backquotes" ensures that column
1629   and table names formed with special characters are protected.
1630 * "Add into comments" includes column comments, relations, and MIME
1631   types set in the pmadb in the dump as :term:`SQL` comments
1632   (*/\* xxx \*/*).
1634 **Data:**
1636 * "Complete inserts" adds the column names on every INSERT command, for
1637   better documentation (but resulting file is bigger).
1638 * "Extended inserts" provides a shorter dump file by using only once the
1639   INSERT verb and the table name.
1640 * "Delayed inserts" are best explained in the `MySQL manual - INSERT DELAYED Syntax
1641   <https://dev.mysql.com/doc/refman/5.7/en/insert-delayed.html>`_.
1642 * "Ignore inserts" treats errors as a warning instead. Again, more info
1643   is provided in the `MySQL manual - INSERT Syntax
1644   <https://dev.mysql.com/doc/refman/5.7/en/insert.html>`_, but basically with
1645   this selected, invalid values are adjusted and inserted rather than
1646   causing the entire statement to fail.
1648 .. _faq6_13:
1650 6.13 I would like to create a database with a dot in its name.
1651 --------------------------------------------------------------
1653 This is a bad idea, because in MySQL the syntax "database.table" is
1654 the normal way to reference a database and table name. Worse, MySQL
1655 will usually let you create a database with a dot, but then you cannot
1656 work with it, nor delete it.
1658 .. _faqsqlvalidator:
1660 6.14 (withdrawn).
1661 -----------------
1663 .. _faq6_15:
1665 6.15 I want to add a BLOB column and put an index on it, but MySQL says "BLOB column '...' used in key specification without a key length".
1666 -------------------------------------------------------------------------------------------------------------------------------------------
1668 The right way to do this, is to create the column without any indexes,
1669 then display the table structure and use the "Create an index" dialog.
1670 On this page, you will be able to choose your BLOB column, and set a
1671 size to the index, which is the condition to create an index on a BLOB
1672 column.
1674 .. _faq6_16:
1676 6.16 How can I simply move in page with plenty editing fields?
1677 --------------------------------------------------------------
1679 You can use :kbd:`Ctrl+arrows` (:kbd:`Option+Arrows` in Safari) for moving on
1680 most pages with many editing fields (table structure changes, row editing,
1681 etc.).
1683 .. _faq6_17:
1685 6.17 Transformations: I can't enter my own mimetype! What is this feature then useful for?
1686 ------------------------------------------------------------------------------------------
1688 Defining mimetypes is of no use if you can't put
1689 transformations on them. Otherwise you could just put a comment on the
1690 column. Because entering your own mimetype will cause serious syntax
1691 checking issues and validation, this introduces a high-risk false-
1692 user-input situation. Instead you have to initialize mimetypes using
1693 functions or empty mimetype definitions.
1695 Plus, you have a whole overview of available mimetypes. Who knows all those
1696 mimetypes by heart so he/she can enter it at will?
1698 .. _faqbookmark:
1700 6.18 Bookmarks: Where can I store bookmarks? Why can't I see any bookmarks below the query box? What are these variables for?
1701 -----------------------------------------------------------------------------------------------------------------------------
1703 You need to have configured the :ref:`linked-tables` for using bookmarks
1704 feature. Once you have done that, you can use bookmarks in the :guilabel:`SQL` tab.
1706 .. seealso:: :ref:`bookmarks`
1708 .. _faq6_19:
1710 6.19 How can I create simple LATEX document to include exported table?
1711 ----------------------------------------------------------------------
1713 You can simply include table in your LATEX documents,
1714 minimal sample document should look like following one (assuming you
1715 have table exported in file :file:`table.tex`):
1717 .. code-block:: latex
1720     \documentclass{article} % or any class you want
1721     \usepackage{longtable}  % for displaying table
1722     \begin{document}        % start of document
1723     \include{table}         % including exported table
1724     \end{document}          % end of document
1726 .. _faq6_20:
1728 6.20 I see a lot of databases which are not mine, and cannot access them.
1729 -------------------------------------------------------------------------
1731 You have one of these global privileges: CREATE TEMPORARY TABLES, SHOW
1732 DATABASES, LOCK TABLES. Those privileges also enable users to see all the
1733 database names. So if your users do not need those privileges, you can remove
1734 them and their databases list will shorten.
1736 .. seealso:: <https://bugs.mysql.com/bug.php?id=179>
1738 .. _faq6_21:
1740 6.21 In edit/insert mode, how can I see a list of possible values for a column, based on some foreign table?
1741 ------------------------------------------------------------------------------------------------------------
1743 You have to setup appropriate links between the tables, and also setup
1744 the "display column" in the foreign table. See :ref:`faq6_6` for an
1745 example. Then, if there are 100 values or less in the foreign table, a
1746 drop-down list of values will be available. You will see two lists of
1747 values, the first list containing the key and the display column, the
1748 second list containing the display column and the key. The reason for
1749 this is to be able to type the first letter of either the key or the
1750 display column. For 100 values or more, a distinct window will appear,
1751 to browse foreign key values and choose one. To change the default
1752 limit of 100, see :config:option:`$cfg['ForeignKeyMaxLimit']`.
1755 .. _faq6_22:
1757 6.22 Bookmarks: Can I execute a default bookmark automatically when entering Browse mode for a table?
1758 -----------------------------------------------------------------------------------------------------
1760 Yes. If a bookmark has the same label as a table name and it's not a
1761 public bookmark, it will be executed.
1763 .. seealso:: :ref:`bookmarks`
1765 .. _faq6_23:
1767 6.23 Export: I heard phpMyAdmin can export Microsoft Excel files?
1768 -----------------------------------------------------------------
1770 You can use :term:`CSV` for Microsoft Excel,
1771 which works out of the box.
1773 .. versionchanged:: 3.4.5
1774     Since phpMyAdmin 3.4.5 support for direct export to Microsoft Excel version
1775     97 and newer was dropped.
1777 .. _faq6_24:
1779 6.24 Now that phpMyAdmin supports native MySQL 4.1.x column comments, what happens to my column comments stored in pmadb?
1780 -------------------------------------------------------------------------------------------------------------------------
1782 Automatic migration of a table's pmadb-style column comments to the
1783 native ones is done whenever you enter Structure page for this table.
1785 .. _faq6_25:
1787 6.25 (withdrawn).
1788 -----------------
1790 .. _faq6_26:
1792 6.26 How can I select a range of rows?
1793 --------------------------------------
1795 Click the first row of the range, hold the shift key and click the
1796 last row of the range. This works everywhere you see rows, for example
1797 in Browse mode or on the Structure page.
1799 .. _faq6_27:
1801 6.27 What format strings can I use?
1802 -----------------------------------
1804 In all places where phpMyAdmin accepts format strings, you can use
1805 ``@VARIABLE@`` expansion and `strftime <https://secure.php.net/strftime>`_
1806 format strings. The expanded variables depend on a context (for
1807 example, if you haven't chosen a table, you can not get the table
1808 name), but the following variables can be used:
1810 ``@HTTP_HOST@``
1811     HTTP host that runs phpMyAdmin
1812 ``@SERVER@``
1813     MySQL server name
1814 ``@VERBOSE@``
1815     Verbose MySQL server name as defined in :config:option:`$cfg['Servers'][$i]['verbose']`
1816 ``@VSERVER@``
1817     Verbose MySQL server name if set, otherwise normal
1818 ``@DATABASE@``
1819     Currently opened database
1820 ``@TABLE@``
1821     Currently opened table
1822 ``@COLUMNS@``
1823     Columns of the currently opened table
1824 ``@PHPMYADMIN@``
1825     phpMyAdmin with version
1827 .. _wysiwyg:
1829 6.28 How can I easily edit relational schema for export?
1830 --------------------------------------------------------
1832 By clicking on the button 'toggle scratchboard' on the page where you
1833 edit x/y coordinates of those elements you can activate a scratchboard
1834 where all your elements are placed. By clicking on an element, you can
1835 move them around in the pre-defined area and the x/y coordinates will
1836 get updated dynamically. Likewise, when entering a new position
1837 directly into the input field, the new position in the scratchboard
1838 changes after your cursor leaves the input field.
1840 You have to click on the 'OK'-button below the tables to save the new
1841 positions. If you want to place a new element, first add it to the
1842 table of elements and then you can drag the new element around.
1844 By changing the paper size and the orientation you can change the size
1845 of the scratchboard as well. You can do so by just changing the
1846 dropdown field below, and the scratchboard will resize automatically,
1847 without interfering with the current placement of the elements.
1849 If ever an element gets out of range you can either enlarge the paper
1850 size or click on the 'reset' button to place all elements below each
1851 other.
1853 .. _faq6_29:
1855 6.29 Why can't I get a chart from my query result table?
1856 --------------------------------------------------------
1858 Not every table can be put to the chart. Only tables with one, two or
1859 three columns can be visualised as a chart. Moreover the table must be
1860 in a special format for chart script to understand it. Currently
1861 supported formats can be found in :ref:`charts`.
1863 .. _faq6_30:
1865 6.30 Import: How can I import ESRI Shapefiles?
1866 ----------------------------------------------
1868 An ESRI Shapefile is actually a set of several files, where .shp file
1869 contains geometry data and .dbf file contains data related to those
1870 geometry data. To read data from .dbf file you need to have PHP
1871 compiled with the dBase extension (--enable-dbase). Otherwise only
1872 geometry data will be imported.
1874 To upload these set of files you can use either of the following
1875 methods:
1877 Configure upload directory with :config:option:`$cfg['UploadDir']`, upload both .shp and .dbf files with
1878 the same filename and chose the .shp file from the import page.
1880 Create a zip archive with .shp and .dbf files and import it. For this
1881 to work, you need to set :config:option:`$cfg['TempDir']` to a place where the web server user can
1882 write (for example ``'./tmp'``).
1884 To create the temporary directory on a UNIX-based system, you can do:
1886 .. code-block:: sh
1888     cd phpMyAdmin
1889     mkdir tmp
1890     chmod o+rwx tmp
1892 .. _faq6_31:
1894 6.31 How do I create a relation in designer?
1895 --------------------------------------------
1897 To select relation, click:  The display column is shown in pink. To
1898 set/unset a column as the display column, click the "Choose column to
1899 display" icon, then click on the appropriate column name.
1901 .. _faq6_32:
1903 6.32 How can I use the zoom search feature?
1904 -------------------------------------------
1906 The Zoom search feature is an alternative to table search feature. It allows
1907 you to explore a table by representing its data in a scatter plot. You can
1908 locate this feature by selecting a table and clicking the :guilabel:`Search`
1909 tab. One of the sub-tabs in the :guilabel:`Table Search` page is
1910 :guilabel:`Zoom Search`.
1912 Consider the table REL\_persons in :ref:`faq6_6` for
1913 an example. To use zoom search, two columns need to be selected, for
1914 example, id and town\_code. The id values will be represented on one
1915 axis and town\_code values on the other axis. Each row will be
1916 represented as a point in a scatter plot based on its id and
1917 town\_code. You can include two additional search criteria apart from
1918 the two fields to display.
1920 You can choose which field should be
1921 displayed as label for each point. If a display column has been set
1922 for the table (see :ref:`faqdisplay`), it is taken as the label unless
1923 you specify otherwise. You can also select the maximum number of rows
1924 you want to be displayed in the plot by specifing it in the 'Max rows
1925 to plot' field. Once you have decided over your criteria, click 'Go'
1926 to display the plot.
1928 After the plot is generated, you can use the
1929 mousewheel to zoom in and out of the plot. In addition, panning
1930 feature is enabled to navigate through the plot. You can zoom-in to a
1931 certain level of detail and use panning to locate your area of
1932 interest. Clicking on a point opens a dialogue box, displaying field
1933 values of the data row represented by the point. You can edit the
1934 values if required and click on submit to issue an update query. Basic
1935 instructions on how to use can be viewed by clicking the 'How to use?'
1936 link located just above the plot.
1938 .. _faq6_33:
1940 6.33 When browsing a table, how can I copy a column name?
1941 ---------------------------------------------------------
1943 Selecting the name of the column within the browse table header cell
1944 for copying is difficult, as the columns support reordering by
1945 dragging the header cells as well as sorting by clicking on the linked
1946 column name. To copy a column name, double-click on the empty area
1947 next to the column name, when the tooltip tells you to do so. This
1948 will show you an input box with the column name. You may right-click
1949 the column name within this input box to copy it to your clipboard.
1951 .. _faq6_34:
1953 6.34 How can I use the Favorite Tables feature?
1954 ---------------------------------------------------------
1956 Favorite Tables feature is very much similar to Recent Tables feature.
1957 It allows you to add a shortcut for the frequently used tables of any
1958 database in the navigation panel . You can easily navigate to any table
1959 in the list by simply choosing it from the list. These tables are stored
1960 in your browser's local storage if you have not configured your
1961 `phpMyAdmin Configuration Storage`. Otherwise these entries are stored in
1962 `phpMyAdmin Configuration Storage`.
1964 IMPORTANT: In absence of `phpMyAdmin Configuration Storage`, your Favorite
1965 tables may be different in different browsers based on your different
1966 selections in them.
1968 To add a table to Favorite list simply click on the `Gray` star in front
1969 of a table name in the list of tables of a Database and wait until it
1970 turns to `Yellow`.
1971 To remove a table from list, simply click on the `Yellow` star and
1972 wait until it turns `Gray` again.
1974 Using :config:option:`$cfg['NumFavoriteTables']` in your :file:`config.inc.php`
1975 file, you can define the  maximum number of favorite tables shown in the
1976 navigation panel. Its default value is `10`.
1978 .. _faq6_35:
1980 6.35 How can I use the Range search feature?
1981 ---------------------------------------------------------
1983 With the help of range search feature, one can specify a range of values for
1984 particular column(s) while performing search operation on a table from the `Search`
1985 tab.
1987 To use this feature simply click on the `BETWEEN` or `NOT BETWEEN` operators
1988 from the operator select list in front of the column name. On choosing one of the
1989 above options, a dialog box will show up asking for the `Minimum` and `Maximum`
1990 value for that column. Only the specified range of values will be included
1991 in case of `BETWEEN` and excluded in case of `NOT BETWEEN` from the final results.
1993 Note: The Range search feature will work only `Numeric` and `Date` data type columns.
1995 .. _faq6_36:
1997 6.36 What is Central columns and how can I use this feature?
1998 ------------------------------------------------------------
2000 As the name suggests, the Central columns feature enables to maintain a central list of
2001 columns per database to avoid similar name for the same data element and bring consistency
2002 of data type for the same data element. You can use the central list of columns to
2003 add an element to any table structure in that database which will save from writing
2004 similar column name and column definition.
2006 To add a column to central list, go to table structure page, check the columns you want
2007 to include and then simply click on "Add to central columns". If you want to add all
2008 unique columns from more than one table from a database then go to database structure page,
2009 check the tables you want to include and then select "Add columns to central list".
2011 To remove a column from central list, go to Table structure page, check the columns you want
2012 to remove and then simply click on "Remove from central columns". If you want to remove all
2013 columns from more than one tables from a database then go to database structure page,
2014 check the tables you want to include and then select "Remove columns from central list".
2016 To view and manage the central list, select the database you want to manage central columns
2017 for then from the top menu click on "Central columns". You will be taken to a page where
2018 you will have options to edit, delete or add new columns to central list.
2020 .. _faq6_37:
2022 6.37 How can I use Improve Table structure feature?
2023 ---------------------------------------------------------
2025 Improve table structure feature helps to bring the table structure upto
2026 Third Normal Form. A wizard is presented to user which asks questions about the
2027 elements during the various steps for normalization and a new structure is proposed
2028 accordingly to bring the table into the First/Second/Third Normal form.
2029 On startup of the wizard, user gets to select upto what normal form they want to
2030 normalize the table structure.
2032 Here is an example table which you can use to test all of the three First, Second and
2033 Third Normal Form.
2035 .. code-block:: mysql
2037     CREATE TABLE `VetOffice` (
2038      `petName` varchar(64) NOT NULL,
2039      `petBreed` varchar(64) NOT NULL,
2040      `petType` varchar(64) NOT NULL,
2041      `petDOB` date NOT NULL,
2042      `ownerLastName` varchar(64) NOT NULL,
2043      `ownerFirstName` varchar(64) NOT NULL,
2044      `ownerPhone1` int(12) NOT NULL,
2045      `ownerPhone2` int(12) NOT NULL,
2046      `ownerEmail` varchar(64) NOT NULL,
2047     );
2049 The above table is not in First normal Form as no :term:`primary key` exists. Primary key
2050 is supposed to be (`petName`,`ownerLastName`,`ownerFirstName`) . If the :term:`primary key`
2051 is chosen as suggested the resultant table won't be in Second as well as Third Normal
2052 form as the following dependencies exists.
2054 .. code-block:: mysql
2056     (OwnerLastName, OwnerFirstName) -> OwnerEmail
2057     (OwnerLastName, OwnerFirstName) -> OwnerPhone
2058     PetBreed -> PetType
2060 Which says, OwnerEmail depends on OwnerLastName and OwnerFirstName.
2061 OwnerPhone depends on OwnerLastName and OwnerFirstName.
2062 PetType depends on PetBreed.
2064 .. _faq6_38:
2066 6.38 How can I reassign auto-incremented values? 
2067 ------------------------------------------------
2069 Some users prefer their AUTO_INCREMENT values to be consecutive; this is not
2070 always the case after row deletion.
2072 Here are the steps to accomplish this. These are manual steps because they
2073 involve a manual verification at one point.
2075 * Ensure that you have exclusive access to the table to rearrange
2077 * On your :term:`primary key` column (i.e. id), remove the AUTO_INCREMENT setting
2079 * Delete your primary key in Structure > indexes
2081 * Create a new column future_id as primary key, AUTO_INCREMENT
2083 * Browse your table and verify that the new increments correspond to what
2084   you're expecting
2086 * Drop your old id column
2088 * Rename the future_id column to id
2090 * Move the new id column via Structure > Move columns
2092 .. _faq6_39:
2094 6.39 What is the "Adjust privileges" option when renaming, copying, or moving a database, table, column, or procedure?
2095 ----------------------------------------------------------------------------------------------------------------------
2097 When renaming/copying/moving a database/table/column/procedure,
2098 MySQL does not adjust the original privileges relating to these objects
2099 on its own. By selecting this option, phpMyAdmin will adjust the privilege
2100 table so that users have the same privileges on the new items.
2102 For example: A user 'bob'@'localhost' has a 'SELECT' privilege on a
2103 column named 'id'. Now, if this column is renamed to 'id_new', MySQL,
2104 on its own, would **not** adjust the column privileges to the new column name.
2105 phpMyAdmin can make this adjustment for you automatically.
2107 Notes:
2109 * While adjusting privileges for a database, the privileges of all
2110   database-related elements (tables, columns and procedures) are also adjusted
2111   to the database's new name.
2113 * Similarly, while adjusting privileges for a table, the privileges of all
2114   the columns inside the new table are also adjusted.
2116 * While adjusting privileges, the user performing the operation **must** have the following
2117   privileges:
2119   * SELECT, INSERT, UPDATE, DELETE privileges on following tables:
2120     `mysql`.`db`, `mysql`.`columns_priv`, `mysql`.`tables_priv`, `mysql`.`procs_priv`
2121   * FLUSH privilege (GLOBAL)
2123 Thus, if you want to replicate the database/table/column/procedure as it is
2124 while renaming/copying/moving these objects, make sure you have checked this option.
2126 .. _faq6_40:
2128 6.40 I see "Bind parameters" checkbox in the "SQL" page. How do I write parameterized SQL queries?
2129 --------------------------------------------------------------------------------------------------
2131 From version 4.5, phpMyAdmin allows users to execute parameterized queries in the "SQL" page.
2132 Parameters should be prefixed with a colon(:) and when the "Bind parameters" checkbox is checked
2133 these parameters will be identified and input fields for these parameters will be presented.
2134 Values entered in these field will be substituted in the query before being executed.
2136 .. _faq6_41:
2138 6.41 I get import errors while importing the dumps exported from older MySQL versions (pre-5.7.6) into newer MySQL versions (5.7.7+), but they work fine when imported back on same older versions ?
2139 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2141 If you get errors like *#1031 - Table storage engine for 'table_name' doesn't have this option*
2142 while importing the dumps exported from pre-5.7.7 MySQL servers into new MySQL server versions 5.7.7+,
2143 it might be because ROW_FORMAT=FIXED is not supported with InnoDB tables. Moreover, the value of
2144 `innodb_strict_mode <https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_strict_mode>`_ would define if this would be reported as a warning or as an error.
2146 Since MySQL version 5.7.9, the default value for `innodb_strict_mode` is `ON` and thus would generate
2147 an error when such a CREATE TABLE or ALTER TABLE statement is encountered.
2149 There are two ways of preventing such errors while importing:
2151 * Change the value of `innodb_strict_mode` to `OFF` before starting the import and turn it `ON` after
2152   the import is successfully completed.
2153 * This can be achieved in two ways:
2155   * Go to 'Variables' page and edit the value of `innodb_strict_mode`
2156   * Run the query : `SET GLOBAL `innodb_strict_mode` = '[value]'`
2158 After the import is done, it is suggested that the value of `innodb_strict_mode` should be reset to the
2159 original value.
2161 .. _faqproject:
2163 phpMyAdmin project
2164 ++++++++++++++++++
2166 .. _faq7_1:
2168 7.1 I have found a bug. How do I inform developers?
2169 ---------------------------------------------------
2171 Our issues tracker is located at <https://github.com/phpmyadmin/phpmyadmin/issues>.
2172 For security issues, please refer to the instructions at <https://www.phpmyadmin.net/security> to email
2173 the developers directly.
2175 .. _faq7_2:
2177 7.2 I want to translate the messages to a new language or upgrade an existing language, where do I start?
2178 ---------------------------------------------------------------------------------------------------------
2180 Translations are very welcome and all you need to have are the
2181 language skills. The easiest way is to use our `online translation
2182 service <https://hosted.weblate.org/projects/phpmyadmin/>`_. You can check
2183 out all the possibilities to translate in the `translate section on
2184 our website <https://www.phpmyadmin.net/translate/>`_.
2186 .. _faq7_3:
2188 7.3 I would like to help out with the development of phpMyAdmin. How should I proceed?
2189 --------------------------------------------------------------------------------------
2191 We welcome every contribution to the development of phpMyAdmin. You
2192 can check out all the possibilities to contribute in the `contribute
2193 section on our website
2194 <https://www.phpmyadmin.net/contribute/>`_.
2196 .. seealso:: :ref:`developers`
2198 .. _faqsecurity:
2200 Security
2201 ++++++++
2203 .. _faq8_1:
2205 8.1 Where can I get information about the security alerts issued for phpMyAdmin?
2206 --------------------------------------------------------------------------------
2208 Please refer to <https://www.phpmyadmin.net/security/>.
2210 .. _faq8_2:
2212 8.2 How can I protect phpMyAdmin against brute force attacks?
2213 -------------------------------------------------------------
2215 If you use Apache web server, phpMyAdmin exports information about
2216 authentication to the Apache environment and it can be used in Apache
2217 logs. Currently there are two variables available:
2220 ``userID``
2221     User name of currently active user (he does not have to be logged in).
2222 ``userStatus``
2223     Status of currently active user, one of ``ok`` (user is logged in),
2224     ``mysql-denied`` (MySQL denied user login), ``allow-denied`` (user denied
2225     by allow/deny rules), ``root-denied`` (root is denied in configuration),
2226     ``empty-denied`` (empty password is denied).
2228 ``LogFormat`` directive for Apache can look like following:
2230 .. code-block:: apache
2232     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %{userID}n %{userStatus}n"   pma_combined
2234 You can then use any log analyzing tools to detect possible break-in
2235 attempts.
2237 .. _faq8_3:
2239 8.3 Why are there path disclosures when directly loading certain files?
2240 -----------------------------------------------------------------------
2242 This is a server configuration problem. Never enable ``display_errors`` on a production site.
2244 .. _faq8_4:
2246 8.4 CSV files exported from phpMyAdmin could allow a formula injection attack.
2247 ------------------------------------------------------------------------------
2249 It is possible to generate a :term:`CSV` file that, when imported to a spreadsheet program such as Microsoft Excel,
2250 could potentially allow the execution of arbitrary commands.
2252 The CSV files generated by phpMyAdmin could potentially contain text that would be interpreted by a spreadsheet program as
2253 a formula, but we do not believe escaping those fields is the proper behavior. There is no means to properly escape and
2254 differentiate between a desired text output and a formula that should be escaped, and CSV is a text format where function
2255 definitions should not be interpreted anyway. We have discussed this at length and feel it is the responsibility of the
2256 spreadsheet program to properly parse and sanitize such data on input instead.
2258 Google also has a `similar view <https://sites.google.com/site/bughunteruniversity/nonvuln/csv-excel-formula-injection>`_.
2260 .. _faqsynchronization:
2262 Synchronization
2263 +++++++++++++++
2265 .. _faq9_1:
2267 9.1 (withdrawn).
2268 ----------------
2270 .. _faq9_2:
2272 9.2 (withdrawn).
2273 ----------------