Phpmyadmin doesn't work

Discussion in 'Installation/Configuration' started by wrkilu, Apr 13, 2024.

Tags:
  1. wrkilu

    wrkilu New Member

    Hi,
    In fresh installation default URL doesn't work - error 404.
    I noticed there isn't on server directory /usr/share/phpmyadmin but some /usr/share/phpmyadmin-bak-5.2.1-240323062501 - thats why it doesn't work.
    How to fix it good ?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    How did you install that server, and did you got any errors during installation?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    And you did mentioned which OS you use and which URL you used to access phpmyadmin.
     
  4. wrkilu

    wrkilu New Member

    No errors. All is working except Phpmyadmin.
    OS Debian 12.
    URL (default): https:// isp3.sdata.net.pl:8081/phpmyadmin
    but as I said:
    ls -l /usr/share/phpmyadmin
    ls: cannot access '/usr/share/phpmyadmin': No such file or directory
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    I am not sure why your phpmyadmin directory got renamed; I have not seen that on an ISPConfig system before and I use the auto-installer regularly. You can try to use the script from @Th0m to see if it can update the broken installation. Or you try to just rename the folder back.
     
  6. wrkilu

    wrkilu New Member

    I just made a copy with name phpmyadmin and it works.
    Question: is it any risk that in the future some backup script underneath or automatic upgrade which will break it once again ?
     
  7. wrkilu

    wrkilu New Member

  8. till

    till Super Moderator Staff Member ISPConfig Developer

    I don't think so. I have not seen such a renamed phpmyadmin folder on any ISPConfig system, so the renaming is likely not related to ISPconfig or the auto-installer. Or you did not start with a clean and empty system.

    No, you will have to create such a global alias yourself.
     
  9. wrkilu

    wrkilu New Member

    I've just set https://[SERVERNAME]/dbmgmt and it works :)
    Anyway thanks for help and most of all - lots of greetings for ISPConfig developers! You've made great hosting panel!
     
  10. wrkilu

    wrkilu New Member

    Heh I was right in the future it can be the same problem.
    After one day again I have just :

    root@h3-virt~# ls -ld /usr/share/phpmyadm*
    drwxr-xr-x 12 root root 31 Mar 22 18:00 /usr/share/phpmyadmin-bak-5.2.1-240329062501
    drwxr-xr-x 12 root root 31 Mar 22 18:00 /usr/share/phpmyadmin-bak-5.2.1-240414062501
    root@h3-virt~#
    So phpmyadmin folder has been changed to .bak :( , why ? which script breaks this ? I haven't do anything in this Debian underneath.
     
  11. wrkilu

    wrkilu New Member

    So I discovered a bug.
    In /etc/cron.daily/ there is broken script auto_update_phpmyadmin which every day at 6.25 destroys folder /usr/share/phpmyadmin.
    It was a fresh install of Debian so that script is from ISPConfig - not mine.
    Thats it.
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Quite strange; I will ask @Th0m if this is related to his phpmyadmin update script. is it possible that your system is unable to load phpmyadmin updates via https?
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Please run the script from that cronjob as root and post the output that you get so we can see why it fails on your system.
     
  14. wrkilu

    wrkilu New Member

    Here you are:
    root@h3-virt~/KKK/cron.daily# ./auto_update_phpmyadmin
    phpMyAdmin version is out of date, installed version: 5.2.1, latest version:
    Starting phpMyAdmin update.
    unzip: cannot find or open /tmp/phpMyAdmin--all-languages.zip, /tmp/phpMyAdmin--all-languages.zip.zip or /tmp/phpMyAdmin--all-languages.zip.ZIP.
    mv: cannot stat '/tmp/phpMyAdmin--all-languages': No such file or directory
    cp: cannot create regular file '/usr/share/phpmyadmin/': Not a directory
    phpMyAdmin has been updated to the latest version ().
    If you had any custom config files other than the config.inc.php and/or a .htaccess file, you have to copy them yourself from /usr/share/phpmyadmin-bak-5.2.1-240414151516/ to /usr/share/phpmyadmin/
    root@h3-virt~/KKK/cron.daily#

    And as a result it renamed my symlink /usr/share/phpmyadmin to /usr/share/phpmyadmin-bak-5.2.1-240414151516
    and now again there isn't /usr/share/phpmyadmin :(
    Script shouldn't behave in that way.

    After running that script again result is:

    root@h3-virt~/KKK/cron.daily# ./auto_update_phpmyadmin
    grep: /usr/share/phpmyadmin/package.json: No such file or directory
    Local phpMyAdmin install is up-to-date, installed version: , latest version:
    root@h3-virt~/KKK/cron.daily#

    And again there isn't any /usr/share/phpmyadmin :(
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    It seems as if the script cannot get the latest version number. @Th0m will have to take a look at how this can happen.
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    I just did a fresh installation of ISPConfig using the auto installer, phpmyadmin is there and the phpmyadmin auto update script works as well:

    So, the issue you encounter is specific to your system. I guess your system cannot connect to the internet to get the current phpmyadmin version. Please run this command and post the result:

    Code:
    curl -s https://www.phpmyadmin.net/home_page/version.txt
     
  17. wrkilu

    wrkilu New Member

    Code:
    root@h3-virt~#
    root@h3-virt~# curl -s https://www.phpmyadmin.net/home_page/version.txt
    root@h3-virt~#
    root@h3-virt~#
    
    But my server has internet connection:
    Code:
    root@h3-virt~# telnet wp.pl 80
    Trying 212.77.98.9...
    Connected to wp.pl.
    Escape character is '^]'.
    ^]
    telnet> quit
    Connection closed.
    root@h3-virt~# telnet wp.pl 443
    Trying 212.77.98.9...
    Connected to wp.pl.
    Escape character is '^]'.
    ^]
    telnet> quit
    Connection closed.
    root@h3-virt~#
    root@h3-virt~#
    
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    But your server seems to be unable to connect to the phpmyadmin website, the above command should return this (just ran on one of my servers):

    Code:
    root@system:~# curl -s https://www.phpmyadmin.net/home_page/version.txt
    5.2.1
    2023-02-08
    https://files.phpmyadmin.net/phpMyAdmin/5.2.1/phpMyAdmin-5.2.1-all-languages.zip
     
  19. wrkilu

    wrkilu New Member

    Well ok , something is wrong with my server he can't connect to https://files.phpmyadmin.net
    But second truth is that script shouldn't remove folder /usr/share/phpmyadmin if it can't connect to that site, should leave it as it is.
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    That's the case and we will change the script to prevent that. Your case is just so rare that this condition has not happened yet to anyone else.
     

Share This Page