• Resolved desert333

    (@desert333)


    Hi
    which option in Ninja relate to blocking access to phpmyadmin / database ?
    When I turn off ninja I can login to phpmyadmin all works good.
    When ninja is active I provide correct password click login and stays on the phpmyadmin login page without any errors, but can’t get in.

    My IP is whitelisted.
    Thanks

    • This topic was modified 9 years, 5 months ago by desert333.
Viewing 1 replies (of 1 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Hi,

    Maybe a PHP session issue (did you check your PHP error log?). Normally, there is no problem to access PHPmyAdmin, but I still recommend to disable the firewall because PHPmyAdmin sends SQL commands in POST or GET requests and they will be detected as SQL injection attempts.
    You can use the .htninja file and whitelist the PHPmyAdmin folder. For instance, if you installed it in a ‘/phpmyadmin’ sub-folder, add this code to the .htninja:

    
    <?php
    /*
     +===================================================================+
     | NinjaFirewall optional configuration file                         |
     |                                                                   |
     | See: http://nintechnet.com/ninjafirewall/wp-edition/help/?htninja |
     +===================================================================+
    */
    
    if (strpos($_SERVER['SCRIPT_FILENAME'], '/phpmyadmin') !== FALSE) {
       return 'ALLOW';
    }
    

    Or, another option could be to create a PHP INI file in the PHPmyAdmin folder and to add this code to it:

    
    auto_prepend_file =
    

    That would override NinjaFirewall’s auto_prepend_file directive.

Viewing 1 replies (of 1 total)

The topic ‘Can’t access phpmyadmin after activating Ninja plugin’ is closed to new replies.