Only phpMyAdmin displays php code instead of executing it

3 posts / 0 new
Last post
#1 Sat, 03/09/2019 - 14:15
DanielStonek

Only phpMyAdmin displays php code instead of executing it

Fresh Centos 7 install. Virtualmin install.
Added a VH testing.com (php 7.0); (use noip.com)
SSL cert from Let's Encrypt via Virtualmin option
Forced http -> https
Followed instruction tu upgrade php 5.4 to php7.2 https://www.virtualmin.com/node/48280
So now I have php 7.0 and 7.2
Installed phpMyAdmin from Webmin Software Packages
Changed /etc/httpd/conf.d/phpMyAdmin.conf

Require all granted
#Require ip 127.0.0.1
#Require ip ::1

https://testing.com/index.php and info.php display the correct output but https://testing.com/phpmyadmin displays php code
phpmyadmin.conf is included in httpd/conf.d
How can I solve this?
Thanks

Sat, 03/09/2019 - 14:31
noseboy

Ran into something similar a while ago. Is the php version set properly for the phpmyadmin directory under server config -> web options?

Sat, 03/09/2019 - 16:07 (Reply to #2)
DanielStonek

After installing from Webmin followed instructions from here
https://linuxize.com/post/how-to-install-and-secure-phpmyadmin-with-apac...
after "Configuring and Securing phpMyAdmin" line

testing.com/phpmyadmin displays the php code
phpmyadmin is installed at /usr/share/phpMyAdmin

I added some directives in /etc/httpd/conf.d/phpMyAdmin inside Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
Options +FollowSymLinks +Multiviews +Indexes
AllowOverride None
AuthType basic
AuthName "Authentication Required"
AuthUserFile /etc/phpMyAdmin/.htpasswd
Require valid-user

phpMyAdmin doesn't have a Virtualmin Virtual Host to manage 'web options' or php version from panel