"Fossies" - the Fresh Open Source Software Archive

Member "phpMyAdmin-5.0.1-all-languages/doc/html/setup.html" (7 Jan 2020, 125249 Bytes) of package /linux/www/phpMyAdmin-5.0.1-all-languages.zip:


The requested HTML page contains a <FORM> tag that is unusable on "Fossies" in "automatic" (rendered) mode so that page is shown as HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    2   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    3 
    4 
    5 <html xmlns="http://www.w3.org/1999/xhtml">
    6   <head>
    7     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    8     
    9     <title>Installation &#8212; phpMyAdmin 5.0.1 documentation</title>
   10     
   11     <link rel="stylesheet" href="_static/classic.css" type="text/css" />
   12     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
   13     
   14     <script type="text/javascript">
   15       var DOCUMENTATION_OPTIONS = {
   16         URL_ROOT:    './',
   17         VERSION:     '5.0.1',
   18         COLLAPSE_INDEX: false,
   19         FILE_SUFFIX: '.html',
   20         HAS_SOURCE:  true
   21       };
   22     </script>
   23     <script type="text/javascript" src="_static/jquery.js"></script>
   24     <script type="text/javascript" src="_static/underscore.js"></script>
   25     <script type="text/javascript" src="_static/doctools.js"></script>
   26     <link rel="index" title="Index" href="genindex.html" />
   27     <link rel="search" title="Search" href="search.html" />
   28     <link rel="copyright" title="Copyright" href="copyright.html" />
   29     <link rel="top" title="phpMyAdmin 5.0.1 documentation" href="index.html" />
   30     <link rel="next" title="Configuration" href="config.html" />
   31     <link rel="prev" title="Requirements" href="require.html" /> 
   32   </head>
   33   <body role="document">
   34     <div class="related" role="navigation" aria-label="related navigation">
   35       <h3>Navigation</h3>
   36       <ul>
   37         <li class="right" style="margin-right: 10px">
   38           <a href="genindex.html" title="General Index"
   39              accesskey="I">index</a></li>
   40         <li class="right" >
   41           <a href="config.html" title="Configuration"
   42              accesskey="N">next</a> |</li>
   43         <li class="right" >
   44           <a href="require.html" title="Requirements"
   45              accesskey="P">previous</a> |</li>
   46         <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.0.1 documentation</a> &#187;</li> 
   47       </ul>
   48     </div>  
   49 
   50     <div class="document">
   51       <div class="documentwrapper">
   52         <div class="bodywrapper">
   53           <div class="body" role="main">
   54             
   55   <div class="section" id="installation">
   56 <span id="setup"></span><h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h1>
   57 <p>phpMyAdmin does not apply any special security methods to the MySQL
   58 database server. It is still the system administrator&#8217;s job to grant
   59 permissions on the MySQL databases properly. phpMyAdmin&#8217;s <span class="guilabel">Users</span>
   60 page can be used for this.</p>
   61 <div class="admonition warning">
   62 <p class="first admonition-title">Warning</p>
   63 <p class="last"><a class="reference internal" href="glossary.html#term-mac"><span class="xref std std-term">Mac</span></a> users should note that if you are on a version before
   64 <a class="reference internal" href="glossary.html#term-mac-os-x"><span class="xref std std-term">Mac OS X</span></a>, StuffIt unstuffs with <a class="reference internal" href="glossary.html#term-mac"><span class="xref std std-term">Mac</span></a> formats. So you&#8217;ll have
   65 to resave as in BBEdit to Unix style ALL phpMyAdmin scripts before
   66 uploading them to your server, as PHP seems not to like <a class="reference internal" href="glossary.html#term-mac"><span class="xref std std-term">Mac</span></a>-style
   67 end of lines character (&#8220;<code class="docutils literal"><span class="pre">\r</span></code>&#8221;).</p>
   68 </div>
   69 <div class="section" id="linux-distributions">
   70 <h2>Linux distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline"></a></h2>
   71 <p>phpMyAdmin is included in most Linux distributions. It is recommended to use
   72 distribution packages when possible - they usually provide integration to your
   73 distribution and you will automatically get security updates from your distribution.</p>
   74 <div class="section" id="debian-and-ubuntu">
   75 <span id="debian-package"></span><h3>Debian and Ubuntu<a class="headerlink" href="#debian-and-ubuntu" title="Permalink to this headline"></a></h3>
   76 <p>Debian&#8217;s package repositories include a phpMyAdmin package, but be aware that
   77 the configuration file is maintained in <code class="docutils literal"><span class="pre">/etc/phpmyadmin</span></code> and may differ in
   78 some ways from the official phpMyAdmin documentation. Specifically, it does:</p>
   79 <ul class="simple">
   80 <li>Configuration of a web server (works for Apache and lighttpd).</li>
   81 <li>Creating of <a class="reference internal" href="#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a> using dbconfig-common.</li>
   82 <li>Securing setup script, see <a class="reference internal" href="#debian-setup"><span class="std std-ref">Setup script on Debian, Ubuntu and derivatives</span></a>.</li>
   83 </ul>
   84 <div class="admonition seealso">
   85 <p class="first admonition-title">See also</p>
   86 <p class="last">More information can be found in <a class="reference external" href="https://salsa.debian.org/phpmyadmin-team/phpmyadmin/blob/master/debian/README.Debian">README.Debian</a>
   87 (it is installed as <code class="file docutils literal"><span class="pre">/usr/share/doc/phmyadmin/README.Debian</span></code> with the package).</p>
   88 </div>
   89 </div>
   90 <div class="section" id="opensuse">
   91 <h3>OpenSUSE<a class="headerlink" href="#opensuse" title="Permalink to this headline"></a></h3>
   92 <p>OpenSUSE already comes with phpMyAdmin package, just install packages from
   93 the <a class="reference external" href="https://software.opensuse.org/package/phpMyAdmin">openSUSE Build Service</a>.</p>
   94 </div>
   95 <div class="section" id="gentoo">
   96 <h3>Gentoo<a class="headerlink" href="#gentoo" title="Permalink to this headline"></a></h3>
   97 <p>Gentoo ships the phpMyAdmin package, both in a near-stock configuration as well
   98 as in a <code class="docutils literal"><span class="pre">webapp-config</span></code> configuration. Use <code class="docutils literal"><span class="pre">emerge</span> <span class="pre">dev-db/phpmyadmin</span></code> to
   99 install.</p>
  100 </div>
  101 <div class="section" id="mandriva">
  102 <h3>Mandriva<a class="headerlink" href="#mandriva" title="Permalink to this headline"></a></h3>
  103 <p>Mandriva ships the phpMyAdmin package in their <code class="docutils literal"><span class="pre">contrib</span></code> branch and can be
  104 installed via the usual Control Center.</p>
  105 </div>
  106 <div class="section" id="fedora">
  107 <h3>Fedora<a class="headerlink" href="#fedora" title="Permalink to this headline"></a></h3>
  108 <p>Fedora ships the phpMyAdmin package, but be aware that the configuration file
  109 is maintained in <code class="docutils literal"><span class="pre">/etc/phpMyAdmin/</span></code> and may differ in some ways from the
  110 official phpMyAdmin documentation.</p>
  111 </div>
  112 <div class="section" id="red-hat-enterprise-linux">
  113 <h3>Red Hat Enterprise Linux<a class="headerlink" href="#red-hat-enterprise-linux" title="Permalink to this headline"></a></h3>
  114 <p>Red Hat Enterprise Linux itself and thus derivatives like CentOS don&#8217;t
  115 ship phpMyAdmin, but the Fedora-driven repository
  116 <a class="reference external" href="https://fedoraproject.org/wiki/EPEL">Extra Packages for Enterprise Linux (EPEL)</a>
  117 is doing so, if it&#8217;s
  118 <a class="reference external" href="https://fedoraproject.org/wiki/EPEL/FAQ#howtouse">enabled</a>.
  119 But be aware that the configuration file is maintained in
  120 <code class="docutils literal"><span class="pre">/etc/phpMyAdmin/</span></code> and may differ in some ways from the
  121 official phpMyAdmin documentation.</p>
  122 </div>
  123 </div>
  124 <div class="section" id="installing-on-windows">
  125 <h2>Installing on Windows<a class="headerlink" href="#installing-on-windows" title="Permalink to this headline"></a></h2>
  126 <p>The easiest way to get phpMyAdmin on Windows is using third party products
  127 which include phpMyAdmin together with a database and web server such as
  128 <a class="reference external" href="https://www.apachefriends.org/index.html">XAMPP</a>.</p>
  129 <p>You can find more of such options at <a class="reference external" href="https://en.wikipedia.org/wiki/List_of_AMP_packages">Wikipedia</a>.</p>
  130 </div>
  131 <div class="section" id="installing-from-git">
  132 <h2>Installing from Git<a class="headerlink" href="#installing-from-git" title="Permalink to this headline"></a></h2>
  133 <p>In order to install from Git, you&#8217;ll need a few supporting applications:</p>
  134 <ul class="simple">
  135 <li><a class="reference external" href="https://git-scm.com/downloads">Git</a> to download the source, or you can download the most recent source directly from <a class="reference external" href="https://codeload.github.com/phpmyadmin/phpmyadmin/zip/master">Github</a></li>
  136 <li><a class="reference external" href="https://getcomposer.org/download/">Composer</a></li>
  137 <li><a class="reference external" href="https://nodejs.org/en/download/">Node.js</a> (version 8 or higher)</li>
  138 <li><a class="reference external" href="https://yarnpkg.com/lang/en/docs/install">Yarn</a></li>
  139 </ul>
  140 <p>You can clone current phpMyAdmin source from
  141 <code class="docutils literal"><span class="pre">https://github.com/phpmyadmin/phpmyadmin.git</span></code>:</p>
  142 <div class="highlight-sh"><div class="highlight"><pre><span></span>git clone https://github.com/phpmyadmin/phpmyadmin.git
  143 </pre></div>
  144 </div>
  145 <p>Additionally you need to install dependencies using <a class="reference external" href="https://getcomposer.org">Composer</a>:</p>
  146 <div class="highlight-sh"><div class="highlight"><pre><span></span>composer update
  147 </pre></div>
  148 </div>
  149 <p>If you do not intend to develop, you can skip the installation of developer tools
  150 by invoking:</p>
  151 <div class="highlight-sh"><div class="highlight"><pre><span></span>composer update --no-dev
  152 </pre></div>
  153 </div>
  154 <p>Finally, you&#8217;ll need to use <a class="reference external" href="https://yarnpkg.com/lang/en/docs/install">Yarn</a> to install some JavaScript dependencies:</p>
  155 <div class="highlight-sh"><div class="highlight"><pre><span></span>yarn install
  156 </pre></div>
  157 </div>
  158 </div>
  159 <div class="section" id="installing-using-composer">
  160 <span id="composer"></span><h2>Installing using Composer<a class="headerlink" href="#installing-using-composer" title="Permalink to this headline"></a></h2>
  161 <p>You can install phpMyAdmin using the <a class="reference external" href="https://getcomposer.org/">Composer tool</a>, since 4.7.0 the releases
  162 are automatically mirrored to the default <a class="reference external" href="https://packagist.org/">Packagist</a> repository.</p>
  163 <div class="admonition note">
  164 <p class="first admonition-title">Note</p>
  165 <p class="last">The content of the Composer repository is automatically generated
  166 separately from the releases, so the content doesn&#8217;t have to be
  167 100% same as when you download the tarball. There should be no
  168 functional differences though.</p>
  169 </div>
  170 <p>To install phpMyAdmin simply run:</p>
  171 <div class="highlight-sh"><div class="highlight"><pre><span></span>composer create-project phpmyadmin/phpmyadmin
  172 </pre></div>
  173 </div>
  174 <p>Alternatively you can use our own composer repository, which contains
  175 the release tarballs and is available at
  176 &lt;<a class="reference external" href="https://www.phpmyadmin.net/packages.json">https://www.phpmyadmin.net/packages.json</a>&gt;:</p>
  177 <div class="highlight-sh"><div class="highlight"><pre><span></span>composer create-project phpmyadmin/phpmyadmin --repository-url<span class="o">=</span>https://www.phpmyadmin.net/packages.json --no-dev
  178 </pre></div>
  179 </div>
  180 </div>
  181 <div class="section" id="installing-using-docker">
  182 <span id="docker"></span><h2>Installing using Docker<a class="headerlink" href="#installing-using-docker" title="Permalink to this headline"></a></h2>
  183 <p>phpMyAdmin comes with a <a class="reference external" href="https://hub.docker.com/r/phpmyadmin/phpmyadmin/">Docker image</a>, which you can easily deploy. You can
  184 download it using:</p>
  185 <div class="highlight-sh"><div class="highlight"><pre><span></span>docker pull phpmyadmin/phpmyadmin
  186 </pre></div>
  187 </div>
  188 <p>The phpMyAdmin server will listen on port 80. It supports several ways of
  189 configuring the link to the database server, either by Docker&#8217;s link feature
  190 by linking your database container to <code class="docutils literal"><span class="pre">db</span></code> for phpMyAdmin (by specifying
  191 <code class="docutils literal"><span class="pre">--link</span> <span class="pre">your_db_host:db</span></code>) or by environment variables (in this case it&#8217;s up
  192 to you to set up networking in Docker to allow the phpMyAdmin container to access
  193 the database container over the network).</p>
  194 <div class="section" id="docker-environment-variables">
  195 <span id="docker-vars"></span><h3>Docker environment variables<a class="headerlink" href="#docker-environment-variables" title="Permalink to this headline"></a></h3>
  196 <p>You can configure several phpMyAdmin features using environment variables:</p>
  197 <dl class="envvar">
  198 <dt id="envvar-PMA_ARBITRARY">
  199 <code class="descname">PMA_ARBITRARY</code><a class="headerlink" href="#envvar-PMA_ARBITRARY" title="Permalink to this definition"></a></dt>
  200 <dd><p>Allows you to enter a database server hostname on login form.</p>
  201 <div class="admonition seealso">
  202 <p class="first admonition-title">See also</p>
  203 <p class="last"><span class="target" id="index-0"></span><a class="reference internal" href="config.html#cfg_AllowArbitraryServer"><code class="xref config config-option docutils literal"><span class="pre">$cfg['AllowArbitraryServer']</span></code></a></p>
  204 </div>
  205 </dd></dl>
  206 
  207 <dl class="envvar">
  208 <dt id="envvar-PMA_HOST">
  209 <code class="descname">PMA_HOST</code><a class="headerlink" href="#envvar-PMA_HOST" title="Permalink to this definition"></a></dt>
  210 <dd><p>Hostname or IP address of the database server to use.</p>
  211 <div class="admonition seealso">
  212 <p class="first admonition-title">See also</p>
  213 <p class="last"><span class="target" id="index-1"></span><a class="reference internal" href="config.html#cfg_Servers_host"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['host']</span></code></a></p>
  214 </div>
  215 </dd></dl>
  216 
  217 <dl class="envvar">
  218 <dt id="envvar-PMA_HOSTS">
  219 <code class="descname">PMA_HOSTS</code><a class="headerlink" href="#envvar-PMA_HOSTS" title="Permalink to this definition"></a></dt>
  220 <dd><p>Comma-separated hostnames or IP addresses of the database servers to use.</p>
  221 <div class="admonition note">
  222 <p class="first admonition-title">Note</p>
  223 <p class="last">Used only if <span class="target" id="index-2"></span><a class="reference internal" href="#envvar-PMA_HOST"><code class="xref std std-envvar docutils literal"><span class="pre">PMA_HOST</span></code></a> is empty.</p>
  224 </div>
  225 </dd></dl>
  226 
  227 <dl class="envvar">
  228 <dt id="envvar-PMA_VERBOSE">
  229 <code class="descname">PMA_VERBOSE</code><a class="headerlink" href="#envvar-PMA_VERBOSE" title="Permalink to this definition"></a></dt>
  230 <dd><p>Verbose name of the database server.</p>
  231 <div class="admonition seealso">
  232 <p class="first admonition-title">See also</p>
  233 <p class="last"><span class="target" id="index-3"></span><a class="reference internal" href="config.html#cfg_Servers_verbose"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['verbose']</span></code></a></p>
  234 </div>
  235 </dd></dl>
  236 
  237 <dl class="envvar">
  238 <dt id="envvar-PMA_VERBOSES">
  239 <code class="descname">PMA_VERBOSES</code><a class="headerlink" href="#envvar-PMA_VERBOSES" title="Permalink to this definition"></a></dt>
  240 <dd><p>Comma-separated verbose name of the database servers.</p>
  241 <div class="admonition note">
  242 <p class="first admonition-title">Note</p>
  243 <p class="last">Used only if <span class="target" id="index-4"></span><a class="reference internal" href="#envvar-PMA_VERBOSE"><code class="xref std std-envvar docutils literal"><span class="pre">PMA_VERBOSE</span></code></a> is empty.</p>
  244 </div>
  245 </dd></dl>
  246 
  247 <dl class="envvar">
  248 <dt id="envvar-PMA_USER">
  249 <code class="descname">PMA_USER</code><a class="headerlink" href="#envvar-PMA_USER" title="Permalink to this definition"></a></dt>
  250 <dd><p>User name to use for <a class="reference internal" href="#auth-config"><span class="std std-ref">Config authentication mode</span></a>.</p>
  251 </dd></dl>
  252 
  253 <dl class="envvar">
  254 <dt id="envvar-PMA_PASSWORD">
  255 <code class="descname">PMA_PASSWORD</code><a class="headerlink" href="#envvar-PMA_PASSWORD" title="Permalink to this definition"></a></dt>
  256 <dd><p>Password to use for <a class="reference internal" href="#auth-config"><span class="std std-ref">Config authentication mode</span></a>.</p>
  257 </dd></dl>
  258 
  259 <dl class="envvar">
  260 <dt id="envvar-PMA_PORT">
  261 <code class="descname">PMA_PORT</code><a class="headerlink" href="#envvar-PMA_PORT" title="Permalink to this definition"></a></dt>
  262 <dd><p>Port of the database server to use.</p>
  263 </dd></dl>
  264 
  265 <dl class="envvar">
  266 <dt id="envvar-PMA_PORTS">
  267 <code class="descname">PMA_PORTS</code><a class="headerlink" href="#envvar-PMA_PORTS" title="Permalink to this definition"></a></dt>
  268 <dd><p>Comma-separated ports of the database server to use.</p>
  269 <div class="admonition note">
  270 <p class="first admonition-title">Note</p>
  271 <p class="last">Used only if <span class="target" id="index-5"></span><a class="reference internal" href="#envvar-PMA_PORT"><code class="xref std std-envvar docutils literal"><span class="pre">PMA_PORT</span></code></a> is empty.</p>
  272 </div>
  273 </dd></dl>
  274 
  275 <dl class="envvar">
  276 <dt id="envvar-PMA_ABSOLUTE_URI">
  277 <code class="descname">PMA_ABSOLUTE_URI</code><a class="headerlink" href="#envvar-PMA_ABSOLUTE_URI" title="Permalink to this definition"></a></dt>
  278 <dd><p>The fully-qualified path (<code class="docutils literal"><span class="pre">https://pma.example.net/</span></code>) where the reverse
  279 proxy makes phpMyAdmin available.</p>
  280 <div class="admonition seealso">
  281 <p class="first admonition-title">See also</p>
  282 <p class="last"><span class="target" id="index-6"></span><a class="reference internal" href="config.html#cfg_PmaAbsoluteUri"><code class="xref config config-option docutils literal"><span class="pre">$cfg['PmaAbsoluteUri']</span></code></a></p>
  283 </div>
  284 </dd></dl>
  285 
  286 <p>By default, <a class="reference internal" href="#cookie"><span class="std std-ref">Cookie authentication mode</span></a> is used, but if <span class="target" id="index-7"></span><a class="reference internal" href="#envvar-PMA_USER"><code class="xref std std-envvar docutils literal"><span class="pre">PMA_USER</span></code></a> and
  287 <span class="target" id="index-8"></span><a class="reference internal" href="#envvar-PMA_PASSWORD"><code class="xref std std-envvar docutils literal"><span class="pre">PMA_PASSWORD</span></code></a> are set, it is switched to <a class="reference internal" href="#auth-config"><span class="std std-ref">Config authentication mode</span></a>.</p>
  288 <div class="admonition note">
  289 <p class="first admonition-title">Note</p>
  290 <p class="last">The credentials you need to log in are stored in the MySQL server, in case
  291 of Docker image, there are various ways to set it (for example
  292 <code class="samp docutils literal"><span class="pre">MYSQL_ROOT_PASSWORD</span></code> when starting the MySQL container). Please check
  293 documentation for <a class="reference external" href="https://hub.docker.com/_/mariadb">MariaDB container</a>
  294 or <a class="reference external" href="https://hub.docker.com/_/mysql">MySQL container</a>.</p>
  295 </div>
  296 </div>
  297 <div class="section" id="customizing-configuration">
  298 <span id="docker-custom"></span><h3>Customizing configuration<a class="headerlink" href="#customizing-configuration" title="Permalink to this headline"></a></h3>
  299 <p>Additionally configuration can be tweaked by <code class="file docutils literal"><span class="pre">/etc/phpmyadmin/config.user.inc.php</span></code>. If
  300 this file exists, it will be loaded after configuration is generated from above
  301 environment variables, so you can override any configuration variable. This
  302 configuration can be added as a volume when invoking docker using
  303 <cite>-v /some/local/directory/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php</cite> parameters.</p>
  304 <p>Note that the supplied configuration file is applied after <a class="reference internal" href="#docker-vars"><span class="std std-ref">Docker environment variables</span></a>,
  305 but you can override any of the values.</p>
  306 <p>For example to change the default behavior of CSV export you can use the following
  307 configuration file:</p>
  308 <div class="highlight-php"><div class="highlight"><pre><span></span><span class="o">&lt;?</span><span class="nx">php</span>
  309 <span class="nv">$cfg</span><span class="p">[</span><span class="s1">&#39;Export&#39;</span><span class="p">][</span><span class="s1">&#39;csv_columns&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="k">true</span><span class="p">;</span>
  310 </pre></div>
  311 </div>
  312 <p>You can also use it to define server configuration instead of using the
  313 environment variables listed in <a class="reference internal" href="#docker-vars"><span class="std std-ref">Docker environment variables</span></a>:</p>
  314 <div class="highlight-php"><div class="highlight"><pre><span></span><span class="o">&lt;?</span><span class="nx">php</span>
  315 <span class="cm">/* Override Servers array */</span>
  316 <span class="nv">$cfg</span><span class="p">[</span><span class="s1">&#39;Servers&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span>
  317     <span class="mi">1</span> <span class="o">=&gt;</span> <span class="p">[</span>
  318         <span class="s1">&#39;auth_type&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;cookie&#39;</span><span class="p">,</span>
  319         <span class="s1">&#39;host&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;mydb1&#39;</span><span class="p">,</span>
  320         <span class="s1">&#39;port&#39;</span> <span class="o">=&gt;</span> <span class="mi">3306</span><span class="p">,</span>
  321         <span class="s1">&#39;verbose&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Verbose name 1&#39;</span><span class="p">,</span>
  322     <span class="p">],</span>
  323     <span class="mi">2</span> <span class="o">=&gt;</span> <span class="p">[</span>
  324         <span class="s1">&#39;auth_type&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;cookie&#39;</span><span class="p">,</span>
  325         <span class="s1">&#39;host&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;mydb2&#39;</span><span class="p">,</span>
  326         <span class="s1">&#39;port&#39;</span> <span class="o">=&gt;</span> <span class="mi">3306</span><span class="p">,</span>
  327         <span class="s1">&#39;verbose&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Verbose name 2&#39;</span><span class="p">,</span>
  328     <span class="p">],</span>
  329 <span class="p">];</span>
  330 </pre></div>
  331 </div>
  332 <div class="admonition seealso">
  333 <p class="first admonition-title">See also</p>
  334 <p class="last">See <a class="reference internal" href="config.html#config"><span class="std std-ref">Configuration</span></a> for detailed description of configuration options.</p>
  335 </div>
  336 </div>
  337 <div class="section" id="docker-volumes">
  338 <h3>Docker Volumes<a class="headerlink" href="#docker-volumes" title="Permalink to this headline"></a></h3>
  339 <p>You can use the following volumes to customize image behavior:</p>
  340 <p><code class="file docutils literal"><span class="pre">/etc/phpmyadmin/config.user.inc.php</span></code></p>
  341 <blockquote>
  342 <div>Can be used for additional settings, see the previous chapter for more details.</div></blockquote>
  343 <p><code class="file docutils literal"><span class="pre">/sessions/</span></code></p>
  344 <blockquote>
  345 <div>Directory where PHP sessions are stored. You might want to share this
  346 for example when using <a class="reference internal" href="#auth-signon"><span class="std std-ref">Signon authentication mode</span></a>.</div></blockquote>
  347 <p><code class="file docutils literal"><span class="pre">/www/themes/</span></code></p>
  348 <blockquote>
  349 <div>Directory where phpMyAdmin looks for themes. By default only those shipped
  350 with phpMyAdmin are included, but you can include additional phpMyAdmin
  351 themes (see <a class="reference internal" href="themes.html#themes"><span class="std std-ref">Custom Themes</span></a>) by using Docker volumes.</div></blockquote>
  352 </div>
  353 <div class="section" id="docker-examples">
  354 <h3>Docker Examples<a class="headerlink" href="#docker-examples" title="Permalink to this headline"></a></h3>
  355 <p>To connect phpMyAdmin to a given server use:</p>
  356 <div class="highlight-sh"><div class="highlight"><pre><span></span>docker run --name myadmin -d -e <span class="nv">PMA_HOST</span><span class="o">=</span>dbhost -p <span class="m">8080</span>:80 phpmyadmin/phpmyadmin
  357 </pre></div>
  358 </div>
  359 <p>To connect phpMyAdmin to more servers use:</p>
  360 <div class="highlight-sh"><div class="highlight"><pre><span></span>docker run --name myadmin -d -e <span class="nv">PMA_HOSTS</span><span class="o">=</span>dbhost1,dbhost2,dbhost3 -p <span class="m">8080</span>:80 phpmyadmin/phpmyadmin
  361 </pre></div>
  362 </div>
  363 <p>To use arbitrary server option:</p>
  364 <div class="highlight-sh"><div class="highlight"><pre><span></span>docker run --name myadmin -d --link mysql_db_server:db -p <span class="m">8080</span>:80 -e <span class="nv">PMA_ARBITRARY</span><span class="o">=</span><span class="m">1</span> phpmyadmin/phpmyadmin
  365 </pre></div>
  366 </div>
  367 <p>You can also link the database container using Docker:</p>
  368 <div class="highlight-sh"><div class="highlight"><pre><span></span>docker run --name phpmyadmin -d --link mysql_db_server:db -p <span class="m">8080</span>:80 phpmyadmin/phpmyadmin
  369 </pre></div>
  370 </div>
  371 <p>Running with additional configuration:</p>
  372 <div class="highlight-sh"><div class="highlight"><pre><span></span>docker run --name phpmyadmin -d --link mysql_db_server:db -p <span class="m">8080</span>:80 -v /some/local/directory/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php phpmyadmin/phpmyadmin
  373 </pre></div>
  374 </div>
  375 <p>Running with additional themes:</p>
  376 <div class="highlight-sh"><div class="highlight"><pre><span></span>docker run --name phpmyadmin -d --link mysql_db_server:db -p <span class="m">8080</span>:80 -v /custom/phpmyadmin/theme/:/www/themes/theme/ phpmyadmin/phpmyadmin
  377 </pre></div>
  378 </div>
  379 </div>
  380 <div class="section" id="using-docker-compose">
  381 <h3>Using docker-compose<a class="headerlink" href="#using-docker-compose" title="Permalink to this headline"></a></h3>
  382 <p>Alternatively, you can also use docker-compose with the docker-compose.yml from
  383 &lt;<a class="reference external" href="https://github.com/phpmyadmin/docker">https://github.com/phpmyadmin/docker</a>&gt;.  This will run phpMyAdmin with an
  384 arbitrary server - allowing you to specify MySQL/MariaDB server on the login page.</p>
  385 <div class="highlight-sh"><div class="highlight"><pre><span></span>docker-compose up -d
  386 </pre></div>
  387 </div>
  388 </div>
  389 <div class="section" id="customizing-configuration-file-using-docker-compose">
  390 <h3>Customizing configuration file using docker-compose<a class="headerlink" href="#customizing-configuration-file-using-docker-compose" title="Permalink to this headline"></a></h3>
  391 <p>You can use an external file to customize phpMyAdmin configuration and pass it
  392 using the volumes directive:</p>
  393 <div class="highlight-yaml"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">phpmyadmin</span><span class="p p-Indicator">:</span>
  394     <span class="l l-Scalar l-Scalar-Plain">image</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">phpmyadmin/phpmyadmin</span>
  395     <span class="l l-Scalar l-Scalar-Plain">container_name</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">phpmyadmin</span>
  396     <span class="l l-Scalar l-Scalar-Plain">environment</span><span class="p p-Indicator">:</span>
  397      <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">PMA_ARBITRARY=1</span>
  398     <span class="l l-Scalar l-Scalar-Plain">restart</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">always</span>
  399     <span class="l l-Scalar l-Scalar-Plain">ports</span><span class="p p-Indicator">:</span>
  400      <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">8080:80</span>
  401     <span class="l l-Scalar l-Scalar-Plain">volumes</span><span class="p p-Indicator">:</span>
  402      <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/sessions</span>
  403      <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">~/docker/phpmyadmin/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php</span>
  404      <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/custom/phpmyadmin/theme/:/www/themes/theme/</span>
  405 </pre></div>
  406 </div>
  407 <div class="admonition seealso">
  408 <p class="first admonition-title">See also</p>
  409 <p class="last"><a class="reference internal" href="#docker-custom"><span class="std std-ref">Customizing configuration</span></a></p>
  410 </div>
  411 </div>
  412 <div class="section" id="running-behind-haproxy-in-a-subdirectory">
  413 <h3>Running behind haproxy in a subdirectory<a class="headerlink" href="#running-behind-haproxy-in-a-subdirectory" title="Permalink to this headline"></a></h3>
  414 <p>When you want to expose phpMyAdmin running in a Docker container in a
  415 subdirectory, you need to rewrite the request path in the server proxying the
  416 requests.</p>
  417 <p>For example, using haproxy it can be done as:</p>
  418 <div class="highlight-text"><div class="highlight"><pre><span></span>frontend http
  419     bind *:80
  420     option forwardfor
  421     option http-server-close
  422 
  423     ### NETWORK restriction
  424     acl LOCALNET  src 10.0.0.0/8 192.168.0.0/16 172.16.0.0/12
  425 
  426     # /phpmyadmin
  427     acl phpmyadmin  path_dir /phpmyadmin
  428     use_backend phpmyadmin if phpmyadmin LOCALNET
  429 
  430 backend phpmyadmin
  431     mode http
  432 
  433     reqirep  ^(GET|POST|HEAD)\ /phpmyadmin/(.*)     \1\ /\2
  434 
  435     # phpMyAdmin container IP
  436     server localhost     172.30.21.21:80
  437 </pre></div>
  438 </div>
  439 <p>When using traefik, something like following should work:</p>
  440 <div class="highlight-text"><div class="highlight"><pre><span></span>defaultEntryPoints = [&quot;http&quot;]
  441 [entryPoints]
  442   [entryPoints.http]
  443   address = &quot;:80&quot;
  444     [entryPoints.http.redirect]
  445       regex = &quot;(http:\\/\\/[^\\/]+\\/([^\\?\\.]+)[^\\/])$&quot;
  446       replacement = &quot;$1/&quot;
  447 
  448 [backends]
  449   [backends.myadmin]
  450     [backends.myadmin.servers.myadmin]
  451     url=&quot;http://internal.address.to.pma&quot;
  452 
  453 [frontends]
  454    [frontends.myadmin]
  455    backend = &quot;myadmin&quot;
  456    passHostHeader = true
  457      [frontends.myadmin.routes.default]
  458      rule=&quot;PathPrefixStrip:/phpmyadmin/;AddPrefix:/&quot;
  459 </pre></div>
  460 </div>
  461 <p>You then should specify <span class="target" id="index-9"></span><a class="reference internal" href="#envvar-PMA_ABSOLUTE_URI"><code class="xref std std-envvar docutils literal"><span class="pre">PMA_ABSOLUTE_URI</span></code></a> in the docker-compose
  462 configuration:</p>
  463 <div class="highlight-yaml"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">version</span><span class="p p-Indicator">:</span> <span class="s">&#39;2&#39;</span>
  464 
  465 <span class="l l-Scalar l-Scalar-Plain">services</span><span class="p p-Indicator">:</span>
  466   <span class="l l-Scalar l-Scalar-Plain">phpmyadmin</span><span class="p p-Indicator">:</span>
  467     <span class="l l-Scalar l-Scalar-Plain">restart</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">always</span>
  468     <span class="l l-Scalar l-Scalar-Plain">image</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">phpmyadmin/phpmyadmin</span>
  469     <span class="l l-Scalar l-Scalar-Plain">container_name</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">phpmyadmin</span>
  470     <span class="l l-Scalar l-Scalar-Plain">hostname</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">phpmyadmin</span>
  471     <span class="l l-Scalar l-Scalar-Plain">domainname</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">example.com</span>
  472     <span class="l l-Scalar l-Scalar-Plain">ports</span><span class="p p-Indicator">:</span>
  473       <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">8000:80</span>
  474     <span class="l l-Scalar l-Scalar-Plain">environment</span><span class="p p-Indicator">:</span>
  475       <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">PMA_HOSTS=172.26.36.7,172.26.36.8,172.26.36.9,172.26.36.10</span>
  476       <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">PMA_VERBOSES=production-db1,production-db2,dev-db1,dev-db2</span>
  477       <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">PMA_USER=root</span>
  478       <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">PMA_PASSWORD=</span>
  479       <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">PMA_ABSOLUTE_URI=http://example.com/phpmyadmin/</span>
  480 </pre></div>
  481 </div>
  482 </div>
  483 </div>
  484 <div class="section" id="quick-install">
  485 <span id="id1"></span><h2>Quick Install<a class="headerlink" href="#quick-install" title="Permalink to this headline"></a></h2>
  486 <ol class="arabic simple">
  487 <li>Choose an appropriate distribution kit from the phpmyadmin.net
  488 Downloads page. Some kits contain only the English messages, others
  489 contain all languages. We&#8217;ll assume you chose a kit whose name
  490 looks like <code class="docutils literal"><span class="pre">phpMyAdmin-x.x.x</span> <span class="pre">-all-languages.tar.gz</span></code>.</li>
  491 <li>Ensure you have downloaded a genuine archive, see <a class="reference internal" href="#verify"><span class="std std-ref">Verifying phpMyAdmin releases</span></a>.</li>
  492 <li>Untar or unzip the distribution (be sure to unzip the subdirectories):
  493 <code class="docutils literal"><span class="pre">tar</span> <span class="pre">-xzvf</span> <span class="pre">phpMyAdmin_x.x.x-all-languages.tar.gz</span></code> in your
  494 webserver&#8217;s document root. If you don&#8217;t have direct access to your
  495 document root, put the files in a directory on your local machine,
  496 and, after step 4, transfer the directory on your web server using,
  497 for example, FTP.</li>
  498 <li>Ensure that all the scripts have the appropriate owner (if PHP is
  499 running in safe mode, having some scripts with an owner different from
  500 the owner of other scripts will be a problem). See <a class="reference internal" href="faq.html#faq4-2"><span class="std std-ref">4.2 What&#8217;s the preferred way of making phpMyAdmin secure against evil access?</span></a> and
  501 <a class="reference internal" href="faq.html#faq1-26"><span class="std std-ref">1.26 I just installed phpMyAdmin in my document root of IIS but I get the error &#8220;No input file specified&#8221; when trying to run phpMyAdmin.</span></a> for suggestions.</li>
  502 <li>Now you must configure your installation. There are two methods that
  503 can be used. Traditionally, users have hand-edited a copy of
  504 <code class="file docutils literal"><span class="pre">config.inc.php</span></code>, but now a wizard-style setup script is provided
  505 for those who prefer a graphical installation. Creating a
  506 <code class="file docutils literal"><span class="pre">config.inc.php</span></code> is still a quick way to get started and needed for
  507 some advanced features.</li>
  508 </ol>
  509 <div class="section" id="manually-creating-the-file">
  510 <h3>Manually creating the file<a class="headerlink" href="#manually-creating-the-file" title="Permalink to this headline"></a></h3>
  511 <p>To manually create the file, simply use your text editor to create the
  512 file <code class="file docutils literal"><span class="pre">config.inc.php</span></code> (you can copy <code class="file docutils literal"><span class="pre">config.sample.inc.php</span></code> to get
  513 a minimal configuration file) in the main (top-level) phpMyAdmin
  514 directory (the one that contains <code class="file docutils literal"><span class="pre">index.php</span></code>). phpMyAdmin first
  515 loads <code class="file docutils literal"><span class="pre">libraries/config.default.php</span></code> and then overrides those values
  516 with anything found in <code class="file docutils literal"><span class="pre">config.inc.php</span></code>. If the default value is
  517 okay for a particular setting, there is no need to include it in
  518 <code class="file docutils literal"><span class="pre">config.inc.php</span></code>. You&#8217;ll probably need only a few directives to get going; a
  519 simple configuration may look like this:</p>
  520 <div class="highlight-xml+php"><div class="highlight"><pre><span></span><span class="cp">&lt;?php</span>
  521 <span class="c1">// use here a value of your choice at least 32 chars long</span>
  522 <span class="nv">$cfg</span><span class="p">[</span><span class="s1">&#39;blowfish_secret&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;1{dd0`&lt;Q),5XP_:R9UK%%8\&quot;EEcyH#{o&#39;</span><span class="p">;</span>
  523 
  524 <span class="nv">$i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span>
  525 <span class="nv">$i</span><span class="o">++</span><span class="p">;</span>
  526 <span class="nv">$cfg</span><span class="p">[</span><span class="s1">&#39;Servers&#39;</span><span class="p">][</span><span class="nv">$i</span><span class="p">][</span><span class="s1">&#39;auth_type&#39;</span><span class="p">]</span>     <span class="o">=</span> <span class="s1">&#39;cookie&#39;</span><span class="p">;</span>
  527 <span class="c1">// if you insist on &quot;root&quot; having no password:</span>
  528 <span class="c1">// $cfg[&#39;Servers&#39;][$i][&#39;AllowNoPassword&#39;] = true;</span>
  529 </pre></div>
  530 </div>
  531 <p>Or, if you prefer to not be prompted every time you log in:</p>
  532 <div class="highlight-xml+php"><div class="highlight"><pre><span></span><span class="cp">&lt;?php</span>
  533 
  534 <span class="nv">$i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span>
  535 <span class="nv">$i</span><span class="o">++</span><span class="p">;</span>
  536 <span class="nv">$cfg</span><span class="p">[</span><span class="s1">&#39;Servers&#39;</span><span class="p">][</span><span class="nv">$i</span><span class="p">][</span><span class="s1">&#39;user&#39;</span><span class="p">]</span>          <span class="o">=</span> <span class="s1">&#39;root&#39;</span><span class="p">;</span>
  537 <span class="nv">$cfg</span><span class="p">[</span><span class="s1">&#39;Servers&#39;</span><span class="p">][</span><span class="nv">$i</span><span class="p">][</span><span class="s1">&#39;password&#39;</span><span class="p">]</span>      <span class="o">=</span> <span class="s1">&#39;cbb74bc&#39;</span><span class="p">;</span> <span class="c1">// use here your password</span>
  538 <span class="nv">$cfg</span><span class="p">[</span><span class="s1">&#39;Servers&#39;</span><span class="p">][</span><span class="nv">$i</span><span class="p">][</span><span class="s1">&#39;auth_type&#39;</span><span class="p">]</span>     <span class="o">=</span> <span class="s1">&#39;config&#39;</span><span class="p">;</span>
  539 </pre></div>
  540 </div>
  541 <div class="admonition warning">
  542 <p class="first admonition-title">Warning</p>
  543 <p class="last">Storing passwords in the configuration is insecure as anybody can then
  544 manipulate your database.</p>
  545 </div>
  546 <p>For a full explanation of possible configuration values, see the
  547 <a class="reference internal" href="config.html#config"><span class="std std-ref">Configuration</span></a> of this document.</p>
  548 </div>
  549 <div class="section" id="using-the-setup-script">
  550 <span id="setup-script"></span><span id="index-10"></span><h3>Using the Setup script<a class="headerlink" href="#using-the-setup-script" title="Permalink to this headline"></a></h3>
  551 <p>Instead of manually editing <code class="file docutils literal"><span class="pre">config.inc.php</span></code>, you can use phpMyAdmin&#8217;s
  552 setup feature. The file can be generated using the setup and you can download it
  553 for upload to the server.</p>
  554 <p>Next, open your browser and visit the location where you installed phpMyAdmin,
  555 with the <code class="docutils literal"><span class="pre">/setup</span></code> suffix. The changes are not saved to the server, you need to
  556 use the <span class="guilabel">Download</span> button to save them to your computer and then upload
  557 to the server.</p>
  558 <p>Now the file is ready to be used. You can choose to review or edit the
  559 file with your favorite editor, if you prefer to set some advanced
  560 options that the setup script does not provide.</p>
  561 <ol class="arabic simple">
  562 <li>If you are using the <code class="docutils literal"><span class="pre">auth_type</span></code> &#8220;config&#8221;, it is suggested that you
  563 protect the phpMyAdmin installation directory because using config
  564 does not require a user to enter a password to access the phpMyAdmin
  565 installation. Use of an alternate authentication method is
  566 recommended, for example with HTTP–AUTH in a <a class="reference internal" href="glossary.html#term-htaccess"><span class="xref std std-term">.htaccess</span></a> file or switch to using
  567 <code class="docutils literal"><span class="pre">auth_type</span></code> cookie or http. See the <a class="reference internal" href="faq.html#faqmultiuser"><span class="std std-ref">ISPs, multi-user installations</span></a>
  568 for additional information, especially <a class="reference internal" href="faq.html#faq4-4"><span class="std std-ref">4.4 phpMyAdmin always gives &#8220;Access denied&#8221; when using HTTP authentication.</span></a>.</li>
  569 <li>Open the main phpMyAdmin directory in your browser.
  570 phpMyAdmin should now display a welcome screen and your databases, or
  571 a login dialog if using <a class="reference internal" href="glossary.html#term-http"><span class="xref std std-term">HTTP</span></a> or
  572 cookie authentication mode.</li>
  573 </ol>
  574 <div class="section" id="setup-script-on-debian-ubuntu-and-derivatives">
  575 <span id="debian-setup"></span><h4>Setup script on Debian, Ubuntu and derivatives<a class="headerlink" href="#setup-script-on-debian-ubuntu-and-derivatives" title="Permalink to this headline"></a></h4>
  576 <p>Debian and Ubuntu have changed the way in which the setup script is enabled and disabled, in a way
  577 that single command has to be executed for either of these.</p>
  578 <p>To allow editing configuration invoke:</p>
  579 <div class="highlight-sh"><div class="highlight"><pre><span></span>/usr/sbin/pma-configure
  580 </pre></div>
  581 </div>
  582 <p>To block editing configuration invoke:</p>
  583 <div class="highlight-sh"><div class="highlight"><pre><span></span>/usr/sbin/pma-secure
  584 </pre></div>
  585 </div>
  586 </div>
  587 <div class="section" id="setup-script-on-opensuse">
  588 <h4>Setup script on openSUSE<a class="headerlink" href="#setup-script-on-opensuse" title="Permalink to this headline"></a></h4>
  589 <p>Some openSUSE releases do not include setup script in the package. In case you
  590 want to generate configuration on these you can either download original
  591 package from &lt;<a class="reference external" href="https://www.phpmyadmin.net/">https://www.phpmyadmin.net/</a>&gt; or use setup script on our demo
  592 server: &lt;<a class="reference external" href="https://demo.phpmyadmin.net/master/setup/">https://demo.phpmyadmin.net/master/setup/</a>&gt;.</p>
  593 </div>
  594 </div>
  595 </div>
  596 <div class="section" id="verifying-phpmyadmin-releases">
  597 <span id="verify"></span><h2>Verifying phpMyAdmin releases<a class="headerlink" href="#verifying-phpmyadmin-releases" title="Permalink to this headline"></a></h2>
  598 <p>Since July 2015 all phpMyAdmin releases are cryptographically signed by the
  599 releasing developer, who through January 2016 was Marc Delisle. His key id is
  600 0xFEFC65D181AF644A, his PGP fingerprint is:</p>
  601 <div class="highlight-console"><div class="highlight"><pre><span></span><span class="go">436F F188 4B1A 0C3F DCBF 0D79 FEFC 65D1 81AF 644A</span>
  602 </pre></div>
  603 </div>
  604 <p>and you can get more identification information from &lt;<a class="reference external" href="https://keybase.io/lem9">https://keybase.io/lem9</a>&gt;.</p>
  605 <p>Beginning in January 2016, the release manager is Isaac Bennetch. His key id is
  606 0xCE752F178259BD92, and his PGP fingerprint is:</p>
  607 <div class="highlight-console"><div class="highlight"><pre><span></span><span class="go">3D06 A59E CE73 0EB7 1B51 1C17 CE75 2F17 8259 BD92</span>
  608 </pre></div>
  609 </div>
  610 <p>and you can get more identification information from &lt;<a class="reference external" href="https://keybase.io/ibennetch">https://keybase.io/ibennetch</a>&gt;.</p>
  611 <p>Some additional downloads (for example themes) might be signed by Michal Čihař. His key id is
  612 0x9C27B31342B7511D, and his PGP fingerprint is:</p>
  613 <div class="highlight-console"><div class="highlight"><pre><span></span><span class="go">63CB 1DF1 EF12 CF2A C0EE 5A32 9C27 B313 42B7 511D</span>
  614 </pre></div>
  615 </div>
  616 <p>and you can get more identification information from &lt;<a class="reference external" href="https://keybase.io/nijel">https://keybase.io/nijel</a>&gt;.</p>
  617 <p>You should verify that the signature matches the archive you have downloaded.
  618 This way you can be sure that you are using the same code that was released.
  619 You should also verify the date of the signature to make sure that you
  620 downloaded the latest version.</p>
  621 <p>Each archive is accompanied by <code class="docutils literal"><span class="pre">.asc</span></code> files which contain the PGP signature
  622 for it. Once you have both of them in the same folder, you can verify the signature:</p>
  623 <div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> gpg --verify phpMyAdmin-4.5.4.1-all-languages.zip.asc
  624 <span class="go">gpg: Signature made Fri 29 Jan 2016 08:59:37 AM EST using RSA key ID 8259BD92</span>
  625 <span class="go">gpg: Can&#39;t check signature: public key not found</span>
  626 </pre></div>
  627 </div>
  628 <p>As you can see gpg complains that it does not know the public key. At this
  629 point, you should do one of the following steps:</p>
  630 <ul class="simple">
  631 <li>Download the keyring from <a class="reference external" href="https://files.phpmyadmin.net/phpmyadmin.keyring">our download server</a>, then import it with:</li>
  632 </ul>
  633 <div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> gpg --import phpmyadmin.keyring
  634 </pre></div>
  635 </div>
  636 <ul class="simple">
  637 <li>Download and import the key from one of the key servers:</li>
  638 </ul>
  639 <div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> gpg --keyserver hkp://pgp.mit.edu --recv-keys 3D06A59ECE730EB71B511C17CE752F178259BD92
  640 <span class="go">gpg: requesting key 8259BD92 from hkp server pgp.mit.edu</span>
  641 <span class="go">gpg: key 8259BD92: public key &quot;Isaac Bennetch &lt;bennetch@gmail.com&gt;&quot; imported</span>
  642 <span class="go">gpg: no ultimately trusted keys found</span>
  643 <span class="go">gpg: Total number processed: 1</span>
  644 <span class="go">gpg:               imported: 1  (RSA: 1)</span>
  645 </pre></div>
  646 </div>
  647 <p>This will improve the situation a bit - at this point, you can verify that the
  648 signature from the given key is correct but you still can not trust the name used
  649 in the key:</p>
  650 <div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> gpg --verify phpMyAdmin-4.5.4.1-all-languages.zip.asc
  651 <span class="go">gpg: Signature made Fri 29 Jan 2016 08:59:37 AM EST using RSA key ID 8259BD92</span>
  652 <span class="go">gpg: Good signature from &quot;Isaac Bennetch &lt;bennetch@gmail.com&gt;&quot;</span>
  653 <span class="go">gpg:                 aka &quot;Isaac Bennetch &lt;isaac@bennetch.org&gt;&quot;</span>
  654 <span class="go">gpg: WARNING: This key is not certified with a trusted signature!</span>
  655 <span class="go">gpg:          There is no indication that the signature belongs to the owner.</span>
  656 <span class="go">Primary key fingerprint: 3D06 A59E CE73 0EB7 1B51  1C17 CE75 2F17 8259 BD92</span>
  657 </pre></div>
  658 </div>
  659 <p>The problem here is that anybody could issue the key with this name.  You need to
  660 ensure that the key is actually owned by the mentioned person.  The GNU Privacy
  661 Handbook covers this topic in the chapter <a class="reference external" href="https://www.gnupg.org/gph/en/manual.html#AEN335">Validating other keys on your public
  662 keyring</a>. The most reliable method is to meet the developer in person and
  663 exchange key fingerprints, however, you can also rely on the web of trust. This way
  664 you can trust the key transitively though signatures of others, who have met
  665 the developer in person. For example, you can see how <a class="reference external" href="https://pgp.cs.uu.nl/paths/79be3e4300411886/to/ce752f178259bd92.html">Isaac&#8217;s key links to
  666 Linus&#8217;s key</a>.</p>
  667 <p>Once the key is trusted, the warning will not occur:</p>
  668 <div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> gpg --verify phpMyAdmin-4.5.4.1-all-languages.zip.asc
  669 <span class="go">gpg: Signature made Fri 29 Jan 2016 08:59:37 AM EST using RSA key ID 8259BD92</span>
  670 <span class="go">gpg: Good signature from &quot;Isaac Bennetch &lt;bennetch@gmail.com&gt;&quot; [full]</span>
  671 </pre></div>
  672 </div>
  673 <p>Should the signature be invalid (the archive has been changed), you would get a
  674 clear error regardless of the fact that the key is trusted or not:</p>
  675 <div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> gpg --verify phpMyAdmin-4.5.4.1-all-languages.zip.asc
  676 <span class="go">gpg: Signature made Fri 29 Jan 2016 08:59:37 AM EST using RSA key ID 8259BD92</span>
  677 <span class="go">gpg: BAD signature from &quot;Isaac Bennetch &lt;bennetch@gmail.com&gt;&quot; [unknown]</span>
  678 </pre></div>
  679 </div>
  680 </div>
  681 <div class="section" id="phpmyadmin-configuration-storage">
  682 <span id="linked-tables"></span><span id="index-11"></span><h2>phpMyAdmin configuration storage<a class="headerlink" href="#phpmyadmin-configuration-storage" title="Permalink to this headline"></a></h2>
  683 <div class="versionchanged">
  684 <p><span class="versionmodified">Changed in version 3.4.0: </span>Prior to phpMyAdmin 3.4.0 this was called Linked Tables Infrastructure, but
  685 the name was changed due to the extended scope of the storage.</p>
  686 </div>
  687 <p>For a whole set of additional features (<a class="reference internal" href="bookmarks.html#bookmarks"><span class="std std-ref">Bookmarks</span></a>, comments, <a class="reference internal" href="glossary.html#term-sql"><span class="xref std std-term">SQL</span></a>-history,
  688 tracking mechanism, <a class="reference internal" href="glossary.html#term-pdf"><span class="xref std std-term">PDF</span></a>-generation, <a class="reference internal" href="transformations.html#transformations"><span class="std std-ref">Transformations</span></a>, <a class="reference internal" href="relations.html#relations"><span class="std std-ref">Relations</span></a>
  689 etc.) you need to create a set of special tables.  Those tables can be located
  690 in your own database, or in a central database for a multi-user installation
  691 (this database would then be accessed by the controluser, so no other user
  692 should have rights to it).</p>
  693 <div class="section" id="zero-configuration">
  694 <span id="zeroconf"></span><h3>Zero configuration<a class="headerlink" href="#zero-configuration" title="Permalink to this headline"></a></h3>
  695 <p>In many cases, this database structure can be automatically created and
  696 configured. This is called “Zero Configuration” mode and can be particularly
  697 useful in shared hosting situations. “Zeroconf” mode is on by default, to
  698 disable set <span class="target" id="index-12"></span><a class="reference internal" href="config.html#cfg_ZeroConf"><code class="xref config config-option docutils literal"><span class="pre">$cfg['ZeroConf']</span></code></a> to false.</p>
  699 <p>The following three scenarios are covered by the Zero Configuration mode:</p>
  700 <ul class="simple">
  701 <li>When entering a database where the configuration storage tables are not
  702 present, phpMyAdmin offers to create them from the Operations tab.</li>
  703 <li>When entering a database where the tables do already exist, the software
  704 automatically detects this and begins using them. This is the most common
  705 situation; after the tables are initially created automatically they are
  706 continually used without disturbing the user; this is also most useful on
  707 shared hosting where the user is not able to edit <code class="file docutils literal"><span class="pre">config.inc.php</span></code> and
  708 usually the user only has access to one database.</li>
  709 <li>When having access to multiple databases, if the user first enters the
  710 database containing the configuration storage tables then switches to
  711 another database,
  712 phpMyAdmin continues to use the tables from the first database; the user is
  713 not prompted to create more tables in the new database.</li>
  714 </ul>
  715 </div>
  716 <div class="section" id="manual-configuration">
  717 <h3>Manual configuration<a class="headerlink" href="#manual-configuration" title="Permalink to this headline"></a></h3>
  718 <p>Please look at your <code class="docutils literal"><span class="pre">./sql/</span></code> directory, where you should find a
  719 file called <em>create_tables.sql</em>. (If you are using a Windows server,
  720 pay special attention to <a class="reference internal" href="faq.html#faq1-23"><span class="std std-ref">1.23 I&#8217;m running MySQL on a Win32 machine. Each time I create a new table the table and column names are changed to lowercase!</span></a>).</p>
  721 <p>If you already had this infrastructure and:</p>
  722 <ul class="simple">
  723 <li>upgraded to MySQL 4.1.2 or newer, please use
  724 <code class="file docutils literal"><span class="pre">sql/upgrade_tables_mysql_4_1_2+.sql</span></code>.</li>
  725 <li>upgraded to phpMyAdmin 4.3.0 or newer from 2.5.0 or newer (&lt;= 4.2.x),
  726 please use <code class="file docutils literal"><span class="pre">sql/upgrade_column_info_4_3_0+.sql</span></code>.</li>
  727 <li>upgraded to phpMyAdmin 4.7.0 or newer from 4.3.0 or newer,
  728 please use <code class="file docutils literal"><span class="pre">sql/upgrade_tables_4_7_0+.sql</span></code>.</li>
  729 </ul>
  730 <p>and then create new tables by importing <code class="file docutils literal"><span class="pre">sql/create_tables.sql</span></code>.</p>
  731 <p>You can use your phpMyAdmin to create the tables for you. Please be
  732 aware that you may need special (administrator) privileges to create
  733 the database and tables, and that the script may need some tuning,
  734 depending on the database name.</p>
  735 <p>After having imported the <code class="file docutils literal"><span class="pre">sql/create_tables.sql</span></code> file, you
  736 should specify the table names in your <code class="file docutils literal"><span class="pre">config.inc.php</span></code> file. The
  737 directives used for that can be found in the <a class="reference internal" href="config.html#config"><span class="std std-ref">Configuration</span></a>.</p>
  738 <p>You will also need to have a controluser
  739 (<span class="target" id="index-13"></span><a class="reference internal" href="config.html#cfg_Servers_controluser"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['controluser']</span></code></a> and
  740 <span class="target" id="index-14"></span><a class="reference internal" href="config.html#cfg_Servers_controlpass"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['controlpass']</span></code></a> settings)
  741 with the proper rights to those tables. For example you can create it
  742 using following statement:</p>
  743 <p>And for any MariaDB version:</p>
  744 <div class="highlight-mysql"><div class="highlight"><pre><span></span><span class="k">CREATE</span> <span class="n">USER</span> <span class="s1">&#39;pma&#39;</span><span class="o">@</span><span class="s1">&#39;localhost&#39;</span> <span class="n">IDENTIFIED</span> <span class="n">VIA</span> <span class="n">mysql_native_password</span> <span class="k">USING</span> <span class="s1">&#39;pmapass&#39;</span><span class="p">;</span>
  745 <span class="k">GRANT</span> <span class="k">SELECT</span><span class="p">,</span> <span class="k">INSERT</span><span class="p">,</span> <span class="k">UPDATE</span><span class="p">,</span> <span class="k">DELETE</span> <span class="k">ON</span> <span class="ss">`&lt;pma_db&gt;`</span><span class="p">.</span><span class="o">*</span> <span class="k">TO</span> <span class="s1">&#39;pma&#39;</span><span class="o">@</span><span class="s1">&#39;localhost&#39;</span><span class="p">;</span>
  746 </pre></div>
  747 </div>
  748 <p>For MySQL 8.0 and newer:</p>
  749 <div class="highlight-mysql"><div class="highlight"><pre><span></span><span class="k">CREATE</span> <span class="n">USER</span> <span class="s1">&#39;pma&#39;</span><span class="o">@</span><span class="s1">&#39;localhost&#39;</span> <span class="n">IDENTIFIED</span> <span class="k">WITH</span> <span class="n">caching_sha2_password</span> <span class="k">BY</span> <span class="s1">&#39;pmapass&#39;</span><span class="p">;</span>
  750 <span class="k">GRANT</span> <span class="k">SELECT</span><span class="p">,</span> <span class="k">INSERT</span><span class="p">,</span> <span class="k">UPDATE</span><span class="p">,</span> <span class="k">DELETE</span> <span class="k">ON</span> <span class="o">&lt;</span><span class="n">pma_db</span><span class="o">&gt;</span><span class="p">.</span><span class="o">*</span> <span class="k">TO</span> <span class="s1">&#39;pma&#39;</span><span class="o">@</span><span class="s1">&#39;localhost&#39;</span><span class="p">;</span>
  751 </pre></div>
  752 </div>
  753 <p>For MySQL older than 8.0:</p>
  754 <div class="highlight-mysql"><div class="highlight"><pre><span></span><span class="k">CREATE</span> <span class="n">USER</span> <span class="s1">&#39;pma&#39;</span><span class="o">@</span><span class="s1">&#39;localhost&#39;</span> <span class="n">IDENTIFIED</span> <span class="k">WITH</span> <span class="n">mysql_native_password</span> <span class="k">AS</span> <span class="s1">&#39;pmapass&#39;</span><span class="p">;</span>
  755 <span class="k">GRANT</span> <span class="k">SELECT</span><span class="p">,</span> <span class="k">INSERT</span><span class="p">,</span> <span class="k">UPDATE</span><span class="p">,</span> <span class="k">DELETE</span> <span class="k">ON</span> <span class="o">&lt;</span><span class="n">pma_db</span><span class="o">&gt;</span><span class="p">.</span><span class="o">*</span> <span class="k">TO</span> <span class="s1">&#39;pma&#39;</span><span class="o">@</span><span class="s1">&#39;localhost&#39;</span><span class="p">;</span>
  756 </pre></div>
  757 </div>
  758 <p>Note that MySQL installations with PHP older than 7.4 and MySQL newer than 8.0 may require
  759 using the mysql_native_password authentication as a workaround, see
  760 <a class="reference internal" href="faq.html#faq1-45"><span class="std std-ref">1.45 I get an error message about unknown authentication method caching_sha2_password when trying to log in</span></a> for details.</p>
  761 </div>
  762 </div>
  763 <div class="section" id="upgrading-from-an-older-version">
  764 <span id="upgrading"></span><h2>Upgrading from an older version<a class="headerlink" href="#upgrading-from-an-older-version" title="Permalink to this headline"></a></h2>
  765 <div class="admonition warning">
  766 <p class="first admonition-title">Warning</p>
  767 <p><strong>Never</strong> extract the new version over an existing installation of
  768 phpMyAdmin, always first remove the old files keeping just the
  769 configuration.</p>
  770 <p class="last">This way, you will not leave any old or outdated files in the directory,
  771 which can have severe security implications or can cause various breakages.</p>
  772 </div>
  773 <p>Simply copy <code class="file docutils literal"><span class="pre">config.inc.php</span></code> from your previous installation into
  774 the newly unpacked one. Configuration files from old versions may
  775 require some tweaking as some options have been changed or removed.
  776 For compatibility with PHP 5.3 and later, remove a
  777 <code class="docutils literal"><span class="pre">set_magic_quotes_runtime(0);</span></code> statement that you might find near
  778 the end of your configuration file.</p>
  779 <p>You should <strong>not</strong> copy <code class="file docutils literal"><span class="pre">libraries/config.default.php</span></code> over
  780 <code class="file docutils literal"><span class="pre">config.inc.php</span></code> because the default configuration file is version-
  781 specific.</p>
  782 <p>The complete upgrade can be performed in a few simple steps:</p>
  783 <ol class="arabic simple">
  784 <li>Download the latest phpMyAdmin version from &lt;<a class="reference external" href="https://www.phpmyadmin.net/downloads/">https://www.phpmyadmin.net/downloads/</a>&gt;.</li>
  785 <li>Rename existing phpMyAdmin folder (for example to <code class="docutils literal"><span class="pre">phpmyadmin-old</span></code>).</li>
  786 <li>Unpack freshly downloaded phpMyAdmin to the desired location (for example <code class="docutils literal"><span class="pre">phpmyadmin</span></code>).</li>
  787 <li>Copy <code class="file docutils literal"><span class="pre">config.inc.php`</span></code> from old location (<code class="docutils literal"><span class="pre">phpmyadmin-old</span></code>) to the new one (<code class="docutils literal"><span class="pre">phpmyadmin</span></code>).</li>
  788 <li>Test that everything works properly.</li>
  789 <li>Remove backup of a previous version (<code class="docutils literal"><span class="pre">phpmyadmin-old</span></code>).</li>
  790 </ol>
  791 <p>If you have upgraded your MySQL server from a version previous to 4.1.2 to
  792 version 5.x or newer and if you use the phpMyAdmin configuration storage, you
  793 should run the <a class="reference internal" href="glossary.html#term-sql"><span class="xref std std-term">SQL</span></a> script found in
  794 <code class="file docutils literal"><span class="pre">sql/upgrade_tables_mysql_4_1_2+.sql</span></code>.</p>
  795 <p>If you have upgraded your phpMyAdmin to 4.3.0 or newer from 2.5.0 or
  796 newer (&lt;= 4.2.x) and if you use the phpMyAdmin configuration storage, you
  797 should run the <a class="reference internal" href="glossary.html#term-sql"><span class="xref std std-term">SQL</span></a> script found in
  798 <code class="file docutils literal"><span class="pre">sql/upgrade_column_info_4_3_0+.sql</span></code>.</p>
  799 <p>Do not forget to clear the browser cache and to empty the old session by
  800 logging out and logging in again.</p>
  801 </div>
  802 <div class="section" id="using-authentication-modes">
  803 <span id="authentication-modes"></span><span id="index-15"></span><h2>Using authentication modes<a class="headerlink" href="#using-authentication-modes" title="Permalink to this headline"></a></h2>
  804 <p><a class="reference internal" href="glossary.html#term-http"><span class="xref std std-term">HTTP</span></a> and cookie authentication modes are recommended in a <strong>multi-user
  805 environment</strong> where you want to give users access to their own database and
  806 don&#8217;t want them to play around with others. Nevertheless, be aware that MS
  807 Internet Explorer seems to be really buggy about cookies, at least till version
  808 6. Even in a <strong>single-user environment</strong>, you might prefer to use <a class="reference internal" href="glossary.html#term-http"><span class="xref std std-term">HTTP</span></a>
  809 or cookie mode so that your user/password pair are not in clear in the
  810 configuration file.</p>
  811 <p><a class="reference internal" href="glossary.html#term-http"><span class="xref std std-term">HTTP</span></a> and cookie authentication
  812 modes are more secure: the MySQL login information does not need to be
  813 set in the phpMyAdmin configuration file (except possibly for the
  814 <span class="target" id="index-16"></span><a class="reference internal" href="config.html#cfg_Servers_controluser"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['controluser']</span></code></a>).
  815 However, keep in mind that the password travels in plain text unless
  816 you are using the HTTPS protocol. In cookie mode, the password is
  817 stored, encrypted with the AES algorithm, in a temporary cookie.</p>
  818 <p>Then each of the <em>true</em> users should be granted a set of privileges
  819 on a set of particular databases. Normally you shouldn&#8217;t give global
  820 privileges to an ordinary user unless you understand the impact of those
  821 privileges (for example, you are creating a superuser).
  822 For example, to grant the user <em>real_user</em> with all privileges on
  823 the database <em>user_base</em>:</p>
  824 <div class="highlight-mysql"><div class="highlight"><pre><span></span><span class="k">GRANT</span> <span class="k">ALL</span> <span class="n">PRIVILEGES</span> <span class="k">ON</span> <span class="n">user_base</span><span class="p">.</span><span class="o">*</span> <span class="k">TO</span> <span class="s1">&#39;real_user&#39;</span><span class="o">@</span><span class="n">localhost</span> <span class="n">IDENTIFIED</span> <span class="k">BY</span> <span class="s1">&#39;real_password&#39;</span><span class="p">;</span>
  825 </pre></div>
  826 </div>
  827 <p>What the user may now do is controlled entirely by the MySQL user management
  828 system. With HTTP or cookie authentication mode, you don&#8217;t need to fill the
  829 user/password fields inside the <span class="target" id="index-17"></span><a class="reference internal" href="config.html#cfg_Servers"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers']</span></code></a>.</p>
  830 <div class="admonition seealso">
  831 <p class="first admonition-title">See also</p>
  832 <p class="last"><a class="reference internal" href="faq.html#faq1-32"><span class="std std-ref">1.32 Can I use HTTP authentication with IIS?</span></a>,
  833 <a class="reference internal" href="faq.html#faq1-35"><span class="std std-ref">1.35 Can I use HTTP authentication with Apache CGI?</span></a>,
  834 <a class="reference internal" href="faq.html#faq4-1"><span class="std std-ref">4.1 I&#8217;m an ISP. Can I setup one central copy of phpMyAdmin or do I need to install it for each customer?</span></a>,
  835 <a class="reference internal" href="faq.html#faq4-2"><span class="std std-ref">4.2 What&#8217;s the preferred way of making phpMyAdmin secure against evil access?</span></a>,
  836 <a class="reference internal" href="faq.html#faq4-3"><span class="std std-ref">4.3 I get errors about not being able to include a file in /lang or in /libraries.</span></a></p>
  837 </div>
  838 <div class="section" id="http-authentication-mode">
  839 <span id="auth-http"></span><span id="index-18"></span><h3>HTTP authentication mode<a class="headerlink" href="#http-authentication-mode" title="Permalink to this headline"></a></h3>
  840 <ul>
  841 <li><p class="first">Uses <a class="reference internal" href="glossary.html#term-http"><span class="xref std std-term">HTTP</span></a> Basic authentication
  842 method and allows you to log in as any valid MySQL user.</p>
  843 </li>
  844 <li><p class="first">Is supported with most PHP configurations. For <a class="reference internal" href="glossary.html#term-iis"><span class="xref std std-term">IIS</span></a> (<a class="reference internal" href="glossary.html#term-isapi"><span class="xref std std-term">ISAPI</span></a>)
  845 support using <a class="reference internal" href="glossary.html#term-cgi"><span class="xref std std-term">CGI</span></a> PHP see <a class="reference internal" href="faq.html#faq1-32"><span class="std std-ref">1.32 Can I use HTTP authentication with IIS?</span></a>, for using with Apache
  846 <a class="reference internal" href="glossary.html#term-cgi"><span class="xref std std-term">CGI</span></a> see <a class="reference internal" href="faq.html#faq1-35"><span class="std std-ref">1.35 Can I use HTTP authentication with Apache CGI?</span></a>.</p>
  847 </li>
  848 <li><p class="first">When PHP is running under Apache&#8217;s <a class="reference internal" href="glossary.html#term-mod-proxy-fcgi"><span class="xref std std-term">mod_proxy_fcgi</span></a> (e.g. with PHP-FPM),
  849 <code class="docutils literal"><span class="pre">Authorization</span></code> headers are not passed to the underlying FCGI application,
  850 such that your credentials will not reach the application. In this case, you can
  851 add the following configuration directive:</p>
  852 <div class="highlight-apache"><div class="highlight"><pre><span></span><span class="nb">SetEnvIf</span> Authorization <span class="s2">&quot;(.*)&quot;</span> HTTP_AUTHORIZATION=$1
  853 </pre></div>
  854 </div>
  855 </li>
  856 <li><p class="first">See also <a class="reference internal" href="faq.html#faq4-4"><span class="std std-ref">4.4 phpMyAdmin always gives &#8220;Access denied&#8221; when using HTTP authentication.</span></a> about not using the <a class="reference internal" href="glossary.html#term-htaccess"><span class="xref std std-term">.htaccess</span></a> mechanism along with
  857 &#8216;<a class="reference internal" href="glossary.html#term-http"><span class="xref std std-term">HTTP</span></a>&#8216; authentication mode.</p>
  858 </li>
  859 </ul>
  860 <div class="admonition note">
  861 <p class="first admonition-title">Note</p>
  862 <p class="last">There is no way to do proper logout in HTTP authentication, most browsers
  863 will remember credentials until there is no different successful
  864 authentication. Because of this, this method has a limitation that you can not
  865 login with the same user after logout.</p>
  866 </div>
  867 </div>
  868 <div class="section" id="cookie-authentication-mode">
  869 <span id="cookie"></span><span id="index-19"></span><h3>Cookie authentication mode<a class="headerlink" href="#cookie-authentication-mode" title="Permalink to this headline"></a></h3>
  870 <ul class="simple">
  871 <li>Username and password are stored in cookies during the session and password
  872 is deleted when it ends.</li>
  873 <li>With this mode, the user can truly log out of phpMyAdmin and log
  874 back in with the same username (this is not possible with <a class="reference internal" href="#auth-http"><span class="std std-ref">HTTP authentication mode</span></a>).</li>
  875 <li>If you want to allow users to enter any hostname to connect (rather than only
  876 servers that are configured in <code class="file docutils literal"><span class="pre">config.inc.php</span></code>),
  877 see the <span class="target" id="index-20"></span><a class="reference internal" href="config.html#cfg_AllowArbitraryServer"><code class="xref config config-option docutils literal"><span class="pre">$cfg['AllowArbitraryServer']</span></code></a> directive.</li>
  878 <li>As mentioned in the <a class="reference internal" href="require.html#require"><span class="std std-ref">Requirements</span></a> section, having the <code class="docutils literal"><span class="pre">openssl</span></code> extension
  879 will speed up access considerably, but is not required.</li>
  880 </ul>
  881 </div>
  882 <div class="section" id="signon-authentication-mode">
  883 <span id="auth-signon"></span><span id="index-21"></span><h3>Signon authentication mode<a class="headerlink" href="#signon-authentication-mode" title="Permalink to this headline"></a></h3>
  884 <ul class="simple">
  885 <li>This mode is a convenient way of using credentials from another
  886 application to authenticate to phpMyAdmin to implement a single signon
  887 solution.</li>
  888 <li>The other application has to store login information into session
  889 data (see <span class="target" id="index-22"></span><a class="reference internal" href="config.html#cfg_Servers_SignonSession"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['SignonSession']</span></code></a> and
  890 <span class="target" id="index-23"></span><a class="reference internal" href="config.html#cfg_Servers_SignonCookieParams"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['SignonCookieParams']</span></code></a>) or you
  891 need to implement script to return the credentials (see
  892 <span class="target" id="index-24"></span><a class="reference internal" href="config.html#cfg_Servers_SignonScript"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['SignonScript']</span></code></a>).</li>
  893 <li>When no credentials are available, the user is being redirected to
  894 <span class="target" id="index-25"></span><a class="reference internal" href="config.html#cfg_Servers_SignonURL"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['SignonURL']</span></code></a>, where you should handle
  895 the login process.</li>
  896 </ul>
  897 <p>The very basic example of saving credentials in a session is available as
  898 <code class="file docutils literal"><span class="pre">examples/signon.php</span></code>:</p>
  899 <div class="highlight-php"><div class="highlight"><pre><span></span><span class="o">&lt;?</span><span class="nx">php</span>
  900 <span class="cm">/* vim: set expandtab sw=4 ts=4 sts=4: */</span>
  901 <span class="sd">/**</span>
  902 <span class="sd"> * Single signon for phpMyAdmin</span>
  903 <span class="sd"> *</span>
  904 <span class="sd"> * This is just example how to use session based single signon with</span>
  905 <span class="sd"> * phpMyAdmin, it is not intended to be perfect code and look, only</span>
  906 <span class="sd"> * shows how you can integrate this functionality in your application.</span>
  907 <span class="sd"> *</span>
  908 <span class="sd"> * @package    PhpMyAdmin</span>
  909 <span class="sd"> * @subpackage Example</span>
  910 <span class="sd"> */</span>
  911 <span class="k">declare</span><span class="p">(</span><span class="nx">strict_types</span><span class="o">=</span><span class="mi">1</span><span class="p">);</span>
  912 
  913 <span class="cm">/* Use cookies for session */</span>
  914 <span class="nb">ini_set</span><span class="p">(</span><span class="s1">&#39;session.use_cookies&#39;</span><span class="p">,</span> <span class="s1">&#39;true&#39;</span><span class="p">);</span>
  915 <span class="cm">/* Change this to true if using phpMyAdmin over https */</span>
  916 <span class="nv">$secure_cookie</span> <span class="o">=</span> <span class="k">false</span><span class="p">;</span>
  917 <span class="cm">/* Need to have cookie visible from parent directory */</span>
  918 <span class="nb">session_set_cookie_params</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="s1">&#39;/&#39;</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="nv">$secure_cookie</span><span class="p">,</span> <span class="k">true</span><span class="p">);</span>
  919 <span class="cm">/* Create signon session */</span>
  920 <span class="nv">$session_name</span> <span class="o">=</span> <span class="s1">&#39;SignonSession&#39;</span><span class="p">;</span>
  921 <span class="nb">session_name</span><span class="p">(</span><span class="nv">$session_name</span><span class="p">);</span>
  922 <span class="c1">// Uncomment and change the following line to match your $cfg[&#39;SessionSavePath&#39;]</span>
  923 <span class="c1">//session_save_path(&#39;/foobar&#39;);</span>
  924 <span class="o">@</span><span class="nb">session_start</span><span class="p">();</span>
  925 
  926 <span class="cm">/* Was data posted? */</span>
  927 <span class="k">if</span> <span class="p">(</span><span class="nb">isset</span><span class="p">(</span><span class="nv">$_POST</span><span class="p">[</span><span class="s1">&#39;user&#39;</span><span class="p">]))</span> <span class="p">{</span>
  928     <span class="cm">/* Store there credentials */</span>
  929     <span class="nv">$_SESSION</span><span class="p">[</span><span class="s1">&#39;PMA_single_signon_user&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nv">$_POST</span><span class="p">[</span><span class="s1">&#39;user&#39;</span><span class="p">];</span>
  930     <span class="nv">$_SESSION</span><span class="p">[</span><span class="s1">&#39;PMA_single_signon_password&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nv">$_POST</span><span class="p">[</span><span class="s1">&#39;password&#39;</span><span class="p">];</span>
  931     <span class="nv">$_SESSION</span><span class="p">[</span><span class="s1">&#39;PMA_single_signon_host&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nv">$_POST</span><span class="p">[</span><span class="s1">&#39;host&#39;</span><span class="p">];</span>
  932     <span class="nv">$_SESSION</span><span class="p">[</span><span class="s1">&#39;PMA_single_signon_port&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nv">$_POST</span><span class="p">[</span><span class="s1">&#39;port&#39;</span><span class="p">];</span>
  933     <span class="cm">/* Update another field of server configuration */</span>
  934     <span class="nv">$_SESSION</span><span class="p">[</span><span class="s1">&#39;PMA_single_signon_cfgupdate&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;verbose&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Signon test&#39;</span><span class="p">];</span>
  935     <span class="nv">$id</span> <span class="o">=</span> <span class="nb">session_id</span><span class="p">();</span>
  936     <span class="cm">/* Close that session */</span>
  937     <span class="o">@</span><span class="nb">session_write_close</span><span class="p">();</span>
  938     <span class="cm">/* Redirect to phpMyAdmin (should use absolute URL here!) */</span>
  939     <span class="nb">header</span><span class="p">(</span><span class="s1">&#39;Location: ../index.php&#39;</span><span class="p">);</span>
  940 <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
  941     <span class="cm">/* Show simple form */</span>
  942     <span class="nb">header</span><span class="p">(</span><span class="s1">&#39;Content-Type: text/html; charset=utf-8&#39;</span><span class="p">);</span>
  943     <span class="k">echo</span> <span class="s1">&#39;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&#39;</span> <span class="p">,</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">;</span>
  944     <span class="cp">?&gt;</span><span class="x"></span>
  945 <span class="x">    &lt;!DOCTYPE HTML&gt;</span>
  946 <span class="x">    &lt;html lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;</span>
  947 <span class="x">    &lt;head&gt;</span>
  948 <span class="x">    &lt;link rel=&quot;icon&quot; href=&quot;../favicon.ico&quot; type=&quot;image/x-icon&quot;&gt;</span>
  949 <span class="x">    &lt;link rel=&quot;shortcut icon&quot; href=&quot;../favicon.ico&quot; type=&quot;image/x-icon&quot;&gt;</span>
  950 <span class="x">    &lt;meta charset=&quot;utf-8&quot;&gt;</span>
  951 <span class="x">    &lt;title&gt;phpMyAdmin single signon example&lt;/title&gt;</span>
  952 <span class="x">    &lt;/head&gt;</span>
  953 <span class="x">    &lt;body&gt;</span>
  954 <span class="x">    </span><span class="cp">&lt;?php</span>
  955     <span class="k">if</span> <span class="p">(</span><span class="nb">isset</span><span class="p">(</span><span class="nv">$_SESSION</span><span class="p">[</span><span class="s1">&#39;PMA_single_signon_error_message&#39;</span><span class="p">]))</span> <span class="p">{</span>
  956         <span class="k">echo</span> <span class="s1">&#39;&lt;p class=&quot;error&quot;&gt;&#39;</span><span class="p">;</span>
  957         <span class="k">echo</span> <span class="nv">$_SESSION</span><span class="p">[</span><span class="s1">&#39;PMA_single_signon_error_message&#39;</span><span class="p">];</span>
  958         <span class="k">echo</span> <span class="s1">&#39;&lt;/p&gt;&#39;</span><span class="p">;</span>
  959     <span class="p">}</span>
  960     <span class="cp">?&gt;</span><span class="x"></span>
  961 <span class="x">    &lt;form action=&quot;signon.php&quot; method=&quot;post&quot;&gt;</span>
  962 <span class="x">    Username: &lt;input type=&quot;text&quot; name=&quot;user&quot;&gt;&lt;br&gt;</span>
  963 <span class="x">    Password: &lt;input type=&quot;password&quot; name=&quot;password&quot;&gt;&lt;br&gt;</span>
  964 <span class="x">    Host: (will use the one from config.inc.php by default)</span>
  965 <span class="x">    &lt;input type=&quot;text&quot; name=&quot;host&quot;&gt;&lt;br&gt;</span>
  966 <span class="x">    Port: (will use the one from config.inc.php by default)</span>
  967 <span class="x">    &lt;input type=&quot;text&quot; name=&quot;port&quot;&gt;&lt;br&gt;</span>
  968 <span class="x">    &lt;input type=&quot;submit&quot;&gt;</span>
  969 <span class="x">    &lt;/form&gt;</span>
  970 <span class="x">    &lt;/body&gt;</span>
  971 <span class="x">    &lt;/html&gt;</span>
  972 <span class="x">    </span><span class="cp">&lt;?php</span>
  973 <span class="p">}</span>
  974 <span class="cp">?&gt;</span><span class="x"></span>
  975 </pre></div>
  976 </div>
  977 <p>Alternatively, you can also use this way to integrate with OpenID as shown
  978 in <code class="file docutils literal"><span class="pre">examples/openid.php</span></code>:</p>
  979 <div class="highlight-php"><div class="highlight"><pre><span></span><span class="o">&lt;?</span><span class="nx">php</span>
  980 <span class="cm">/* vim: set expandtab sw=4 ts=4 sts=4: */</span>
  981 <span class="sd">/**</span>
  982 <span class="sd"> * Single signon for phpMyAdmin using OpenID</span>
  983 <span class="sd"> *</span>
  984 <span class="sd"> * This is just example how to use single signon with phpMyAdmin, it is</span>
  985 <span class="sd"> * not intended to be perfect code and look, only shows how you can</span>
  986 <span class="sd"> * integrate this functionality in your application.</span>
  987 <span class="sd"> *</span>
  988 <span class="sd"> * It uses OpenID pear package, see https://pear.php.net/package/OpenID</span>
  989 <span class="sd"> *</span>
  990 <span class="sd"> * User first authenticates using OpenID and based on content of $AUTH_MAP</span>
  991 <span class="sd"> * the login information is passed to phpMyAdmin in session data.</span>
  992 <span class="sd"> *</span>
  993 <span class="sd"> * @package    PhpMyAdmin</span>
  994 <span class="sd"> * @subpackage Example</span>
  995 <span class="sd"> */</span>
  996 <span class="k">declare</span><span class="p">(</span><span class="nx">strict_types</span><span class="o">=</span><span class="mi">1</span><span class="p">);</span>
  997 
  998 <span class="k">if</span> <span class="p">(</span><span class="k">false</span> <span class="o">===</span> <span class="o">@</span><span class="k">include_once</span> <span class="s1">&#39;OpenID/RelyingParty.php&#39;</span><span class="p">)</span> <span class="p">{</span>
  999     <span class="k">exit</span><span class="p">;</span>
 1000 <span class="p">}</span>
 1001 
 1002 <span class="cm">/* Change this to true if using phpMyAdmin over https */</span>
 1003 <span class="nv">$secure_cookie</span> <span class="o">=</span> <span class="k">false</span><span class="p">;</span>
 1004 
 1005 <span class="sd">/**</span>
 1006 <span class="sd"> * Map of authenticated users to MySQL user/password pairs.</span>
 1007 <span class="sd"> */</span>
 1008 <span class="nv">$AUTH_MAP</span> <span class="o">=</span> <span class="p">[</span>
 1009     <span class="s1">&#39;https://launchpad.net/~username&#39;</span> <span class="o">=&gt;</span> <span class="p">[</span>
 1010         <span class="s1">&#39;user&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;root&#39;</span><span class="p">,</span>
 1011         <span class="s1">&#39;password&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;&#39;</span><span class="p">,</span>
 1012     <span class="p">],</span>
 1013 <span class="p">];</span>
 1014 
 1015 <span class="sd">/**</span>
 1016 <span class="sd"> * Simple function to show HTML page with given content.</span>
 1017 <span class="sd"> *</span>
 1018 <span class="sd"> * @param string $contents Content to include in page</span>
 1019 <span class="sd"> *</span>
 1020 <span class="sd"> * @return void</span>
 1021 <span class="sd"> */</span>
 1022 <span class="k">function</span> <span class="nf">Show_page</span><span class="p">(</span><span class="nv">$contents</span><span class="p">)</span>
 1023 <span class="p">{</span>
 1024     <span class="nb">header</span><span class="p">(</span><span class="s1">&#39;Content-Type: text/html; charset=utf-8&#39;</span><span class="p">);</span>
 1025     <span class="k">echo</span> <span class="s1">&#39;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&#39;</span> <span class="p">,</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">;</span>
 1026     <span class="cp">?&gt;</span><span class="x"></span>
 1027 <span class="x">    &lt;!DOCTYPE HTML&gt;</span>
 1028 <span class="x">    &lt;html lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;</span>
 1029 <span class="x">    &lt;head&gt;</span>
 1030 <span class="x">    &lt;link rel=&quot;icon&quot; href=&quot;../favicon.ico&quot; type=&quot;image/x-icon&quot;&gt;</span>
 1031 <span class="x">    &lt;link rel=&quot;shortcut icon&quot; href=&quot;../favicon.ico&quot; type=&quot;image/x-icon&quot;&gt;</span>
 1032 <span class="x">    &lt;meta charset=&quot;utf-8&quot;&gt;</span>
 1033 <span class="x">    &lt;title&gt;phpMyAdmin OpenID signon example&lt;/title&gt;</span>
 1034 <span class="x">    &lt;/head&gt;</span>
 1035 <span class="x">    &lt;body&gt;</span>
 1036 <span class="x">    </span><span class="cp">&lt;?php</span>
 1037     <span class="k">if</span> <span class="p">(</span><span class="nb">isset</span><span class="p">(</span><span class="nv">$_SESSION</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="nb">isset</span><span class="p">(</span><span class="nv">$_SESSION</span><span class="p">[</span><span class="s1">&#39;PMA_single_signon_error_message&#39;</span><span class="p">]))</span> <span class="p">{</span>
 1038         <span class="k">echo</span> <span class="s1">&#39;&lt;p class=&quot;error&quot;&gt;&#39;</span> <span class="p">,</span> <span class="nv">$_SESSION</span><span class="p">[</span><span class="s1">&#39;PMA_single_signon_message&#39;</span><span class="p">]</span> <span class="p">,</span> <span class="s1">&#39;&lt;/p&gt;&#39;</span><span class="p">;</span>
 1039         <span class="nb">unset</span><span class="p">(</span><span class="nv">$_SESSION</span><span class="p">[</span><span class="s1">&#39;PMA_single_signon_message&#39;</span><span class="p">]);</span>
 1040     <span class="p">}</span>
 1041     <span class="k">echo</span> <span class="nv">$contents</span><span class="p">;</span>
 1042     <span class="cp">?&gt;</span><span class="x"></span>
 1043 <span class="x">    &lt;/body&gt;</span>
 1044 <span class="x">    &lt;/html&gt;</span>
 1045 <span class="x">    </span><span class="cp">&lt;?php</span>
 1046 <span class="p">}</span>
 1047 
 1048 <span class="sd">/**</span>
 1049 <span class="sd"> * Display error and exit</span>
 1050 <span class="sd"> *</span>
 1051 <span class="sd"> * @param Exception $e Exception object</span>
 1052 <span class="sd"> *</span>
 1053 <span class="sd"> * @return void</span>
 1054 <span class="sd"> */</span>
 1055 <span class="k">function</span> <span class="nf">Die_error</span><span class="p">(</span><span class="nv">$e</span><span class="p">)</span>
 1056 <span class="p">{</span>
 1057     <span class="nv">$contents</span> <span class="o">=</span> <span class="s2">&quot;&lt;div class=&#39;relyingparty_results&#39;&gt;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">;</span>
 1058     <span class="nv">$contents</span> <span class="o">.=</span> <span class="s2">&quot;&lt;pre&gt;&quot;</span> <span class="o">.</span> <span class="nb">htmlspecialchars</span><span class="p">(</span><span class="nv">$e</span><span class="o">-&gt;</span><span class="na">getMessage</span><span class="p">())</span> <span class="o">.</span> <span class="s2">&quot;&lt;/pre&gt;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">;</span>
 1059     <span class="nv">$contents</span> <span class="o">.=</span> <span class="s2">&quot;&lt;/div class=&#39;relyingparty_results&#39;&gt;&quot;</span><span class="p">;</span>
 1060     <span class="nx">Show_page</span><span class="p">(</span><span class="nv">$contents</span><span class="p">);</span>
 1061     <span class="k">exit</span><span class="p">;</span>
 1062 <span class="p">}</span>
 1063 
 1064 
 1065 <span class="cm">/* Need to have cookie visible from parent directory */</span>
 1066 <span class="nb">session_set_cookie_params</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="s1">&#39;/&#39;</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="nv">$secure_cookie</span><span class="p">,</span> <span class="k">true</span><span class="p">);</span>
 1067 <span class="cm">/* Create signon session */</span>
 1068 <span class="nv">$session_name</span> <span class="o">=</span> <span class="s1">&#39;SignonSession&#39;</span><span class="p">;</span>
 1069 <span class="nb">session_name</span><span class="p">(</span><span class="nv">$session_name</span><span class="p">);</span>
 1070 <span class="o">@</span><span class="nb">session_start</span><span class="p">();</span>
 1071 
 1072 <span class="c1">// Determine realm and return_to</span>
 1073 <span class="nv">$base</span> <span class="o">=</span> <span class="s1">&#39;http&#39;</span><span class="p">;</span>
 1074 <span class="k">if</span> <span class="p">(</span><span class="nb">isset</span><span class="p">(</span><span class="nv">$_SERVER</span><span class="p">[</span><span class="s1">&#39;HTTPS&#39;</span><span class="p">])</span> <span class="o">&amp;&amp;</span> <span class="nv">$_SERVER</span><span class="p">[</span><span class="s1">&#39;HTTPS&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;on&#39;</span><span class="p">)</span> <span class="p">{</span>
 1075     <span class="nv">$base</span> <span class="o">.=</span> <span class="s1">&#39;s&#39;</span><span class="p">;</span>
 1076 <span class="p">}</span>
 1077 <span class="nv">$base</span> <span class="o">.=</span> <span class="s1">&#39;://&#39;</span> <span class="o">.</span> <span class="nv">$_SERVER</span><span class="p">[</span><span class="s1">&#39;SERVER_NAME&#39;</span><span class="p">]</span> <span class="o">.</span> <span class="s1">&#39;:&#39;</span> <span class="o">.</span> <span class="nv">$_SERVER</span><span class="p">[</span><span class="s1">&#39;SERVER_PORT&#39;</span><span class="p">];</span>
 1078 
 1079 <span class="nv">$realm</span> <span class="o">=</span> <span class="nv">$base</span> <span class="o">.</span> <span class="s1">&#39;/&#39;</span><span class="p">;</span>
 1080 <span class="nv">$returnTo</span> <span class="o">=</span> <span class="nv">$base</span> <span class="o">.</span> <span class="nb">dirname</span><span class="p">(</span><span class="nv">$_SERVER</span><span class="p">[</span><span class="s1">&#39;PHP_SELF&#39;</span><span class="p">]);</span>
 1081 <span class="k">if</span> <span class="p">(</span><span class="nv">$returnTo</span><span class="p">[</span><span class="nb">strlen</span><span class="p">(</span><span class="nv">$returnTo</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> <span class="o">!=</span> <span class="s1">&#39;/&#39;</span><span class="p">)</span> <span class="p">{</span>
 1082     <span class="nv">$returnTo</span> <span class="o">.=</span> <span class="s1">&#39;/&#39;</span><span class="p">;</span>
 1083 <span class="p">}</span>
 1084 <span class="nv">$returnTo</span> <span class="o">.=</span> <span class="s1">&#39;openid.php&#39;</span><span class="p">;</span>
 1085 
 1086 <span class="cm">/* Display form */</span>
 1087 <span class="k">if</span> <span class="p">(</span><span class="o">!</span> <span class="nb">count</span><span class="p">(</span><span class="nv">$_GET</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="o">!</span> <span class="nb">count</span><span class="p">(</span><span class="nv">$_POST</span><span class="p">)</span> <span class="o">||</span> <span class="nb">isset</span><span class="p">(</span><span class="nv">$_GET</span><span class="p">[</span><span class="s1">&#39;phpMyAdmin&#39;</span><span class="p">]))</span> <span class="p">{</span>
 1088     <span class="cm">/* Show simple form */</span>
 1089     <span class="nv">$content</span> <span class="o">=</span> <span class="s1">&#39;&lt;form action=&quot;openid.php&quot; method=&quot;post&quot;&gt;</span>
 1090 <span class="s1">OpenID: &lt;input type=&quot;text&quot; name=&quot;identifier&quot;&gt;&lt;br&gt;</span>
 1091 <span class="s1">&lt;input type=&quot;submit&quot; name=&quot;start&quot;&gt;</span>
 1092 <span class="s1">&lt;/form&gt;</span>
 1093 <span class="s1">&lt;/body&gt;</span>
 1094 <span class="s1">&lt;/html&gt;&#39;</span><span class="p">;</span>
 1095     <span class="nx">Show_page</span><span class="p">(</span><span class="nv">$content</span><span class="p">);</span>
 1096     <span class="k">exit</span><span class="p">;</span>
 1097 <span class="p">}</span>
 1098 
 1099 <span class="cm">/* Grab identifier */</span>
 1100 <span class="k">if</span> <span class="p">(</span><span class="nb">isset</span><span class="p">(</span><span class="nv">$_POST</span><span class="p">[</span><span class="s1">&#39;identifier&#39;</span><span class="p">])</span> <span class="o">&amp;&amp;</span> <span class="nb">is_string</span><span class="p">(</span><span class="nv">$_POST</span><span class="p">[</span><span class="s1">&#39;identifier&#39;</span><span class="p">]))</span> <span class="p">{</span>
 1101     <span class="nv">$identifier</span> <span class="o">=</span> <span class="nv">$_POST</span><span class="p">[</span><span class="s1">&#39;identifier&#39;</span><span class="p">];</span>
 1102 <span class="p">}</span> <span class="k">elseif</span> <span class="p">(</span><span class="nb">isset</span><span class="p">(</span><span class="nv">$_SESSION</span><span class="p">[</span><span class="s1">&#39;identifier&#39;</span><span class="p">])</span> <span class="o">&amp;&amp;</span> <span class="nb">is_string</span><span class="p">(</span><span class="nv">$_SESSION</span><span class="p">[</span><span class="s1">&#39;identifier&#39;</span><span class="p">]))</span> <span class="p">{</span>
 1103     <span class="nv">$identifier</span> <span class="o">=</span> <span class="nv">$_SESSION</span><span class="p">[</span><span class="s1">&#39;identifier&#39;</span><span class="p">];</span>
 1104 <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
 1105     <span class="nv">$identifier</span> <span class="o">=</span> <span class="k">null</span><span class="p">;</span>
 1106 <span class="p">}</span>
 1107 
 1108 <span class="cm">/* Create OpenID object */</span>
 1109 <span class="k">try</span> <span class="p">{</span>
 1110     <span class="nv">$o</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">OpenID_RelyingParty</span><span class="p">(</span><span class="nv">$returnTo</span><span class="p">,</span> <span class="nv">$realm</span><span class="p">,</span> <span class="nv">$identifier</span><span class="p">);</span>
 1111 <span class="p">}</span> <span class="k">catch</span> <span class="p">(</span><span class="nx">Exception</span> <span class="nv">$e</span><span class="p">)</span> <span class="p">{</span>
 1112     <span class="nx">Die_error</span><span class="p">(</span><span class="nv">$e</span><span class="p">);</span>
 1113 <span class="p">}</span>
 1114 
 1115 <span class="cm">/* Redirect to OpenID provider */</span>
 1116 <span class="k">if</span> <span class="p">(</span><span class="nb">isset</span><span class="p">(</span><span class="nv">$_POST</span><span class="p">[</span><span class="s1">&#39;start&#39;</span><span class="p">]))</span> <span class="p">{</span>
 1117     <span class="k">try</span> <span class="p">{</span>
 1118         <span class="nv">$authRequest</span> <span class="o">=</span> <span class="nv">$o</span><span class="o">-&gt;</span><span class="na">prepare</span><span class="p">();</span>
 1119     <span class="p">}</span> <span class="k">catch</span> <span class="p">(</span><span class="nx">Exception</span> <span class="nv">$e</span><span class="p">)</span> <span class="p">{</span>
 1120         <span class="nx">Die_error</span><span class="p">(</span><span class="nv">$e</span><span class="p">);</span>
 1121     <span class="p">}</span>
 1122 
 1123     <span class="nv">$url</span> <span class="o">=</span> <span class="nv">$authRequest</span><span class="o">-&gt;</span><span class="na">getAuthorizeURL</span><span class="p">();</span>
 1124 
 1125     <span class="nb">header</span><span class="p">(</span><span class="s2">&quot;Location: </span><span class="si">$url</span><span class="s2">&quot;</span><span class="p">);</span>
 1126     <span class="k">exit</span><span class="p">;</span>
 1127 <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
 1128     <span class="cm">/* Grab query string */</span>
 1129     <span class="k">if</span> <span class="p">(</span><span class="o">!</span> <span class="nb">count</span><span class="p">(</span><span class="nv">$_POST</span><span class="p">))</span> <span class="p">{</span>
 1130         <span class="k">list</span><span class="p">(,</span> <span class="nv">$queryString</span><span class="p">)</span> <span class="o">=</span> <span class="nb">explode</span><span class="p">(</span><span class="s1">&#39;?&#39;</span><span class="p">,</span> <span class="nv">$_SERVER</span><span class="p">[</span><span class="s1">&#39;REQUEST_URI&#39;</span><span class="p">]);</span>
 1131     <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
 1132         <span class="c1">// I hate php sometimes</span>
 1133         <span class="nv">$queryString</span> <span class="o">=</span> <span class="nb">file_get_contents</span><span class="p">(</span><span class="s1">&#39;php://input&#39;</span><span class="p">);</span>
 1134     <span class="p">}</span>
 1135 
 1136     <span class="cm">/* Check reply */</span>
 1137     <span class="k">try</span> <span class="p">{</span>
 1138         <span class="nv">$message</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">OpenID_Message</span><span class="p">(</span><span class="nv">$queryString</span><span class="p">,</span> <span class="nx">OpenID_Message</span><span class="o">::</span><span class="na">FORMAT_HTTP</span><span class="p">);</span>
 1139     <span class="p">}</span> <span class="k">catch</span> <span class="p">(</span><span class="nx">Exception</span> <span class="nv">$e</span><span class="p">)</span> <span class="p">{</span>
 1140         <span class="nx">Die_error</span><span class="p">(</span><span class="nv">$e</span><span class="p">);</span>
 1141     <span class="p">}</span>
 1142 
 1143     <span class="nv">$id</span> <span class="o">=</span> <span class="nv">$message</span><span class="o">-&gt;</span><span class="na">get</span><span class="p">(</span><span class="s1">&#39;openid.claimed_id&#39;</span><span class="p">);</span>
 1144 
 1145     <span class="k">if</span> <span class="p">(</span><span class="o">!</span> <span class="k">empty</span><span class="p">(</span><span class="nv">$id</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="nb">isset</span><span class="p">(</span><span class="nv">$AUTH_MAP</span><span class="p">[</span><span class="nv">$id</span><span class="p">]))</span> <span class="p">{</span>
 1146         <span class="nv">$_SESSION</span><span class="p">[</span><span class="s1">&#39;PMA_single_signon_user&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nv">$AUTH_MAP</span><span class="p">[</span><span class="nv">$id</span><span class="p">][</span><span class="s1">&#39;user&#39;</span><span class="p">];</span>
 1147         <span class="nv">$_SESSION</span><span class="p">[</span><span class="s1">&#39;PMA_single_signon_password&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nv">$AUTH_MAP</span><span class="p">[</span><span class="nv">$id</span><span class="p">][</span><span class="s1">&#39;password&#39;</span><span class="p">];</span>
 1148         <span class="nb">session_write_close</span><span class="p">();</span>
 1149         <span class="cm">/* Redirect to phpMyAdmin (should use absolute URL here!) */</span>
 1150         <span class="nb">header</span><span class="p">(</span><span class="s1">&#39;Location: ../index.php&#39;</span><span class="p">);</span>
 1151     <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
 1152         <span class="nx">Show_page</span><span class="p">(</span><span class="s1">&#39;&lt;p&gt;User not allowed!&lt;/p&gt;&#39;</span><span class="p">);</span>
 1153         <span class="k">exit</span><span class="p">;</span>
 1154     <span class="p">}</span>
 1155 <span class="p">}</span>
 1156 </pre></div>
 1157 </div>
 1158 <p>If you intend to pass the credentials using some other means than, you have to
 1159 implement wrapper in PHP to get that data and set it to
 1160 <span class="target" id="index-26"></span><a class="reference internal" href="config.html#cfg_Servers_SignonScript"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['SignonScript']</span></code></a>. There is a very minimal example
 1161 in <code class="file docutils literal"><span class="pre">examples/signon-script.php</span></code>:</p>
 1162 <div class="highlight-php"><div class="highlight"><pre><span></span><span class="o">&lt;?</span><span class="nx">php</span>
 1163 <span class="cm">/* vim: set expandtab sw=4 ts=4 sts=4: */</span>
 1164 <span class="sd">/**</span>
 1165 <span class="sd"> * Single signon for phpMyAdmin</span>
 1166 <span class="sd"> *</span>
 1167 <span class="sd"> * This is just example how to use script based single signon with</span>
 1168 <span class="sd"> * phpMyAdmin, it is not intended to be perfect code and look, only</span>
 1169 <span class="sd"> * shows how you can integrate this functionality in your application.</span>
 1170 <span class="sd"> *</span>
 1171 <span class="sd"> * @package    PhpMyAdmin</span>
 1172 <span class="sd"> * @subpackage Example</span>
 1173 <span class="sd"> */</span>
 1174 <span class="k">declare</span><span class="p">(</span><span class="nx">strict_types</span><span class="o">=</span><span class="mi">1</span><span class="p">);</span>
 1175 
 1176 <span class="sd">/**</span>
 1177 <span class="sd"> * This function returns username and password.</span>
 1178 <span class="sd"> *</span>
 1179 <span class="sd"> * It can optionally use configured username as parameter.</span>
 1180 <span class="sd"> *</span>
 1181 <span class="sd"> * @param string $user User name</span>
 1182 <span class="sd"> *</span>
 1183 <span class="sd"> * @return array</span>
 1184 <span class="sd"> */</span>
 1185 <span class="k">function</span> <span class="nf">get_login_credentials</span><span class="p">(</span><span class="nv">$user</span><span class="p">)</span>
 1186 <span class="p">{</span>
 1187     <span class="cm">/* Optionally we can use passed username */</span>
 1188     <span class="k">if</span> <span class="p">(</span><span class="o">!</span> <span class="k">empty</span><span class="p">(</span><span class="nv">$user</span><span class="p">))</span> <span class="p">{</span>
 1189         <span class="k">return</span> <span class="p">[</span>
 1190             <span class="nv">$user</span><span class="p">,</span>
 1191             <span class="s1">&#39;password&#39;</span><span class="p">,</span>
 1192         <span class="p">];</span>
 1193     <span class="p">}</span>
 1194 
 1195     <span class="cm">/* Here we would retrieve the credentials */</span>
 1196     <span class="k">return</span> <span class="p">[</span>
 1197         <span class="s1">&#39;root&#39;</span><span class="p">,</span>
 1198         <span class="s1">&#39;&#39;</span><span class="p">,</span>
 1199     <span class="p">];</span>
 1200 <span class="p">}</span>
 1201 </pre></div>
 1202 </div>
 1203 <div class="admonition seealso">
 1204 <p class="first admonition-title">See also</p>
 1205 <p class="last"><span class="target" id="index-27"></span><a class="reference internal" href="config.html#cfg_Servers_auth_type"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['auth_type']</span></code></a>,
 1206 <span class="target" id="index-28"></span><a class="reference internal" href="config.html#cfg_Servers_SignonSession"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['SignonSession']</span></code></a>,
 1207 <span class="target" id="index-29"></span><a class="reference internal" href="config.html#cfg_Servers_SignonCookieParams"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['SignonCookieParams']</span></code></a>,
 1208 <span class="target" id="index-30"></span><a class="reference internal" href="config.html#cfg_Servers_SignonScript"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['SignonScript']</span></code></a>,
 1209 <span class="target" id="index-31"></span><a class="reference internal" href="config.html#cfg_Servers_SignonURL"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['SignonURL']</span></code></a>,
 1210 <a class="reference internal" href="config.html#example-signon"><span class="std std-ref">Example for signon authentication</span></a></p>
 1211 </div>
 1212 </div>
 1213 <div class="section" id="config-authentication-mode">
 1214 <span id="auth-config"></span><span id="index-32"></span><h3>Config authentication mode<a class="headerlink" href="#config-authentication-mode" title="Permalink to this headline"></a></h3>
 1215 <ul class="simple">
 1216 <li>This mode is sometimes the less secure one because it requires you to fill the
 1217 <span class="target" id="index-33"></span><a class="reference internal" href="config.html#cfg_Servers_user"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['user']</span></code></a> and
 1218 <span class="target" id="index-34"></span><a class="reference internal" href="config.html#cfg_Servers_password"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['password']</span></code></a>
 1219 fields (and as a result, anyone who can read your <code class="file docutils literal"><span class="pre">config.inc.php</span></code>
 1220 can discover your username and password).</li>
 1221 <li>In the <a class="reference internal" href="faq.html#faqmultiuser"><span class="std std-ref">ISPs, multi-user installations</span></a> section, there is an entry explaining how
 1222 to protect your configuration file.</li>
 1223 <li>For additional security in this mode, you may wish to consider the
 1224 Host authentication <span class="target" id="index-35"></span><a class="reference internal" href="config.html#cfg_Servers_AllowDeny_order"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['AllowDeny']['order']</span></code></a>
 1225 and <span class="target" id="index-36"></span><a class="reference internal" href="config.html#cfg_Servers_AllowDeny_rules"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['AllowDeny']['rules']</span></code></a> configuration directives.</li>
 1226 <li>Unlike cookie and http, does not require a user to log in when first
 1227 loading the phpMyAdmin site. This is by design but could allow any
 1228 user to access your installation. Use of some restriction method is
 1229 suggested, perhaps a <a class="reference internal" href="glossary.html#term-htaccess"><span class="xref std std-term">.htaccess</span></a> file with the HTTP-AUTH directive or disallowing
 1230 incoming HTTP requests at one’s router or firewall will suffice (both
 1231 of which are beyond the scope of this manual but easily searchable
 1232 with Google).</li>
 1233 </ul>
 1234 </div>
 1235 </div>
 1236 <div class="section" id="securing-your-phpmyadmin-installation">
 1237 <span id="securing"></span><h2>Securing your phpMyAdmin installation<a class="headerlink" href="#securing-your-phpmyadmin-installation" title="Permalink to this headline"></a></h2>
 1238 <p>The phpMyAdmin team tries hard to make the application secure, however there
 1239 are always ways to make your installation more secure:</p>
 1240 <ul>
 1241 <li><p class="first">Follow our <a class="reference external" href="https://www.phpmyadmin.net/security/">Security announcements</a> and upgrade
 1242 phpMyAdmin whenever new vulnerability is published.</p>
 1243 </li>
 1244 <li><p class="first">Serve phpMyAdmin on HTTPS only. Preferably, you should use HSTS as well, so that
 1245 you&#8217;re protected from protocol downgrade attacks.</p>
 1246 </li>
 1247 <li><p class="first">Ensure your PHP setup follows recommendations for production sites, for example
 1248 <a class="reference external" href="https://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors">display_errors</a>
 1249 should be disabled.</p>
 1250 </li>
 1251 <li><p class="first">Remove the <code class="docutils literal"><span class="pre">test</span></code> directory from phpMyAdmin, unless you are developing and need a test suite.</p>
 1252 </li>
 1253 <li><p class="first">Remove the <code class="docutils literal"><span class="pre">setup</span></code> directory from phpMyAdmin, you will probably not
 1254 use it after the initial setup.</p>
 1255 </li>
 1256 <li><p class="first">Properly choose an authentication method - <a class="reference internal" href="#cookie"><span class="std std-ref">Cookie authentication mode</span></a>
 1257 is probably the best choice for shared hosting.</p>
 1258 </li>
 1259 <li><p class="first">Deny access to auxiliary files in <code class="file docutils literal"><span class="pre">./libraries/</span></code> or
 1260 <code class="file docutils literal"><span class="pre">./templates/</span></code> subfolders in your webserver configuration.
 1261 Such configuration prevents from possible path exposure and cross side
 1262 scripting vulnerabilities that might happen to be found in that code. For the
 1263 Apache webserver, this is often accomplished with a <a class="reference internal" href="glossary.html#term-htaccess"><span class="xref std std-term">.htaccess</span></a> file in
 1264 those directories.</p>
 1265 </li>
 1266 <li><p class="first">Deny access to temporary files, see <span class="target" id="index-37"></span><a class="reference internal" href="config.html#cfg_TempDir"><code class="xref config config-option docutils literal"><span class="pre">$cfg['TempDir']</span></code></a> (if that
 1267 is placed inside your web root, see also <a class="reference internal" href="config.html#web-dirs"><span class="std std-ref">Web server upload/save/import directories</span></a>.</p>
 1268 </li>
 1269 <li><p class="first">It is generally a good idea to protect a public phpMyAdmin installation
 1270 against access by robots as they usually can not do anything good there. You
 1271 can do this using <code class="docutils literal"><span class="pre">robots.txt</span></code> file in the root of your webserver or limit
 1272 access by web server configuration, see <a class="reference internal" href="faq.html#faq1-42"><span class="std std-ref">1.42 How can I prevent robots from accessing phpMyAdmin?</span></a>.</p>
 1273 </li>
 1274 <li><p class="first">In case you don&#8217;t want all MySQL users to be able to access
 1275 phpMyAdmin, you can use <span class="target" id="index-38"></span><a class="reference internal" href="config.html#cfg_Servers_AllowDeny_rules"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['AllowDeny']['rules']</span></code></a> to limit them
 1276 or <span class="target" id="index-39"></span><a class="reference internal" href="config.html#cfg_Servers_AllowRoot"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['AllowRoot']</span></code></a> to deny root user access.</p>
 1277 </li>
 1278 <li><p class="first">Enable <a class="reference internal" href="two_factor.html#fa"><span class="std std-ref">Two-factor authentication</span></a> for your account.</p>
 1279 </li>
 1280 <li><p class="first">Consider hiding phpMyAdmin behind an authentication proxy, so that
 1281 users need to authenticate prior to providing MySQL credentials
 1282 to phpMyAdmin. You can achieve this by configuring your web server to request
 1283 HTTP authentication. For example in Apache this can be done with:</p>
 1284 <div class="highlight-apache"><div class="highlight"><pre><span></span><span class="nb">AuthType</span> Basic
 1285 <span class="nb">AuthName</span> <span class="s2">&quot;Restricted Access&quot;</span>
 1286 <span class="nb">AuthUserFile</span> <span class="sx">/usr/share/phpmyadmin/passwd</span>
 1287 <span class="nb">Require</span> valid-user
 1288 </pre></div>
 1289 </div>
 1290 <p>Once you have changed the configuration, you need to create a list of users which
 1291 can authenticate. This can be done using the <strong class="program">htpasswd</strong> utility:</p>
 1292 <div class="highlight-sh"><div class="highlight"><pre><span></span>htpasswd -c /usr/share/phpmyadmin/passwd username
 1293 </pre></div>
 1294 </div>
 1295 </li>
 1296 <li><p class="first">If you are afraid of automated attacks, enabling Captcha by
 1297 <span class="target" id="index-40"></span><a class="reference internal" href="config.html#cfg_CaptchaLoginPublicKey"><code class="xref config config-option docutils literal"><span class="pre">$cfg['CaptchaLoginPublicKey']</span></code></a> and
 1298 <span class="target" id="index-41"></span><a class="reference internal" href="config.html#cfg_CaptchaLoginPrivateKey"><code class="xref config config-option docutils literal"><span class="pre">$cfg['CaptchaLoginPrivateKey']</span></code></a> might be an option.</p>
 1299 </li>
 1300 <li><p class="first">Failed login attemps are logged to syslog (if available, see
 1301 <span class="target" id="index-42"></span><a class="reference internal" href="config.html#cfg_AuthLog"><code class="xref config config-option docutils literal"><span class="pre">$cfg['AuthLog']</span></code></a>). This can allow using a tool such as
 1302 fail2ban to block brute-force attempts. Note that the log file used by syslog
 1303 is not the same as the Apache error or access log files.</p>
 1304 </li>
 1305 <li><p class="first">In case you&#8217;re running phpMyAdmin together with other PHP applications, it is
 1306 generally advised to use separate session storage for phpMyAdmin to avoid
 1307 possible session-based attacks against it. You can use
 1308 <span class="target" id="index-43"></span><a class="reference internal" href="config.html#cfg_SessionSavePath"><code class="xref config config-option docutils literal"><span class="pre">$cfg['SessionSavePath']</span></code></a> to achieve this.</p>
 1309 </li>
 1310 </ul>
 1311 </div>
 1312 <div class="section" id="using-ssl-for-connection-to-database-server">
 1313 <span id="ssl"></span><h2>Using SSL for connection to database server<a class="headerlink" href="#using-ssl-for-connection-to-database-server" title="Permalink to this headline"></a></h2>
 1314 <p>It is recommended to use SSL when connecting to remote database server. There
 1315 are several configuration options involved in the SSL setup:</p>
 1316 <dl class="docutils">
 1317 <dt><span class="target" id="index-44"></span><a class="reference internal" href="config.html#cfg_Servers_ssl"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['ssl']</span></code></a></dt>
 1318 <dd>Defines whether to use SSL at all. If you enable only this, the connection
 1319 will be encrypted, but there is not authentication of the connection - you
 1320 can not verify that you are talking to the right server.</dd>
 1321 <dt><span class="target" id="index-45"></span><a class="reference internal" href="config.html#cfg_Servers_ssl_key"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['ssl_key']</span></code></a> and <span class="target" id="index-46"></span><a class="reference internal" href="config.html#cfg_Servers_ssl_cert"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['ssl_cert']</span></code></a></dt>
 1322 <dd>This is used for authentication of client to the server.</dd>
 1323 <dt><span class="target" id="index-47"></span><a class="reference internal" href="config.html#cfg_Servers_ssl_ca"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['ssl_ca']</span></code></a> and <span class="target" id="index-48"></span><a class="reference internal" href="config.html#cfg_Servers_ssl_ca_path"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['ssl_ca_path']</span></code></a></dt>
 1324 <dd>The certificate authorities you trust for server certificates.
 1325 This is used to ensure that you are talking to a trusted server.</dd>
 1326 <dt><span class="target" id="index-49"></span><a class="reference internal" href="config.html#cfg_Servers_ssl_verify"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['ssl_verify']</span></code></a></dt>
 1327 <dd>This configuration disables server certificate verification. Use with
 1328 caution.</dd>
 1329 </dl>
 1330 <div class="admonition seealso">
 1331 <p class="first admonition-title">See also</p>
 1332 <p class="last"><a class="reference internal" href="config.html#example-google-ssl"><span class="std std-ref">Google Cloud SQL with SSL</span></a>,
 1333 <span class="target" id="index-50"></span><a class="reference internal" href="config.html#cfg_Servers_ssl"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['ssl']</span></code></a>,
 1334 <span class="target" id="index-51"></span><a class="reference internal" href="config.html#cfg_Servers_ssl_key"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['ssl_key']</span></code></a>,
 1335 <span class="target" id="index-52"></span><a class="reference internal" href="config.html#cfg_Servers_ssl_cert"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['ssl_cert']</span></code></a>,
 1336 <span class="target" id="index-53"></span><a class="reference internal" href="config.html#cfg_Servers_ssl_ca"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['ssl_ca']</span></code></a>,
 1337 <span class="target" id="index-54"></span><a class="reference internal" href="config.html#cfg_Servers_ssl_ca_path"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['ssl_ca_path']</span></code></a>,
 1338 <span class="target" id="index-55"></span><a class="reference internal" href="config.html#cfg_Servers_ssl_ciphers"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['ssl_ciphers']</span></code></a>,
 1339 <span class="target" id="index-56"></span><a class="reference internal" href="config.html#cfg_Servers_ssl_verify"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['ssl_verify']</span></code></a></p>
 1340 </div>
 1341 </div>
 1342 <div class="section" id="known-issues">
 1343 <h2>Known issues<a class="headerlink" href="#known-issues" title="Permalink to this headline"></a></h2>
 1344 <div class="section" id="users-with-column-specific-privileges-are-unable-to-browse">
 1345 <h3>Users with column-specific privileges are unable to &#8220;Browse&#8221;<a class="headerlink" href="#users-with-column-specific-privileges-are-unable-to-browse" title="Permalink to this headline"></a></h3>
 1346 <p>If a user has only column-specific privileges on some (but not all) columns in a table, &#8220;Browse&#8221;
 1347 will fail with an error message.</p>
 1348 <p>As a workaround, a bookmarked query with the same name as the table can be created, this will
 1349 run when using the &#8220;Browse&#8221; link instead. <a class="reference external" href="https://github.com/phpmyadmin/phpmyadmin/issues/11922">Issue 11922</a>.</p>
 1350 </div>
 1351 <div class="section" id="trouble-logging-back-in-after-logging-out-using-http-authentication">
 1352 <h3>Trouble logging back in after logging out using &#8216;http&#8217; authentication<a class="headerlink" href="#trouble-logging-back-in-after-logging-out-using-http-authentication" title="Permalink to this headline"></a></h3>
 1353 <p>When using the &#8216;http&#8217; <code class="docutils literal"><span class="pre">auth_type</span></code>, it can be impossible to log back in (when the logout comes
 1354 manually or after a period of inactivity). <a class="reference external" href="https://github.com/phpmyadmin/phpmyadmin/issues/11898">Issue 11898</a>.</p>
 1355 </div>
 1356 </div>
 1357 </div>
 1358 
 1359 
 1360           </div>
 1361         </div>
 1362       </div>
 1363       <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
 1364         <div class="sphinxsidebarwrapper">
 1365   <h3><a href="index.html">Table Of Contents</a></h3>
 1366   <ul>
 1367 <li><a class="reference internal" href="#">Installation</a><ul>
 1368 <li><a class="reference internal" href="#linux-distributions">Linux distributions</a><ul>
 1369 <li><a class="reference internal" href="#debian-and-ubuntu">Debian and Ubuntu</a></li>
 1370 <li><a class="reference internal" href="#opensuse">OpenSUSE</a></li>
 1371 <li><a class="reference internal" href="#gentoo">Gentoo</a></li>
 1372 <li><a class="reference internal" href="#mandriva">Mandriva</a></li>
 1373 <li><a class="reference internal" href="#fedora">Fedora</a></li>
 1374 <li><a class="reference internal" href="#red-hat-enterprise-linux">Red Hat Enterprise Linux</a></li>
 1375 </ul>
 1376 </li>
 1377 <li><a class="reference internal" href="#installing-on-windows">Installing on Windows</a></li>
 1378 <li><a class="reference internal" href="#installing-from-git">Installing from Git</a></li>
 1379 <li><a class="reference internal" href="#installing-using-composer">Installing using Composer</a></li>
 1380 <li><a class="reference internal" href="#installing-using-docker">Installing using Docker</a><ul>
 1381 <li><a class="reference internal" href="#docker-environment-variables">Docker environment variables</a></li>
 1382 <li><a class="reference internal" href="#customizing-configuration">Customizing configuration</a></li>
 1383 <li><a class="reference internal" href="#docker-volumes">Docker Volumes</a></li>
 1384 <li><a class="reference internal" href="#docker-examples">Docker Examples</a></li>
 1385 <li><a class="reference internal" href="#using-docker-compose">Using docker-compose</a></li>
 1386 <li><a class="reference internal" href="#customizing-configuration-file-using-docker-compose">Customizing configuration file using docker-compose</a></li>
 1387 <li><a class="reference internal" href="#running-behind-haproxy-in-a-subdirectory">Running behind haproxy in a subdirectory</a></li>
 1388 </ul>
 1389 </li>
 1390 <li><a class="reference internal" href="#quick-install">Quick Install</a><ul>
 1391 <li><a class="reference internal" href="#manually-creating-the-file">Manually creating the file</a></li>
 1392 <li><a class="reference internal" href="#using-the-setup-script">Using the Setup script</a><ul>
 1393 <li><a class="reference internal" href="#setup-script-on-debian-ubuntu-and-derivatives">Setup script on Debian, Ubuntu and derivatives</a></li>
 1394 <li><a class="reference internal" href="#setup-script-on-opensuse">Setup script on openSUSE</a></li>
 1395 </ul>
 1396 </li>
 1397 </ul>
 1398 </li>
 1399 <li><a class="reference internal" href="#verifying-phpmyadmin-releases">Verifying phpMyAdmin releases</a></li>
 1400 <li><a class="reference internal" href="#phpmyadmin-configuration-storage">phpMyAdmin configuration storage</a><ul>
 1401 <li><a class="reference internal" href="#zero-configuration">Zero configuration</a></li>
 1402 <li><a class="reference internal" href="#manual-configuration">Manual configuration</a></li>
 1403 </ul>
 1404 </li>
 1405 <li><a class="reference internal" href="#upgrading-from-an-older-version">Upgrading from an older version</a></li>
 1406 <li><a class="reference internal" href="#using-authentication-modes">Using authentication modes</a><ul>
 1407 <li><a class="reference internal" href="#http-authentication-mode">HTTP authentication mode</a></li>
 1408 <li><a class="reference internal" href="#cookie-authentication-mode">Cookie authentication mode</a></li>
 1409 <li><a class="reference internal" href="#signon-authentication-mode">Signon authentication mode</a></li>
 1410 <li><a class="reference internal" href="#config-authentication-mode">Config authentication mode</a></li>
 1411 </ul>
 1412 </li>
 1413 <li><a class="reference internal" href="#securing-your-phpmyadmin-installation">Securing your phpMyAdmin installation</a></li>
 1414 <li><a class="reference internal" href="#using-ssl-for-connection-to-database-server">Using SSL for connection to database server</a></li>
 1415 <li><a class="reference internal" href="#known-issues">Known issues</a><ul>
 1416 <li><a class="reference internal" href="#users-with-column-specific-privileges-are-unable-to-browse">Users with column-specific privileges are unable to &#8220;Browse&#8221;</a></li>
 1417 <li><a class="reference internal" href="#trouble-logging-back-in-after-logging-out-using-http-authentication">Trouble logging back in after logging out using &#8216;http&#8217; authentication</a></li>
 1418 </ul>
 1419 </li>
 1420 </ul>
 1421 </li>
 1422 </ul>
 1423 
 1424   <h4>Previous topic</h4>
 1425   <p class="topless"><a href="require.html"
 1426                         title="previous chapter">Requirements</a></p>
 1427   <h4>Next topic</h4>
 1428   <p class="topless"><a href="config.html"
 1429                         title="next chapter">Configuration</a></p>
 1430   <div role="note" aria-label="source link">
 1431     <h3>This Page</h3>
 1432     <ul class="this-page-menu">
 1433       <li><a href="_sources/setup.txt"
 1434             rel="nofollow">Show Source</a></li>
 1435     </ul>
 1436    </div>
 1437 <div id="searchbox" style="display: none" role="search">
 1438   <h3>Quick search</h3>
 1439     <form class="search" action="search.html" method="get">
 1440       <div><input type="text" name="q" /></div>
 1441       <div><input type="submit" value="Go" /></div>
 1442       <input type="hidden" name="check_keywords" value="yes" />
 1443       <input type="hidden" name="area" value="default" />
 1444     </form>
 1445 </div>
 1446 <script type="text/javascript">$('#searchbox').show(0);</script>
 1447         </div>
 1448       </div>
 1449       <div class="clearer"></div>
 1450     </div>
 1451     <div class="related" role="navigation" aria-label="related navigation">
 1452       <h3>Navigation</h3>
 1453       <ul>
 1454         <li class="right" style="margin-right: 10px">
 1455           <a href="genindex.html" title="General Index"
 1456              >index</a></li>
 1457         <li class="right" >
 1458           <a href="config.html" title="Configuration"
 1459              >next</a> |</li>
 1460         <li class="right" >
 1461           <a href="require.html" title="Requirements"
 1462              >previous</a> |</li>
 1463         <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.0.1 documentation</a> &#187;</li> 
 1464       </ul>
 1465     </div>
 1466     <div class="footer" role="contentinfo">
 1467         &#169; <a href="copyright.html">Copyright</a> 2012 - 2018, The phpMyAdmin devel team.
 1468       Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
 1469     </div>
 1470   </body>
 1471 </html>