Submitted by cron on Wed, 07/27/2016 - 10:57
I have a new webmin box with 3 servers set up on it. I've tried everything I can find online but I just cannot get PHP to execute code. The PHP content itself is simply output to the browser. I've tried this on multiple domains and they are all the same result.
I didn't do anything unusual, I just installed webmin, then php & then virtualmin, so I'm sure it is just a config issue somewhere but I cannot find it!
Any help or advice would be much appreciated.
Submitted by andreychek on Wed, 07/27/2016 - 11:07 Comment #1
Howdy -- it looks like you're seeing a PHP configuration issue there. That can often happen in this case here:
We'd be happy to help you dig into that if you like, though since you're using Virtualmin GPL you'd want to purchase a support incident for that.
Or, if you'd like to see if that can be resolved using the free community help, you can also post your question in the Forums using the Forums link above.
Submitted by cron on Wed, 07/27/2016 - 11:52 Comment #2
Thanks - I dont see any setHandler lines in /etc/httpd/conf.d. I just used yum install php to install php and I dont remember using any third party repositories.
I'll try the forums. I can't afford another support ticket! Cheers
Submitted by andoitz on Thu, 07/28/2016 - 07:44 Comment #3
PHP seems to be not working with webmin/virtualmin in centos 7.2. I give you my details bellow, its very frustrating:
I tried to remove every php package and configrutarion in the server and install it again with this instructions "https://www.virtualmin.com/documentation/web/multiplephp#toc-installing-..."
PHP is working perfect, this is an webmin/virtualmin issue as no matters what configuration you put in php.conf and httpd.conf, it will never work...
Note: If I install apache and php separated in a virtual machine (clone of the same server) it works, but it do not work after install webmin/virtualmin.
Submitted by andoitz on Thu, 07/28/2016 - 08:10 Comment #4
I found the problem, it was an incompatibility with the CGI modules. To solve this you have to uninstall httpd,php and all the modules associated, remove extra repositories and install everything again.
Submitted by zzmaster on Tue, 09/26/2017 - 12:39 Comment #5
I just installed Virtualmin.
Operating system CentOS Linux 6.9 Webmin version 1.852 Usermin version 1.720 Virtualmin version 6.00
PHP versions 5.3.3, 5.6.25, 7.0.10 Re-Check Configuration works fine.
Mode is Apachemod_php (run as Apache's user) default version 5.6.25
First this mode option was available, then, after adding virtual host - disappeared, then I installed
yum --enablerepo=centosplus install mod_phpit appeared back.
Searched for SetHandler
# grep -r -i --include \*.conf SetHandler /etc
/etc/httpd/conf/httpd.conf:# SetHandler server-status
/etc/httpd/conf/httpd.conf:# SetHandler server-info
/index.html - ok but /i.php - outputs source code.
My httpd.conf is here https://justpaste.it/1bq1y
Restarting apache not helped.
Well over my head ther but unborn will solve it.
Submitted by andreychek on Tue, 09/26/2017 - 13:06 Comment #7
For anyone seeing this issue, take a peek at this issue here if you hadn't already:
If that doesn't help and you're using Virtualmin GPL, my suggestion is to post a new Forum thread describing your issue. We monitor the Forums, along with lots of wonderful folks in the community!
If you're using Virtualmin Pro, my suggestion is to open up a new support request, and we'll give you a had in there.