Support » Plugin: NinjaFirewall (WP Edition) » PHP 7 easyapache 4

  • Resolved aryanduntley

    (@dunar21)



    I just dated apache from easyapache3 to easyapache4 and updated the php version to 7. Ninjafirewall is not recognizing itself as being loaded (“Error: the firewall is not loaded.”). It can write to the php.ini file. I can write to the .htaccess file (and so can ninja firewall). My php.ini shows auto_prepend_file with the correct path. Do you have any idea what is going on?

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

    (@nintechnet)

    Hi,

    Did you try to rename the php.ini to .user.ini as indicated here: Upgrading to PHP 7 with NinjaFirewall installed

    I have not, but my php.ini is reading well and working well. Changes made are live as soon as I restart apache. Why would I change to user.ini when php.ini is working well in all other cases? Would user.ini even work?

    Plugin Author nintechnet

    (@nintechnet)

    It may only work in the current folder where it is installed, but not in sub-folders after your update. .user.ini is the per-directory default PHP INI since PHP 5.3 and hence is likely the format you should use.
    Another solution could imply the use of the SetEnv PHPRC directive, as indicated here: Troubleshoot NinjaFirewall installation problems. But I don’t recommend to use it as long as you didn’t try the other options, because that directive will short-cut the server main PHP INI.

    Hm. I’ll play with the user.ini file and let you know. I’ve edited the .htaccess file in all the ways suggested by both the plugin and the troubleshooting. Nothing has worked so far.

    Nope. user.ini did not take. Not sure what else to try :/

    Plugin Author nintechnet

    (@nintechnet)

    Are you running suPHP?
    Did you remove any instructions related to NinjaFirewall that were written to the .htaccess? They may conflict with the PHP INI file.

    You can also run this script to see all info about your configuration: http://nintechnet.com/share/wp-check.txt
    1. Rename this file to “wp-check.php”.
    2. Upload it into your WordPress root folder.
    3. Go to http://YOUR WEBSITE/wp-check.php
    4. Delete it afterwards.

    Ok. I ran the check. It indicated that everything was good but informed me that the user.ini file was .usuer.ini. I created a .user.ini file (instead of a user.ini file) and put the auto_prepend_file directive in there, and ninjafirewall is now working. Thanks for the help guys.

    I am now reading through the posts and YOU GUYS TOLE ME it was “.user.ini”!!! For some reason my mind only read user.ini… I apologize.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘PHP 7 easyapache 4’ is closed to new replies.