'php-fpm - enabling it causes Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

I am running into an error while attempting to enable php-fpm so that I can have multiple versions of php running on several different domains on one Apache Ubuntu 20 server.

I initially followed these directions: https://www.digitalocean.com/community/tutorials/how-to-run-multiple-php-versions-on-one-server-using-apache-and-php-fpm-on-ubuntu-18-04 But it didn't seem to use php-fpm as seen by phpinfo(); Instead, it was still running php (the regular one).

Then I found these instructions: https://techexpert.tips/apache/apache-php-fpm-installation-ubuntu-linux/

This seemed to work (in theory) by disabling regular php.

But now even phpinfo(); doesn't work, which is in a file called 'info.php'. It contains contains only:

<?php
    phpinfo();
?>

I get: "

Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Fatal error: Unknown: Failed opening required '/home/traini61/public_html/guacamole.org/wordfence-waf.php' (include_path='.:/usr/share/php') in Unknown on line 0

"

I don't understand the error. I tried disabling the 'wordfence' plugin referenced in the error then tried again but it failed in exactly the same way. I've had to run the 2nd set of directions backwards to restore the website.

Also, is there a simpler commandline program that can provide a text-GUI to more easily administer which versions of PHP are assigned to a specific domain in an apache multi-domain configuration?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source