• Resolved Spiffy Plugins

    (@spiffyplugins)


    My server error logs are filling with the following error message, generated by WordFence:

    stream_set_timeout() expects parameter 1 to be resource, boolean given in …/wp-content/plugins/wordfence/modules/login-security/classes/controller/time.php on line 98

    Please advise on how to fix this problem. Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey @spiffyplugins,

    It looks like fsockopen() is failing for some reason.

    Can you send me a Diagnostics report so I can get a better overview of your environment? Please navigate to Wordfence > Tools > Diagnostics. Here you can select SEND REPORT BY EMAIL. Please include your www.remarpro.com username and update this thread after you’ve sent it.

    In the meantime, if you’re comfortable with it you can remove the @ character in front of fsockopen in time.php on line 97. The @ character is to suppress errors, removing it might log a more useful error. After you’ve don’t this and have seen the new error please re-add the @.

    This is the path to find the code:
    /wp-content/plugins/wordfence/modules/login-security/classes/controller/time.php

    Please let me know how it goes.

    Thanks,

    Gerroald

    Thread Starter Spiffy Plugins

    (@spiffyplugins)

    The issue is the socket connection is failing due to permission denied. I believe the problem is that the stream_set_timeout is called even if the fsockopen fails. It should be called within the if ($socket) statement:

    foreach ($servers as $s) {
    	$socket = @fsockopen('udp://' . $s, 123, $err_no, $err_str, 1);
    	if ($socket) {
    		stream_set_timeout($socket, 1);
    		...etc
    

    Hey @spiffyplugins,

    Thanks for the update, and sharing this.

    I’ve shared this with the developers and they’ve created a report for it. I’ll be sure to update you when I find out if adjustments will be made in the next release.

    Thanks,

    Gerroald

    Hey @spiffyplugins,

    I just wanted to let you know that this will be in the next release.

    Please let us know if anything else comes up.

    Thanks,

    Gerroald

    Thread Starter Spiffy Plugins

    (@spiffyplugins)

    Great, thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘stream_set_timeout error filling logs’ is closed to new replies.