• Resolved shidar

    (@shidar)


    My NinjaFirewall is not working after activating Full WAF Mode. Ini File is created with correct path. Here is the output from the troubleshooter tool:

    NinjaFirewall (WP edition) troubleshooter
    HTTP server 	: 	nginx/1.14.2
    PHP version 	: 	8.0.15
    PHP SAPI 	: 	FPM-FCGI
     	 	 
    auto_prepend_file 	: 	/external/path/wp-content/nfwlog/ninjafirewall.php
    Loader's path to firewall 	: 	/external/path/wp-content/plugins/ninjafirewall/lib/firewall.php	
    wp-config.php 	: 	found in /var/www/site/wp-config.php
    NinjaFirewall detection 	: 	NinjaFirewall is loaded but returned error code #1	
     	 	 
    Loaded INI file 	: 	/etc/php/8.0/fpm/php.ini
    user_ini.filename 	: 	.user.ini
    user_ini.cache_ttl 	: 	300 seconds
    User PHP INI 	: 	.user.ini found -
     	 	 
    DOCUMENT_ROOT 	: 	/var/www/site
    ABSPATH 	: 	/var/www/site/
    WordPress version 	: 	5.9.1
    WP_CONTENT_DIR 	: 	/external/path/wp-content
    Plugins directory 	: 	/external/path/wp-content/plugins
    User Role 	: 	Administrator
    User Capabilities 	: 	manage_options: OK - unfiltered_html: OK
    Log dir permissions 	: 	/external/path/wp-content/nfwlog dir is writable
    Cache dir permissions 	: 	/external/path/wp-content/nfwlog/cache dir is writable
    
    NinjaFirewall (WP edition) troubleshooter v1.9.4

    Is it because the wp-content is not in the DOCUMENT_ROOT?

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

    (@nintechnet)

    It cannot find your wp-config.php.
    You need to use the .htninja file to declare its full path:

    <?php
    /*
     +===========================================================================================+
     | NinjaFirewall optional configuration file                                                 |
     |                                                                                           |
     | See: https://blog.nintechnet.com/ninjafirewall-wp-edition-the-htninja-configuration-file/ |
     +===========================================================================================+
    */
    $wp_config = '/var/www/site/wp-config.php'; 
    

    Replace “/var/www/site/wp-config.php” with the full path to the file.

    Thread Starter shidar

    (@shidar)

    That fixed it! Thank you. 🙂

    But maybe this should be displayed in the troubleshooter script.
    I thought everything was correct because of the line:

    wp-config.php : found in /var/www/site/wp-config.php

    Plugin Author nintechnet

    (@nintechnet)

    The troubleshooter script found it because it was executed in the WordPress root folder, while the firewall is executed in the wp-content/plugins/ninjafirewall/lib folder. I’ll check how that could be improved.

    Thread Starter shidar

    (@shidar)

    Maybe just a hint in the troubleshooter script would help. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Cannot find WordPress configuration file’ is closed to new replies.