From 91a407b184747bd09844f04ee1e7fd32a3b1a6c4 Mon Sep 17 00:00:00 2001 From: Arnaud Lier Date: Sat, 30 Mar 2024 13:40:46 +0000 Subject: [PATCH] Add Automatic phpMyAdmin Q&A --- Automatic-phpMyAdmin-Q%26A.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Automatic-phpMyAdmin-Q%26A.md diff --git a/Automatic-phpMyAdmin-Q%26A.md b/Automatic-phpMyAdmin-Q%26A.md new file mode 100644 index 0000000..e4e1c38 --- /dev/null +++ b/Automatic-phpMyAdmin-Q%26A.md @@ -0,0 +1,34 @@ +### Q: How can I connect with the default authentication interface of phpMyAdmin alongside the automatic connection from Pterodactyl? +With the use of `signon` for the authentication mode, it is impossible to put in addition the `cookie` mode which is the one which allows the usual connection. To solve this problem, you have to make a new connection host but not specify the authentication mode. + +Example : +```PHP +$i = 0; + +/** + * First server used for normal connection. + */ +$i++; // <- We increment of 1 the $i value, so this configuration as the ID of 1. +$cfg['Servers'][$i]['verbose'] = 'example-database'; +$cfg['Servers'][$i]['host'] = 'localhost2'; + +/** + * Second server used for connection with Pterodactyl + */ +$i++; // <- We increment again the $i value of 1, so this configuration as the ID of 2. +$cfg['Servers'][$i]['verbose'] = 'example-database (Connection with Pterodactyl)'; +$cfg['Servers'][$i]['host'] = 'localhost'; +$cfg['Servers'][$i]['auth_type'] = 'signon'; +$cfg['Servers'][$i]['SignonSession'] = 'TokenSession'; +$cfg['Servers'][$i]['SignonURL'] = 'token.php'; +$cfg['Servers'][$i]['LogoutURL'] = 'token-logout.php'; +``` +Now you can connect normally to your database normally. + +In this case, the phpMyAdmin Server ID field in Pterodactyl needs to be set to 2, since the ID for the connection with Pterodactyl is also 2. + +### Q: Why should I put a `.` at the beginning of my domain name when my Pterodactyl and phpMyAdmin installation are on a different subdomain? +Let's say your Pterodactyl installation is on the subdomain `panel.example.xyz`, and your phpMyAdmin installation is on the subdomain `database.example.xyz`. You'll need to use `.example.xyz` as the cookie domaine in Pterodactyl and phpMyAdmin. Like this, the addon will be able to work on your two installations on two different subdomains. + +### Q: How to generate an Encryption Key and IV? +Those encryptions keys are the most important things of the addon, they allow your installation to be secure. To generate them, you can use a password generator website like [LastPass](https://www.lastpass.com/fr/features/password-generator). For the Encryption Key, it can be as long as you want with any characters. But for the Encryption IV, it needs to be made of exactly 16 numbers. \ No newline at end of file