Autoinstall script fails at phpmyadmin install

Discussion in 'Installation/Configuration' started by sholzy, Oct 26, 2025.

  1. sholzy

    sholzy New Member

    On a fresh Debian 12 server install, I ran the autoinstaller script (found here https://www.howtoforge.com/ispconfig-autoinstall-debian-ubuntu/).
    It looks like phpmyadmin has changed the location of the downloads causing the script to fail. Is there a more up to date script?


    [INFO] Installing phpMyAdmin
    PHP Warning: file_get_contents(https://www.phpmyadmin.net/home_page/version.txt): Failed to open stream: Network is unreachable in /tmp/ispconfig-ai/lib/os/class.ISPConfigDebianOS.inc.php on line 263
    PHP Warning: Undefined array key 0 in /tmp/ispconfig-ai/lib/os/class.ISPConfigDebianOS.inc.php on line 265
    [ERROR] Exception occurred: ISPConfigOSException -> Command chown -R www-data:www-data '/var/lib/phpmyadmin' ; cd /tmp ; rm -f phpMyAdmin--all-languages.tar.gz ; wget https://files.phpmyadmin.net/phpMyAdmin//phpMyAdmin--all-languages.tar.gz 2>/dev/null && tar xfz phpMyAdmin--all-languages.tar.gz && cp -a phpMyAdmin--all-languages/* /usr/share/phpmyadmin/ && rm -f phpMyAdmin--all-languages.tar.gz && rm -rf phpMyAdmin--all-languages failed. (/ispconfig.ai.php:15)
    root@larlo-interactives:/tmp# wget https://files.phpmyadmin.net/phpMyAdmin//phpMyAdmin--all-languages.tar.gz
    --2025-10-26 18:23:56-- https://files.phpmyadmin.net/phpMyAdmin//phpMyAdmin--all-languages.tar.gz
    Resolving files.phpmyadmin.net (files.phpmyadmin.net)... 109.61.92.54, 109.61.92.47, 109.61.92.50, ...
    Connecting to files.phpmyadmin.net (files.phpmyadmin.net)|109.61.92.54|:443... connected.
    HTTP request sent, awaiting response... 302 Moved Temporarily
    Location: https://www.phpmyadmin.net/.storage-files/phpMyAdmin/phpMyAdmin--all-languages.tar.gz [following]
    --2025-10-26 18:23:57-- https://www.phpmyadmin.net/.storage-files/phpMyAdmin/phpMyAdmin--all-languages.tar.gz
    Resolving www.phpmyadmin.net (www.phpmyadmin.net)... 89.187.180.102, 89.187.180.93, 2a02:6ea0:c600::26, ...
    Connecting to www.phpmyadmin.net (www.phpmyadmin.net)|89.187.180.102|:443... connected.
    HTTP request sent, awaiting response... 404 Not Found
    2025-10-26 18:23:58 ERROR 404: Not Found.
     
    Last edited: Oct 27, 2025
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I didn't realize now it uses script to obtain PMA from its site, because I thought we were using apt to get it installed, and those who want it always updated will use @Th0m script for that.

    May be it is now already integrated into the ISPConfig installer or may be the installer is using its own script, in both events, the PMA source / download URL must be updated, if it is now really changed.

    However, it may also be only temporary moved, like you quoted above, so in that case, you may just have to wait and try again later.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Your system was either unable to connect to the internet (see error Failed to open stream: Network is unreachable) or the phpmyadmin website was temporarily unreachable. I can reach the phpmyadmin website fine at the moment.
     
  4. sholzy

    sholzy New Member

    There is no connection problem. If there was a connection problem there would not be a 302 Moved Temporarily error. This error means the location where the script is looking for the files has moved.

    Resolving files.phpmyadmin.net (files.phpmyadmin.net)... 109.61.92.54, 109.61.92.47, 109.61.92.50, ...
    Connecting to files.phpmyadmin.net (files.phpmyadmin.net)|109.61.92.54|:443... connected.
    HTTP request sent, awaiting response... 302 Moved Temporarily


    See where the script is trying to connect to phpmyadmin? See where it connects and is trying to resolve files.phpmyadmin.net? See where the response from phpmyadmin shows the location has moved?

    Try going to files.phpmyadmin.net, and you will see the redirect in action to the new file location (phpmyadmin.net/files/). Phpmyadmin changed the location of the where the files are located causing the script to fail.

    I tried installing multiple times, all with the same error. As soon as I added --no-pma to the command the install does not error. I've tried this multiple times on fresh server installs.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Of course, I've seen that, but you should have read all the messages you posted:

    You also likely have a network issue, maybe IPv4 works but not IPv6 or something like that. This file is available and has not been moved, but your system is still unable to connect to it.

    Regarding the moved phpmyadmin location, 302 redirects are fine and wget follows them, but phpmyadmin seems to have messed up the redirects on their server. So we will have ti adjust this unless they fix their redirects.
     
  6. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Great catch @till.

    In any event, I revisited the code and found the default is this:
    Code:
           // Get latest download URL for phpMyAdmin
           $versionfile = file_get_contents("https://www.phpmyadmin.net/home_page/version.txt");
           preg_match("/[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,3}/", $versionfile, $matches);
           $latestversion = $matches[0];
    
           // Download and unpack phpMyAdmin
           $cmd = 'chown -R www-data:www-data ' . escapeshellarg('/var/lib/phpmyadmin') . ' ; cd /tmp ; rm -f phpMyAdmin-' . $latestversion . '-all-languages.tar.gz ; wget https://files.phpmyadmin.net/phpMyAdmin/' . $latestversion . '/phpMyAdmin-' . $latestversion . '-all-languages.tar.gz 2>/dev/null && tar xfz  phpMyAdmin-' . $latestversion . '-all-languages.tar.gz && cp -a phpMyAdmin-' . $latestversion . '-all-languages/* /usr/share/phpmyadmin/ && rm -f phpMyAdmin-' . $latestversion . '-all-languages.tar.gz && rm -rf phpMyAdmin-' . $latestversion . '-all-languages';
           $result = $this->exec($cmd);
           if($result === false) {
               throw new ISPConfigOSException('Command ' . $cmd . ' failed.');
           }
    
    I concur that there is nothing wrong with the "Get latest download URL for phpMyAdmin" part, except it doesn't work in this case due to the connection error to version.txt, for whatever reasons that might be, so may be there should be some fallback needed like get version from redirector URL: https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz which has been around since 2016.

    May be add it in as an alternative check, just to obtain its latest version, like this instead?
    Code:
            // Get latest download URL for phpMyAdmin
            $versionfile = file_get_contents("https://www.phpmyadmin.net/home_page/version.txt");
            if ($versionfile  === false) {
                // Fallback to get version from redirector URL
                $latestversion = trim(shell_exec("curl -sL -o /dev/null -w '%{url_effective}\\n' https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz | grep -Eo '[0-9]+\\.[0-9]+\\.[0-9]+' | tail -n1"));
            } else {
                preg_match("/[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,3}/", $versionfile, $matches);
                $latestversion = $matches[0];
            }
    
     
    till likes this.
  7. sholzy

    sholzy New Member

    The script is still failing when trying to install phpmyadmin on a clean install.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    That's because your system is still not able to reach the phpmyadmin version.txt file, @ahrasis explained this in detail above. See the error you posted:

    Test it with a simple PHP file like test.php which you can create in /tmp folder with this content:

    Code:
    <?php
    echo file_get_contents('https://www.phpmyadmin.net/home_page/version.txt');
    Then run:

    Code:
    php /tmp/test.php
    the result on a system with working network configuration will be:

    dev-test.png

    And on your system you will likely get no result at all, as PHP can not access phpmyadmin website due to network errors.
     
    ahrasis likes this.
  9. Javi

    Javi New Member

    Greetings,
    While this is a network issue and is ipv6 related, here's a fix that worked for me to force bind9 to use only ipv4:
    Code:
    sudo systemctl edit bind9
    
    Make sure to add the 3 lines defining how the [Service] should ExecStart, leaving the file content as:
    Code:
    ### Editing /etc/systemd/system/named.service.d/override.conf
    ### Anything between here and the comment below will become the new contents of the file
    
    [Service]
    ExecStart=
    ExecStart=/usr/sbin/named -4 -f -u bind
    
    ### Lines below this comment will be discarded
    
    ### /lib/systemd/system/named.service
    # [Unit]
    # Description=BIND Domain Name Server
    # Documentation=man:named(8)
    #[...more ommited lines...]
    
    Restart
    Code:
    sudo systemctl daemon-reload
    sudo systemctl restart bind9
    
    Alternatively, you can install ISPConfig without bind9 to avoid this customization, with:
    Code:
    php /tmp/ispconfig-ai/ispconfig.ai.php --no-dns --no-local-dns
    
     
    Last edited: Nov 14, 2025

Share This Page