These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for PHP not working, prints source code on the new forum.
Hello,
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.
PHP Mode is Apache mod_php (run as Apache's user) default PHP version is 5.6.25
First this mode option was available, then, after adding virtual host - disappeared, then I installed
yum --enablerepo=centosplus install mod_php
it 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.
Please help.
The problem was that my php.ini configured not to process short php tags like <? I just wander if there's any slight reason to configure that way by default in the year 2017?!
As I understand it, short tags are not recommended in the general case, and should be enabled specifically in situations that need it. The <?= short tag (for echo) is enabled in PHP by default from version 5.4 onward. I believe most applications use the <?php opening tag.
--
Check out the forum guidelines!