phpmyadmin for Debian
---------------------
USAGE
The application will be available at http://localhost/phpmyadmin/
after install if you use one of supported web servers (Apache and Lighttpd
at time of writing this). Please note that you need to have enabled PHP
support in your webserver (for Apache you can do this by a2enmod php8.2, for
Lighttpd by lighty-enable-mod fastcgi).
Should you get a 404 "not found" error when you installed phpMyAdmin using
apt-get and point your browser at .
Most likely you did not enable configuration for your webserver during
installation. You can reconfigure phpmyadmin package to get the selection
again and choose webserver you are using (eg. "Apache 2"):
sudo dpkg-reconfigure -plow phpmyadmin
You can also manually install the shipped configuration file to Apache conf.d
directory (but the above way is preferred):
sudo a2enconf phpmyadmin
PROBLEM WITH COOKIES
After upgrading phpMyAdmin with cookie based authentication you might
notice a problem with logging in. Removing the cookies from your browser
may solve this issue.
CONFIGURATION
The package installs a default configuration in /etc/phpmyadmin/, including
a default apache.conf, which is optionally symlinked from your Apache config.
Since 3.0.0, phpMyAdmin can be configured using dbconfig-common. It
creates a phpmyadmin database and control user on the chosen server and
configures phpMyAdmin to use cookie authentication on this server.
The database autoconfiguration might fail if you do not have local MySQL
server installed or you have configured too high priority of which questions
should debconf ask. To rerun the configuration just invoke:
dpkg-reconfigure -plow phpmyadmin
The configuration files are processed in following order:
1. /etc/phpmyadmin/config.inc.php
2. possible snippets placed in /etc/phpmyadmin/conf.d/
3. phpMyAdmin defaults are being applied
TEMPORARY FILES
phpMyAdmin uses /var/lib/phpmyadmin/tmp for its template cache, temporary
uploads and, when PHP's session.save_path points there, session files. Each
time the package is configured, every file in it is removed, including the
template cache below tmp/twig/: the cache is rebuilt on demand and abandoned
uploads are useless. The directories themselves are kept, as is anything a
symlink points to outside the directory, and neither the ownership nor the
permissions are changed (including a dpkg-statoverride).
SECURITY
The default configuration for Debian has enabled cookie based authentication.
You should *not* put your passwords into /etc/phpmyadmin/config.inc.php file.
This file has to be readable by www-data user, so it can be read by anyone
who can run his own CGI script!
The default configuration also does not allow you to log in with empty
passwords, to enable it, set directive AllowNoPassword to true.
Register Globals: Debian does not provide security support for installations
with the PHP register_globals setting turned On. It's also not required for
phpMyAdmin to operate. Make sure it's off. It's trivial to turn it on just for
specific legacy sites that may need it.
MULTIPLE COPIES FROM ONE CODEBASE
The recommended phpMyAdmin way to share an installation between different
users is to use cookie or HTTP authentication to support the users, and
perhaps define multiple servers in config.inc.php each with their own
hostname and other settings. This should be enough for most cases.
If you still want to have multiple copies with different configuration,
but using the central codebase from the Debian package, the following may
be a poor man's solution:
mkdir phpmyadmin-site1 && cd phpmyadmin-site1
ln -s /usr/share/phpmyadmin/* .
rm config.inc.php
cp /usr/share/phpmyadmin/config.inc.php .
sed -i 's#/etc/phpmyadmin/config.inc.php/#/etc/phpmyadmin/config-site1.inc.php#'
cd /etc/phpmyadmin/
cp config.inc.php config-site1.inc.php
vi config-site1.inc.php
Make the dir you chose web-accessible and you're done for site1.
Copy the created dir to site2 and make the necessary changes, etc.
TRACKING UPSTREAM: RELEASES AND SNAPSHOTS
There are two watch files:
debian/watch tracks stable upstream releases (the default).
debian/watch.snapshot imports development snapshots of the current
maintenance branch (QA_5_2), on demand.
To import the latest published snapshot:
uscan --watchfile debian/watch.snapshot --force-download
gbp import-orig ../phpmyadmin_5.2.4~gitYYYYMMDD.+dfsg.orig.tar.xz
watch.snapshot downloads the official snapshot tarball from
https://files.phpmyadmin.net/snapshots/. It does not clone git. The version
is read from the companion JSON (phpMyAdmin-5.2+snapshot.json), which upstream
now publishes with a full "version" field:
{ "version": "5.2.4-dev+20260809.e0909b211b", "date": "..", "commit": ".." }
(produced by upstream scripts/create-release.sh --daily, derived from
libraries/classes/Version.php -- so it bumps to 5.2.5-dev+.. by itself once
the branch moves on; nothing is hardcoded in the watch except the branch
series.)
Debian drops the "-dev" marker and turns upstream's '+' into the '~git' of
the Nightly scheme (https://wiki.debian.org/Versioning):
5.2.4-dev+20260809.e0909b211b -> 5.2.4~git20260809.e0909b211b(+dfsg)
The tilde '~' sorts the snapshot BELOW the eventual 5.2.4 release, while the
"5.2.4" it carries sorts it ABOVE the shipped 5.2.3:
dpkg --compare-versions 5.2.3+dfsg lt 5.2.4~git20260809.c90e048+dfsg # true
dpkg --compare-versions 5.2.4~git20260809.c90e048+dfsg lt 5.2.4+dfsg # true
Do NOT use the old schemes seen in earlier changelog entries:
5.2.2-dev+ -- '-dev' sorts ABOVE the final 5.2.2 release,
making the real release look older.
5.2.2-really5.2.2+DATE+dfsg -- a '-really' downgrade hack that was only
needed to recover from the mistake above.
The tilde scheme avoids both. Only when the packaging moves off the 5.2
branch do you need to bump the "5.2" series literals in debian/watch.snapshot.
PACKAGES FOR DERIVATIVES
Libraries are packaged from Debian unstable, because that is where they are
packaged and nothing here is invented. What does not follow from it is that
unstable and testing are the only systems that will ever install the result.
They are not. https://repology.org/project/phpmyadmin/packages lists what each
distribution ships, and several of them publish this package rather than
building a copy of their own -- Kali and Devuan, deepin, Pardus, Parrot, PureOS
and Raspbian, and Ubuntu. Some carry the version built here unchanged, others
carry it with the +debNuM suffix that a Debian point release adds, which is how
a copy of the Debian package is named. A version floor set here is therefore
set for those systems too, and they have not synced every dependency, so a
floor taken from unstable can make the package impossible to install somewhere
it would work. Users also add repositories such as deb.sury.org to get a PHP
version their distribution does not ship, which is the same problem from the
other side.
The rule that follows: pin versions only where the code genuinely requires
them, and prefer relaxing a constraint, or carrying a small patch, to copying
unstable's floor into the dependency. Lintian's objections to a widened or an
obsolete alternative are accepted rather than silenced by tightening.
The PHP requirement is the worked example, in this 5.2 series. Upstream
phpMyAdmin 5.2 supports PHP 7.2 and later, yet this package requires 8.2, which
is what Debian ships, so a user with PHP 8.1 from a third-party repository
cannot install it although phpMyAdmin itself would run. A dependency alone
cannot settle this either: the PHP that serves the application is mod_php,
php-fpm or php-cli depending on the setup, and the package cannot force which
of them runs. That is why the version check inside PHP had to be edited by hand
(debian/patches/Require-PHP-8.2.patch) to state the same floor as the
dependency. That patch is a concession to Debian's package set, not a statement
that phpMyAdmin needs 8.2.
Suggests: follows the same reasoning. mariadb-server is named first, because
it is what the package is built and tested against, but default-mysql-server
and virtual-mysql-server are kept so that a user on a distribution still
shipping MySQL has a working suggestion.
-- Thijs Kinkhorst Mon, 21 Apr 2007 12:10:15 +0200
-- Michal Čihař Wed, 14 Oct 2009 10:32:31 +0200
-- William Desportes Fri, 20 Nov 2026 00:12:00 +0100