PHP execution MODE and incompatibility with some PHP sites like WORDPRESS


I have a CENTOS 7, with Webmin/Virtualmin installed, and 2 versions of PHP (downloaded directly from Remi Repos) 7.2 and 5.6.4

Running the “checking configuration” script in Virtualmin, I get this:

-Apache is installed.
-The following PHP versions are available : 5.6.40 (/bin/php-cgi), 7.2.24 (/opt/rh/rh-php72/root/usr/bin/php-cgi), 5.6 (mod_php)
-The following PHP execution modes are available : mod_php cgi fcgid fpm
-The following PHP-FPM versions are available on this system : 5.6.40 (php-fpm) 7.2.24 (rh-php72-php-fpm)
-Webalizer is installed.
-Apache is configured to host SSL websites.
-MariaDB 5.5.65 is installed and running.
etc. etc.

"…your system is ready for use by Virtualmin "

Then, I have an old CPANEL server running with PHP 5.6 CGI, and many of my users I want to bring to this Centos/Webmin-Virtualmin server have Wordpress installations in the old one. In that old server they run fine.
When I migrate those account to Virtualmin server, everything was imported correctly, (email accounts, DNS records, Home files, Web files, etc.)
So, Apache shows many of my users websites fine. But the ones with Wordpress installations have results that vary. I tried to accommodate some of those with old versions of wordpress, and they worked fine (some with FPM mode, which was the only mode that allowed me to shows their sites)
But for those with the most updated version of Wordpress (like the version offered inside Virtualmin under “install scripts”, which is version 5.4.1) , give errors depending of the PHP execution mode I select.

For example:

I have this virtual server:

-With Apache mod_php, wordpress web partially works (images broken)
-with FPM: works (but issues with new plugins to install in wordpress. Read below)
-With CGI or FCGI: neither work. Both broken, 500 Internal Server Error:

[fcgid:warn] [pid 30781] (104)Connection reset by peer: [client ipaddress] mod_fcgid: error reading data from FastCGI server, referer: exampledomain . com/ [core:error] [pid 30781] [client ipaddress:61235] End of script output before headers: index.php, referer: exampledomain . com

Under CGI, I tried emptying the .htaccess, and reviewing the permissions of the Wordpress directory and files, I follow all instructions about permissions (from Wordpress forums), same results. So, I can’t use at all CGI or FCGI.

So, returning to the 2 options that I can make Wordpress at least to be LOADED (FPM and mod_php), I found out another thing when I use those PHP handlers:
Wordpress shows a WARNING “I’m using a PHP unsecured version”, and I can’t install woocommerce or mailchimp for example (says my PHP version is outdated). Even when I set this Virtual Server to use an updated PHP 7.2, and not 5.6 under Virtualmin “website options”, Wordpress still shows those warnings, and I can’t install plugins that requires an “updated” version of PHP.

Bottom line: I really need Full working wordpress, Woocommerce and other Wordpress plugins to be ready to install for those users I’m migrating from the old CPANEL server, but I can’t proceed with ANY of the PHP execution mode I have installed on this new Webmin/Virtualmin server for the reasons explained above.

Is there any workaround to this? Do I need to re-install PHP completely ? (I would like to keep both versions as an option on this server. I want offer my users 5.6.4 and 7.2 in case of any incompatibility so they pick the one that works for them)

I will appreciate a hand on this one. Thanks.

It always helps if the problem is described in detail :+1:

This would appear to be the easiest to fix. Find the path that was set for the images directory on the old server and update it to the new server. If you could find and correct this, you will have migrated Wordpress and have it working perfectly on the new server.

Now, before you try and get it to work with PHP-FPM etc. it might be a good idea to spend some time to do a fresh test install of wordpress on your system via Virtualmin | Installed Scripts. Let us know how that goes.

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