Web site not running and showing php text

SYSTEM INFORMATION
OS type and version: CentOS 8 Stream
Webmin version: 1.981
Virtualmin version: 6.17

I’m new user and i don’t have too much knowledge with web hosting. Last time I bought VPS with CentOS8 64 bit from contabo and installed Virtual min and copied my old website folder to new VPS no problem. After that last two day ago i bought same VPS but CentOS 8 Stream 64 bit and installed Virtual min. That time after copy website folder webpage don’t run and only show text with php something like that

<?php /** * Front to the WordPress application. This file doesn't do anything, but loads * wp-blog-header.php which does and tells WordPress to load the theme. * * @package WordPress */ /** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define( 'WP_USE_THEMES', true ); /** Loads the WordPress Environment and Template */ require __DIR__ . '/wp-blog-header.php'; I don't know how to do and how to fix. Anyone can help me?

Usually this happens when mod_php is installed (often people install all “php” packages thinking that’s a reasonable thing to do when adding another PHP version or whatever…the package named “php” is mod_php and should never be installed on a modern system).

The package includes a config file that overrides Virtualmin PHP configuration, so when you install it or upgrade it, it breaks PHP apps in Virtualmin. So, don’t install mod_php (the package named “php” in the case of the default PHP version, but it’ll probably be something like “php7.4-php” if you’ve installed some other PHP version(s)). There is never any reason to use mod_php for any deployment today, and it should not exist on your system.

And then one more thing i want to install 5 server with one domain name so what virtual min package i need to buy. And when i face error like that support chat can use or not. Normally i never change server setting only change website from wordpress login page. But One thing every month i change hosting plan depend usage and so every month i need to install new virtual min at VPS.

Hi Thank for reply me. This is my install procedure last time i installed 3 server is ok. The last server happen like that. Can you explain detail how to fix and where to fix. Because i don’t have too much knowledge and still learning googling and youtube learning. This is my install procedure. I bought VPS and enter ip address at putty and type username and password and then start this procedure. After that copy public_html folder under home directory.

Install Virtual Min
wget http:// software.virtualmin. com/gpl/scripts/install.sh
sudo /bin/sh install.sh

Install Rsync
yum install rsync
rsync -version

ssh-keygen -R “you server hostname or ip”

Install PHP 7.4
dnf install https:// dl.fedoraproject. 0rg/pub/epel/epel-release-latest-8.noarch.rpm
rpm -qa | grep epel
dnf install h ttps: //rpms.remirepo.n@t/e nterprise/remi-release-8.rpm
rpm -qa | grep remi
dnf module list php
dnf module reset php:remi-7.2
dnf module enable php:remi-7.4
dnf install php php-cli php-common
php -v

Install ioncube loader
yum install nano wget
uname -a
cd /tmp
wget http://downloads3.ion cube.c0m/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xfz ioncube_loaders_lin_x86-64.tar.gz
php -v
php -i | grep php.ini
php -i | grep extension_dir
cp /tmp/ioncube/ioncube_loader_lin_7.4.so /usr/lib64/php/modules/
nano /etc/php.ini
zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_7.4.so
service httpd restart
service php-fpm restart
php -v

Wherever you got the suggestion to do this was wrong.

You should never install the php package. It contains mod_php and causes the problem you are having. You do not need mod_php and you should not install it, and since you have installed it, you should uninstall it. I do not know how to be more clear.

Thank for reply me. I remove this process and try it.

Hi Joe, Without install PHP also same error. I install virtual min and just copy my website folder and same error only show php text. Any solution ?

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.