nintechnet
Forum Replies Created
-
Can you ask your host how/where to add the PHP
auto_prepend_file
directive? That’s very odd that it stopped working with PHP 8. Or maybe there’s a new option in your hosting admin panel where you can add the directive?If you can’t whitelist the folder (
/wp-content/nfwlog/
), you can change its location. See “Path to NinjaFirewall’s log and cache directory” at https://blog.nintechnet.com/ninjafirewall-wp-edition-the-htninja-configuration-file/Can you add the directive for PHP 8 to your .htaccess and then run the troubleshooter script:
https://nintechnet.com/share/wp-check.txtCheck the PHP error log, it will show what that error is about.
If you don’t have a PHP error log, you need to enable debugging in WordPress:- Edit your wp-config.php file.
- Search for:
define('WP_DEBUG', false);
- Replace with:
define('WP_DEBUG', true);
- Add this line below:
define( 'WP_DEBUG_LOG', true );
Try to enable the firewall until you get the error and then check the log that will be saved to “/wp-content/debug.log”.
Sure, you can use any PHP code.
Maybe you can rely on the$_SERVER['SERVER_NAME']
environment variable? For instance:<?php
if ( strpos( $_SERVER['SERVER_NAME'], 'first_domain.tld') !== false ) {
// Load first_domain.tld wp-config.php
} elseif ( strpos( $_SERVER['SERVER_NAME'], 'second_domain.tld') !== false ) {
// Load second_domain.tld wp-config.php
}Thanks for the suggestion.
We’ll try to add an option to select the sorting order.We are not allowed to provide support for the Premium version of NinjaFirewall here on www.ads-software.com, so please connect to your account and send your message from there: https://secure.nintechnet.com/login/
It seems it is not fixed yet, you’d need to let them know.
In the meantime, try to log out of WordPress and log in back again, but I don’t think that will solve the problem.The
/opt
folder is available in all Linux distributions, but you need to be root, the admin, to access it. As that is a shared server, I recommend you contact your host and show them the error message and tell them that it happens when a PHP script callssession_start()
.Can you make sure that PHP can access (read/write) the
/opt/alt/php83/var/lib/php/session/
folder ? It seems it can’t access it, which would mean that’s a permissions issue. Did you update PHP lately?- This reply was modified 6 months, 2 weeks ago by nintechnet.
Forum: Plugins
In reply to: [NinjaScanner - Virus & Malware scan] Nonce keys do not matchCan you enable debugging in WordPress and see if there’s anything written to the PHP error log?
- Edit your wp-config.php file.
- Search for:
define('WP_DEBUG', false);
- Replace with:
define('WP_DEBUG', true);
- Add this line below:
define( 'WP_DEBUG_LOG', true );
Try to run the scanner until you get the error and check the log that will be saved to “/wp-content/debug.log”.
Forum: Plugins
In reply to: [NinjaScanner - Virus & Malware scan] NinjaScanner not working on MultisiteIt looks all good, that’s very strange that WordPress won’t let you access its menu because you have the
manage_options
capability.
NinjaScanner is a network plugin, i.e., it can only be activated as a network wide plugin.
Can you try to install and activate another network plugin and see if it works. This one for example: https://www.ads-software.com/plugins/code-profiler/Forum: Plugins
In reply to: [NinjaScanner - Virus & Malware scan] NinjaScanner not working on MultisiteHere is a script you can run for testing purpose:
<?php
header('Content-type: text/plain');
require 'wp-config.php';
$user = wp_get_current_user();
if ( $user instanceof WP_User ) {
print_r( $user->allcaps );
}- Copy and paste this code into a file named
test.php
. - Upload the file over FTP in the website main root folder.
- Log in to the site as a superadmin (very important).
- Then, go to https://YOUR-SITE/test.php
- Paste here the results.
You must be logged in when you access script.
Forum: Plugins
In reply to: [NinjaScanner - Virus & Malware scan] NinjaScanner not working on MultisiteIs your site hacked or damaged by a hack ?
As long as you are the superadmin and you activate it from the network plugins page, you shouldn’t see this error message.Can you try again and, when it fails, check the firewall log (NinjaFirewall > Logs) and paste here the last few lines, they should show why you were blocked.
There’s no antispam in NinjaFirewall.