Title: wp_kc's Replies | WordPress.org

---

# wp_kc

  [  ](https://wordpress.org/support/users/wp_kc/)

 *   [Profile](https://wordpress.org/support/users/wp_kc/)
 *   [Topics Started](https://wordpress.org/support/users/wp_kc/topics/)
 *   [Replies Created](https://wordpress.org/support/users/wp_kc/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/wp_kc/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/wp_kc/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/wp_kc/engagements/)
 *   [Favorites](https://wordpress.org/support/users/wp_kc/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 77 total)

1 [2](https://wordpress.org/support/users/wp_kc/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/wp_kc/replies/page/3/?output_format=md) 
[4](https://wordpress.org/support/users/wp_kc/replies/page/4/?output_format=md) 
[5](https://wordpress.org/support/users/wp_kc/replies/page/5/?output_format=md) 
[6](https://wordpress.org/support/users/wp_kc/replies/page/6/?output_format=md) 
[→](https://wordpress.org/support/users/wp_kc/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[NinjaFirewall (WP Edition) - Advanced Security Plugin and Firewall] Feature request: Log action](https://wordpress.org/support/topic/feature-request-log-action/)
 *  Thread Starter [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * (@wp_kc)
 * [2 weeks, 3 days ago](https://wordpress.org/support/topic/feature-request-log-action/#post-18949910)
 * This change to Fail2Ban happened a few years back, and I had put the problem 
   on the back burner. As I recall, it has to do with the changing size of the log
   file. If the NinjaFirewall file size reaches it’s maximum for the month and starts
   trimming lines off the beginning, then Fail2Ban barfs with an error message saying
   the system clock is wrong, and then ignores the log file for the rest of the 
   month!
 * I had a long back-and-forth with the developer about this. He had made some changes
   to solve a problem with some other stuff, and was unwilling to change it back
   just for Ninjafirewall logs (which he viewed as weird and non-standard, whatever
   that standard is). His suggestion was to use iNotify to capture changes to the
   log file and append those changes to a different log file. But when I looked 
   into that idea, it also has issues. I also looked into systemd path units and
   a few other kernel level file monitoring methods, and none of them are ideal.
 * What I came up with in the meantime was a Must-Use plugin that loads before 0-
   ninjafirewall.php, and adds a register_shutdown_function callback, then checks
   for new lines at php shutdown. It’s ugly, but it works, sort of. It tends to 
   reban things that were already banned even though I am keying off the incident
   ID number, so I end up setting the max number of days to 1 just to minimize rebanning
   IPs that haven’t come back.
 * Just looking for a way back to what I had before this change to Fail2Ban happened.
   Two of my customers are on VPS’ one of whom had the premium version of NinjaFirewall
   for a couple of years, then stopped paying their bill, the other never had a 
   premium version. So I’ll have to do a sales pitch to get them to subscribe to
   the premium version.
 * All my other customers are on shared hosting, so syslog was always out of the
   question since I have no control over the host’s Fail2Ban. But it would be nice
   to have a script running that can take NinjaFirewall logs and do a ban through
   an API call to CloudFlare.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[NinjaFirewall (WP Edition) - Advanced Security Plugin and Firewall] Feature request: Log action](https://wordpress.org/support/topic/feature-request-log-action/)
 *  Thread Starter [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * (@wp_kc)
 * [2 weeks, 5 days ago](https://wordpress.org/support/topic/feature-request-log-action/#post-18948155)
 * Changes in Fail2Ban broke my custom filter that looked at the NinjaFirewall log
   files. Fail2Ban is expecting a log file to only be appended to, with a consistent
   end of file index. So the rolling log file nature of NinjaFirewall, where old
   events are removed from the start of the file, messes up NinjaFirewall. How about
   instead, making an option that disables the rolling log file feature?
 * The latest versions of Debian don’t have a syslog any more, everything goes to
   the journal. I assume the OS probably redirects software syslog writes to the
   journal. This is also problematic for Fail2Ban, since NinjaFirewall is not a 
   systemd unit as Fail2Ban filters expect, and there is no way to redirect syslog
   writes to a text log file.
 * Thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[NinjaFirewall (WP Edition) - Advanced Security Plugin and Firewall] Missing /wp-content/session folder](https://wordpress.org/support/topic/missing-wp-content-session-folder/)
 *  Thread Starter [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * (@wp_kc)
 * [7 months, 2 weeks ago](https://wordpress.org/support/topic/missing-wp-content-session-folder/#post-18735746)
 * Well done [@gosuccess](https://wordpress.org/support/users/gosuccess/) ! Thanks.
   And thanks [@bruandet](https://wordpress.org/support/users/bruandet/) for rolling
   out the fix so quick.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[NinjaFirewall (WP Edition) - Advanced Security Plugin and Firewall] Missing /wp-content/session folder](https://wordpress.org/support/topic/missing-wp-content-session-folder/)
 *  Thread Starter [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * (@wp_kc)
 * [7 months, 3 weeks ago](https://wordpress.org/support/topic/missing-wp-content-session-folder/#post-18731146)
 * I also see this…
 *     ```wp-block-code
           /**
            * Create session dir if it doesn't exist.
            * Note: NFWSESSION_DIR can be defined in the .htninja file.
            */
           if (! self::$session_dir ) {
               if ( defined('NFWSESSION_DIR') ) {
                   self::$session_dir = NFWSESSION_DIR;
               } else {
                   self::$session_dir = NFW_LOG_DIR .'/sessions';
               }
               if (! is_dir( self::$session_dir ) ) {
                   $res = mkdir( self::$session_dir, 0700, true );
                   if ( $res === false ) {
                       return false;
                   }
               }
               touch( self::$session_dir .'/index.html');
           }
       ```
   
 * I don’t think I have anything special in my security settings that would prevent
   mkdir() from working in the /wp-content/ folder. My directories are set to 755,
   and my files are set to 644. All files and directories are owned by the apache2
   user, www-data.
 *  Plugins and themes be installed and uninstalled without a problem, so it seems
   that directories and files can be created and deleted without problems in /wp-
   content/plugins/ and /wp-content/themes/.
 * There are six calls to NinjaFirewall_session::start(), but none of them handle
   a return value of false. It looks like this affects the login, logout, and captcha
   procedures.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[NinjaFirewall (WP Edition) - Advanced Security Plugin and Firewall] Missing /wp-content/session folder](https://wordpress.org/support/topic/missing-wp-content-session-folder/)
 *  Thread Starter [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * (@wp_kc)
 * [7 months, 3 weeks ago](https://wordpress.org/support/topic/missing-wp-content-session-folder/#post-18731128)
 * Thanks for the reply. I was not aware of that constant and have not changed it.
   I do see this in your code…
 *     ```wp-block-code
       /** * Select whether we want to use PHP or NF (default since v4.8.1) sessions. */if ( is_file( NFW_LOG_DIR .'/nfwlog/phpsession') ) {	require_once __DIR__ .'/lib/class-php-session.php';} else {	if (! defined('NFWSESSION_DIR') ) {		/**		 * NFWSESSION_DIR can be defined in the .htninja.		 */		define('NFWSESSION_DIR', NFW_LOG_DIR .'/session');	}	require_once __DIR__ .'/lib/class-nfw-session.php';}
       ```
   
 * I did recently upgrade all my sites from php8.2-fpm to php8.3-fpm. Is it possible
   that the change in PHP versions messed it up somehow? Because I do see a /wp-
   content/nfwlog/session/ directory on my sites, and they have a bunch of session
   files with date-time stamps that end the day before I did the switch in PHP versions.
    -  This reply was modified 7 months, 3 weeks ago by [wp_kc](https://wordpress.org/support/users/wp_kc/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP ADA Compliance Check Basic] “PHP Fatal error” when starting scan](https://wordpress.org/support/topic/php-fatal-error-when-starting-scan/)
 *  Thread Starter [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * (@wp_kc)
 * [1 year ago](https://wordpress.org/support/topic/php-fatal-error-when-starting-scan/#post-18521926)
 * Thanks again!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[NinjaScanner - Virus & Malware scan] Clicking Quarantine tab causes fatal error.](https://wordpress.org/support/topic/clicking-quarantine-tab-causes-fatal-error/)
 *  Thread Starter [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * (@wp_kc)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/clicking-quarantine-tab-causes-fatal-error/#post-18445857)
 * Forgot to mark resolved
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[NinjaScanner - Virus & Malware scan] Clicking Quarantine tab causes fatal error.](https://wordpress.org/support/topic/clicking-quarantine-tab-causes-fatal-error/)
 *  Thread Starter [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * (@wp_kc)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/clicking-quarantine-tab-causes-fatal-error/#post-18445856)
 * That didn’t fix it. But based on your response, I deleted the plugin, made sure
   all the plugin files and directories were deleted from the server, then re-installed
   it. After that, the Quarantine tab started working again.
 * Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Elementor Website Builder - more than just a page builder] PHP Deprecated calls in Elementor](https://wordpress.org/support/topic/php-deprecated-calls-in-elementor/)
 *  Thread Starter [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * (@wp_kc)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-deprecated-calls-in-elementor/#post-15392601)
 * It is not a publicly accessible web site, and it has WP_DEBUG enabled. These 
   messages only show up in the debug log file while accessing /wp-admin area of
   the web site. Nothing special has to be done, simply log in to the site. The 
   log file grows by about 2MB per day with these types of messages.
 * No front end issues are noticeable. I just thought you might be interested, since
   it looks like these message will turn into errors in the future.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[NinjaScanner - Virus & Malware scan] Missing Lock File, cURL tls certificate error](https://wordpress.org/support/topic/missing-lock-file-curl-tls-certificate-error/)
 *  Thread Starter [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * (@wp_kc)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/missing-lock-file-curl-tls-certificate-error/#post-14394954)
 * I still got the same result with that…
    `03-May-21 14:48:38 ERROR Fatal error:
   forking process failed (cURL error 56: OpenSSL SSL_read: error:1409445C:SSL routines:
   ssl3_read_bytes:tlsv13 alert certificate required, errno 0: AJAX API). Aborting`
 * But, I figured it out. I have CloudFlare on the site with the problem, and I 
   have “Authenticated Origin Pulls” enabled. When I disabled Authenticated Origin
   Pulls in my server configuration and paused CloudFlare, it started working. Just
   pausing CloudFlare alone did not fix it.
 * So I am assuming the problem is happening because the server can’t do a simple
   loopback when Authenticated Origin Pulls is on.
 * I’m research if there is a fix for this. But at this point, it does not look 
   like it is a NinjaScanner problem. So I’m marking this as resolved. Any more 
   ideas would be appreciated though.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[NinjaScanner - Virus & Malware scan] Missing Lock File, cURL tls certificate error](https://wordpress.org/support/topic/missing-lock-file-curl-tls-certificate-error/)
 *  Thread Starter [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * (@wp_kc)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/missing-lock-file-curl-tls-certificate-error/#post-14384140)
 * I commented out both lines, but still got the same result.
    `30-Apr-21 05:25:
   32 ERROR Fatal error: forking process failed (cURL error 56: OpenSSL SSL_read:
   error:1409445C:SSL routines:ssl3_read_bytes:tlsv13 alert certificate required,
   errno 0: AJAX API). Aborting`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[NinjaScanner - Virus & Malware scan] Missing Lock File, cURL tls certificate error](https://wordpress.org/support/topic/missing-lock-file-curl-tls-certificate-error/)
 *  Thread Starter [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * (@wp_kc)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/missing-lock-file-curl-tls-certificate-error/#post-14381952)
 * P.S. If I switch to WP-CRON mode, the error message is pretty much the same…
   `
   29-Apr-21 15:25:37 ERROR Fatal error: forking process failed (cURL error 56: 
   OpenSSL SSL_read: error:1409445C:SSL routines:ssl3_read_bytes:tlsv13 alert certificate
   required, errno 0: WP-CRON). Aborting`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Elementor Website Builder - more than just a page builder] Elementor using depreciated Elementor class](https://wordpress.org/support/topic/elementor-using-depreciated-elementor-class/)
 *  Thread Starter [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * (@wp_kc)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/elementor-using-depreciated-elementor-class/#post-14367291)
 * It looks like the Elementor developers found the problem and fixed it. The latest
   version released 8 hours ago is no longer generating these messages.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Nobs • Share Buttons] unescaped javascript string](https://wordpress.org/support/topic/unescaped-javascript-string/)
 *  Thread Starter [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * (@wp_kc)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/unescaped-javascript-string/#post-14280263)
 * Fixed!
 * Thanks for the speedy response.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Envira Gallery - Image Photo Gallery, Albums, Video Gallery, Slideshows & More] Envira Gallery Lite broken in WP 5.6](https://wordpress.org/support/topic/envira-gallery-lite-broken-in-wp-5-6/)
 *  Thread Starter [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * (@wp_kc)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/envira-gallery-lite-broken-in-wp-5-6/#post-13773435)
 * It works again! Thanks, you guys are awesome.

Viewing 15 replies - 1 through 15 (of 77 total)

1 [2](https://wordpress.org/support/users/wp_kc/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/wp_kc/replies/page/3/?output_format=md) 
[4](https://wordpress.org/support/users/wp_kc/replies/page/4/?output_format=md) 
[5](https://wordpress.org/support/users/wp_kc/replies/page/5/?output_format=md) 
[6](https://wordpress.org/support/users/wp_kc/replies/page/6/?output_format=md) 
[→](https://wordpress.org/support/users/wp_kc/replies/page/2/?output_format=md)