Hi there everyone, I updated my server to 3.3.0p1 and noticed that my PHPMyAdmin shortcuts no longer work. Opening the page from the admin panel results in the same non-working link. My panel: https://system.mydomain.com:8080/index.php PHPMA : https://system.mydomain.com:8081/phpmyadmin Could someone help me get PHPMA back? I use it quite a bit.
What error do you get when the page opens? Are you sure you've setup the hostname correctly? The link through the panel will try to open the phpmyadmin page with the hostname of the panel. If you reach your panel only with the IP in the URL then this link will not work.
Sorry if I've not explained it well, this server has been up and running for years and phpma has worked without issue until this last update. hostname is set correctly and everything else works(ISPC admin, webmail, etc.) When visiting the PHPMA URL with either the domain or IP, this is the result:
Ok, you should check if the config /etc/apache2/conf-enabled/phpmyadmin.conf is present. And check if phpmyadmin is still installed. The files should be located at /usr/share/phpmyadmin.
The conf file is there but the directory is missing under/usr/share. Should I just install phpmyadmin through apt or does a particular copy need to be installed for use with ISPC?
I don't know why it is gone in your installation. Usually the ISPConfig Installer grabs the latest release from the upstream repository, installs that manually and then creates a cron job to auto update it. Do you have the cronjob at /etc/cron.daily/auto_update_phpmyadmin? I think you can just manually install phpmyadmin and should be good to go. Make sure to not install it with your package manager. If you have access to the ISPConfig git you could just follow the steps the official installer does when you install ISPConfig. https://git.ispconfig.org/ispconfig...ISPConfigDebianOS.inc.php?ref_type=heads#L244
the auto_update_phpmyadmin file does exist. I'm not sure I'm savvy enough to figure out what the install script is doing. Would forcing an update of ISPC reinstall it correctly?
Ok that's good to know. I don't think that would do anything related to phpmyadmin. I can have a look into it tomorrow and write up the exact steps you need to take to reinstall phpmyadmin correctly.
I doubt that the ISPConfig update removed phpmyadmin, there is no code in ISPConfig to do that. So something else must have happened that removed phpmyadmin.
Other than running the update script, I've done nothing to the system aside from using the panel to manage users and accessing phpmyadmin. I of course can't say what happened to cause it but I definitely need it
Hi, i think this should do the trick in your case. That should be everything neccessary to make phpmyadmin work on your system again. I skipped the step where the apache conf sets created, as you mentioned it is already there and i also skipped the step for the cronjob for the same reason aswell. Good Luck! Create necessary directories for phpMyAdmin Change permissions on those directories Create an empty htpasswd file Change ownership to www-data Download the phpMyAdmin version 5.2.2 from the official website Extract the archive and copy its contents into /usr/share/phpmyadmin Remove the downloaded archive file and directory Copy the sample phpMyAdmin config file to it's correct location Generate a random 32-character blowfish secret and update the config Set the TempDir configuration Generate a new random 15-character password for the MySQL pma user. Update the pma@localhost user password with the newly generated password in database Correctly setup the servers config in the config file for phpMyAdmin Update phpMyAdmin configuration settings (controlhost, controlport, controluser, controlpass) with values reflecting localhost and the new password Code: #!/bin/bash set -e # Exit if not run as root if [[ "$EUID" -ne 0 ]]; then echo "This script must be run with sudo or as root." >&2 exit 1 fi # Create directory mkdir -p /usr/share/phpmyadmin chmod 0755 /usr/share/phpmyadmin mkdir -p /etc/phpmyadmin chmod 0755 /etc/phpmyadmin mkdir -p /var/lib/phpmyadmin/tmp chmod 0770 /var/lib/phpmyadmin/tmp # Create htpasswd touch /etc/phpmyadmin/htpasswd.setup # Change ownership chown -R www-data:www-data /var/lib/phpmyadmin # Download and install cd /tmp wget https://files.phpmyadmin.net/phpMyAdmin/5.2.2/phpMyAdmin-5.2.2-all-languages.tar.gz tar xfz phpMyAdmin-5.2.2-all-languages.tar.gz cp -a phpMyAdmin-5.2.2-all-languages/* /usr/share/phpmyadmin/ rm phpMyAdmin-5.2.2-all-languages.tar.gz rm -rf /tmp/phpMyAdmin-5.2.2-all-languages # Copy sample and set blowfish secret and tmp dir cp /usr/share/phpmyadmin/config.sample.inc.php /usr/share/phpmyadmin/config.inc.php BLOWFISH_SECRET=$(head -c 64 /dev/urandom | sha1sum | cut -c1-32) sed -i -E "s|^(//\s*)?\s*\$cfg\['blowfish_secret'\]\s*=.*$|\$cfg['blowfish_secret'] = '$BLOWFISH_SECRET';|" /usr/share/phpmyadmin/config.inc.php sed -i -E "s|^(//\s*)?\s*\$cfg\['TempDir'\]\s*=.*$|\$cfg['TempDir'] = '/var/lib/phpmyadmin/tmp';|" /usr/share/phpmyadmin/config.inc.php # Overwrite the PMA Password PMA_PASS=$(head -c 32 /dev/urandom | tr -dc 'A-Za-z0-9' | head -c15) # Escape single quotes and backslashes for SQL PMA_PASS_ESCAPED=$(echo "$PMA_PASS" | sed "s/[\'\\\\]/\\\\&/g") mysql -u root -p -e " ALTER USER 'pma'@'localhost' IDENTIFIED BY '$PMA_PASS_ESCAPED'; FLUSH PRIVILEGES; " CONFIG_FILE="/usr/share/phpmyadmin/config.inc.php" # Uncomment any lines that start the server config block sed -i -E "s|^(\s*)//\s*(\$cfg\['Servers'\]\[\$i\])|\1\2|" "$CONFIG_FILE" # Replace controlhost sed -i -E "s|^(//\s*)?\s*(\$cfg\['Servers'\]\[\$i\]\['controlhost'\])\s*=.*$|\2 = 'localhost';|" "$CONFIG_FILE" # Replace controlport sed -i -E "s|^(//\s*)?\s*(\$cfg\['Servers'\]\[\$i\]\['controlport'\])\s*=.*$|\2 = '';|" "$CONFIG_FILE" # Replace controluser sed -i -E "s|^(//\s*)?\s*(\$cfg\['Servers'\]\[\$i\]\['controluser'\])\s*=.*$|\2 = 'pma';|" "$CONFIG_FILE" # Replace controlpass sed -i -E "s|^(//\s*)?\s*(\$cfg\['Servers'\]\[\$i\]\['controlpass'\])\s*=.*$|\2 = '$PMA_PASS_ESCAPED';|" "$CONFIG_FILE"
Hi @pyte , thanks a lot for writing this down. Maybe we should also put this in the Tips & Tricks forum?
Sure why not. But we should explictly mention that the parts for creating the cronjob, initial phpmyadmin database setup and apache config are missing tho.
Thank you so much for your help! I am running the script and it's asking for a password after downloading the package. Which password should I be entering here? PHPMyAdmin user or MySQL root? Code: root@system:/usr# ./phpma.sh --2025-06-10 07:19:20-- https://files.phpmyadmin.net/phpMyAdmin/5.2.2/phpMyAdmin-5.2.2-all-languages.tar.gz Resolving files.phpmyadmin.net (files.phpmyadmin.net)... 89.187.180.101, 89.187.180.92, 2a02:6ea0:c600::25, ... Connecting to files.phpmyadmin.net (files.phpmyadmin.net)|89.187.180.101|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 13764534 (13M) [application/octet-stream] Saving to: ‘phpMyAdmin-5.2.2-all-languages.tar.gz’ phpMyAdmin-5.2.2-al 100%[===================>] 13.13M 87.4MB/s in 0.2s 2025-06-10 07:19:24 (87.4 MB/s) - ‘phpMyAdmin-5.2.2-all-languages.tar.gz’ saved [13764534/13764534] Enter password:
Oh sorry. Yea it's asking for the mysql root password. If you ran the script with sudo rights/as root you should be able to just hit enter.
Thank you again so much for your help, it's up and running again! Can I send you a tip somehow? You definitely didn't have to help the way you did.
Im honored but i don’t need a tip. If you'd like, you are very welcome to support the ISPConfig team instead