phpmyadmin displaying loader script instead of phpmyadmin page

I have just installed phpmyadmin from command shell in ubuntu 16.04.

I followed the ubuntu documentation https://help.ubuntu.com/lts/serverguide/phpmyadmin.html

when i attempt to navigate to myurl/phpmyadmin in web browser it loads the php loader script instead of the phpmyadmin page.

how do i fix this without making a mess of my server?

Remove and install by using Virtualmin - Virtual server - Install Scripts.

Check. Thanks, i found another thread (which i also replied to) mthat filled in the blanks somewhat. It seems that doing it manually using ubuntu isnt as simple as just apt-get install phpmyadmin. There is a simlink consideration because the default virtualmin directory is not www/html…there is a home/user directory in front of this for each virtual server. I also suspect a few libraries are required which i dont have installed. For now i am just using the webmin mysql module for editing databases.

I think phpmyadmin should be a webmin script, not virtualmin one. The webmin admin should determine whether or not its made available to shared hosting servers. Those administrstors can then decide if they wish to enable it or not. I think its a bad idea to allow shared website owners/admins to be installing phpmyadmin.

How is it normally done for cpanel? (Is it done via whm or cpanel?)

All my cpanel accounts already have it installed by default…same as mysql.