• Resolved Castor

    (@castoruk)


    I’m looking at upgrading a number of WP site to use PHP7 and possibly PHP-FPM.

    Are there any issues or actions I need to take into consideration for NF?

    Thanks in advance.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Hi,

    You can check this article: Upgrading to PHP 7 with NinjaFirewall installed.
    As indicated, if you are using a php.ini file, you will likely need to rename it to .user.ini.

    Recently upgraded to php-fpm and I get a notice in all sites “NinjaFirewall fatal error: Unable to communicate with the firewall. Please check your PHP INI settings. Review your installation, your site is not protected.”.

    So I go through the steps in the plugin to set it up but it doesn’t put anything in the htaccess so the site knows where the user.ini file is.

    Uploaded wp-check.php and it said in red “php.ini found – .user.ini found – Warning: you have more than one INI file”.

    Is this my issue? I’ve always used user.ini, never really used the php.ini until upgrading to php 7.

    So I re-ran the setup steps and selected php.ini. It put the code into the php.ini file. I removed the user.ini. Plugin still says “Error: the firewall is not loaded.”. Same thing after restarting apache.

    Plugin Author nintechnet

    (@nintechnet)

    Hi

    With your configuration, you would probably need to use .user.ini and, after adding NinjaFirewall’s directive to it, to restart PHP-FPM:
    In Debian (incl. Ubuntu, Mint etc): # service php7.0-fpm restart or # service php7.0-fpm restart.
    In RedHat (incl. CentOS): # /etc/init.d/php-fpm restart or # service php-fpm restart
    Using reload instead of restart will work too.

    Selected user.ini, restarted php/apache and I see “Error: the firewall is not loaded.”.

    Cpanel was updated to version 60, before this all the sites’ ninjafiewall worked. Now after version 60, php-fpm was available so it was turned on for the sites. They’re much faster now, but the plugin stoped working on them all. Thats all thats changed.

    • This reply was modified 8 years, 4 months ago by jgjh151.
    Plugin Author nintechnet

    (@nintechnet)

    Can you contact cPanel and ask them why PHP INI files stopped working after the update to v60? I assume it is just a small configuration problem.

    Seems with cpanel php-fpm the php.ini file in the domain directory is ignored and you have to place the items from the php.ini into the domain’s fpm config file.

    https://forums.cpanel.net/threads/php-fpm-and-php-ini.582382/

    Plugin Author nintechnet

    (@nintechnet)

    Does NinjaFirewall work now?

    I’m not messing with the php-fpm config files to get this working, so no, not working at this point.

    Weird thing is all the sites also started sending “[NinjaFirewall] Security rules update” AND “NinjaFirewall] Daily Activity Report” even though when I go to those sites to again turn off the notifications I can’t because it says “Error: the firewall is not loaded.”.

    Plugin Author nintechnet

    (@nintechnet)

    Weird thing is all the sites also started sending “[NinjaFirewall] Security rules update” AND “NinjaFirewall] Daily Activity Report”

    That’s normal, the plugin is enabled. Disable it from the “Plugins” page to stop notifications.

    jomo

    (@jonathanmoorebcsorg)

    @jgjh151 thanks for posting the Cpanel thread… did you solve it?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘PHP7 + PHP-FPM’ is closed to new replies.