PHP-FPM / FastCGI error generated by Defender

I cannot log in to one of my sites (aslan.gtst.xyz) with my super-admin user and password, so on investigation I see these entries in /var/log/nginx/error.log:

2017/10/22 21:00:29 [error] 7651#7651: *45 FastCGI sent in stderr: "PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/nginx/html/wp-content/plugins/wp-defender/app/module/audit/controller/main.php on line 248" while reading response header from upstream, client: 192.0.91.177, server: gtst.xyz, request: "HEAD / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "gtst.xyz"
2017/10/22 21:00:49 [error] 7651#7651: *47 FastCGI sent in stderr: "PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/nginx/html/wp-content/plugins/wp-defender/app/module" while reading upstream, client: 34.229.219.107, server: gtst.xyz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "gtst.xyz"
2017/10/22 21:00:49 [error] 7651#7651: *47 FastCGI sent in stderr: "/audit/controller/main.php on line 248" while reading upstream, client: 34.229.219.107, server: gtst.xyz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "gtst.xyz"
2017/10/22 21:02:59 [error] 7651#7651: *51 FastCGI sent in stderr: "PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/nginx/html/wp-content/plugins/wp-defender/app/module" while reading upstream, client: 54.159.230.100, server: gtst.xyz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "gtst.xyz"
2017/10/22 21:02:59 [error] 7651#7651: *51 FastCGI sent in stderr: "/audit/controller/main.php on line 248" while reading upstream, client: 54.159.230.100, server: gtst.xyz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "gtst.xyz"
2017/10/22 21:04:58 [error] 7651#7651: *55 FastCGI sent in stderr: "PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/nginx/html/wp-content/plugins/wp-defender/app/module" while reading upstream, client: 54.159.230.100, server: gtst.xyz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "gtst.xyz"
2017/10/22 21:04:58 [error] 7651#7651: *55 FastCGI sent in stderr: "/audit/controller/main.php on line 248" while reading upstream, client: 54.159.230.100, server: gtst.xyz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "gtst.xyz"
2017/10/22 21:05:16 [error] 7651#7651: *57 FastCGI sent in stderr: "PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/nginx/html/wp-content/plugins/wp-defender/app/module/audit/controller/main.php on line 248" while reading response header from upstream, client: 192.0.91.177, server: gtst.xyz, request: "HEAD / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "gtst.xyz"
2017/10/22 21:06:58 [error] 7651#7651: *61 FastCGI sent in stderr: "PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/nginx/html/wp-content/plugins/wp-defender/app/module" while reading upstream, client: 34.229.83.14, server: gtst.xyz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "gtst.xyz"
2017/10/22 21:06:58 [error] 7651#7651: *61 FastCGI sent in stderr: "/audit/controller/main.php on line 248" while reading upstream, client: 34.229.83.14, server: gtst.xyz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "gtst.xyz"
2017/10/22 21:08:59 [error] 7651#7651: *65 FastCGI sent in stderr: "PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/nginx/html/wp-content/plugins/wp-defender/app/module" while reading upstream, client: 34.227.82.211, server: gtst.xyz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "gtst.xyz"
2017/10/22 21:08:59 [error] 7651#7651: *65 FastCGI sent in stderr: "/audit/controller/main.php on line 248" while reading upstream, client: 34.227.82.211, server: gtst.xyz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "gtst.xyz"
2017/10/22 21:10:30 [error] 7651#7651: *69 FastCGI sent in stderr: "PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/nginx/html/wp-content/plugins/wp-defender/app/module/audit/controller/main.php on line 248" while reading response header from upstream, client: 192.0.91.177, server: gtst.xyz, request: "HEAD / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "gtst.xyz"
2017/10/22 21:10:47 [error] 7651#7651: *71 FastCGI sent in stderr: "PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/nginx/html/wp-content/plugins/wp-defender/app/module" while reading upstream, client: 34.229.219.107, server: gtst.xyz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "gtst.xyz"
2017/10/22 21:10:47 [error] 7651#7651: *71 FastCGI sent in stderr: "/audit/controller/main.php on line 248" while reading upstream, client: 34.229.219.107, server: gtst.xyz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "gtst.xyz"
2017/10/22 21:11:54 [warn] 7651#7651: *74 an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp/1/00/0000000001 while reading upstream, client: 196.45.17.66, server: gtst.xyz, request: "GET /wp-admin/edit.php?post_type=page HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "aslan.energy", referrer: "http://aslan.energy/wp-admin/post.php?post=124&action=edit"
2017/10/22 21:11:54 [error] 7651#7651: *74 FastCGI sent in stderr: "PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/nginx/html/wp-content/plugins/wp-defender/app/module/audit/controller/main.php on line 248" while reading upstream, client: 196.45.17.66, server: gtst.xyz, request: "GET /wp-admin/edit.php?post_type=page HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "aslan.energy", referrer: "http://aslan.energy/wp-admin/post.php?post=124&action=edit"
2017/10/22 21:12:04 [warn] 7651#7651: *74 an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp/2/00/0000000002 while reading upstream, client: 196.45.17.66, server: gtst.xyz, request: "GET /wp-admin/post.php?post=18&action=edit HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "aslan.energy", referrer: "http://aslan.energy/wp-admin/edit.php?post_type=page"
2017/10/22 21:12:04 [error] 7651#7651: *74 FastCGI sent in stderr: "PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/nginx/html/wp-content/plugins/wp-defender/app/module/audit/controller/main.php on line 248" while reading upstream, client: 196.45.17.66, server: gtst.xyz, request: "GET /wp-admin/post.php?post=18&action=edit HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "aslan.energy", referrer: "http://aslan.energy/wp-admin/edit.php?post_type=page"
2017/10/22 21:12:57 [error] 7651#7651: *86 FastCGI sent in stderr: "PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/nginx/html/wp-content/plugins/wp-defender/app/module" while reading upstream, client: 54.159.230.100, server: gtst.xyz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "gtst.xyz"

Where does this come from? The sites were working fine a while ago, but in some updates these errors may have been introduced.

  • Roland

    I have remove the defender plugin, just to test, and now I'm getting this:

    2017/10/22 21:37:28 [error] 7762#7762: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.120.226, server: gtst.xyz, request: "POST /wp-admin/admin-ajax.php HTTP/1.1", upstream: "fastcgi://unix:disappointed:var/run/php/php7.2-fpm.sock:", host: "gtst.xyz", referrer: "http://gtst.xyz/wp-admin/network/plugins.php?plugin_status=all&paged=1&s"

    Does that help?

  • viobru

    Hi, Roland!

    Hope you’re doing well today :slight_smile:

    I’m afraid that I’m not able to replicate this on my testing site. Could you please send us the following information about your site so we can have a closer look at this?

    You can use our secure contact form choosing the option ‘I have a different question’: (https://premium.wpmudev.org/contact/#i-have-a-different-question).

    Subject: "Attn: Violeta" (Please use this subject line to ensure that it gets assigned to me :slight_smile: )
    WordPress admin username
    WordPress admin password
    Login URL
    FTP credentials (host, username and password)
    Linkback to this thread for reference
    Any other relevant URLs

    Many thanks in advance!

    Regards,

    Violeta

  • viobru

    Hi, Roland!

    Hope you’re doing well today :slight_smile:

    The developer told me that this is a warning message that is not related to blocking access for the admin.

    I was able to replicate on my end: I couldn’t log in to aslan.gtst.xyz as super-admin neither (I could only access it through the network dashboard, going to My Sites ? Network Admin ? Sites).

    Since Defender is not activated now and the issue is persisting, we’ll have to check if there’s another reason causing this to happen. Just to make sure this is not caused by a conflict, would you be so kind to run a conflict test, so we can discard that this is being caused by another plugin or by the theme? You can find instructions on how to run a conflict test in this link: https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-2

    Please, let me know how the conflict test performed. If you’re not able to run it, just let me know and I’ll run it for you (please note that running a conflict test may cause some things to stop for a while).

    Also, I will need you to add this lines to your wp-config.php file:
    define('WP_DEBUG', true);
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );

    Many thanks in advance!

    Regards,

    Violeta

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.