• I’m looking for a solution to seeing multiple “PHP Fatal error: Uncaught InvalidArgumentException:wfWAFAttackDataStorageFileEngine::unpackMicrotime $binary expected to be string with length of 8, received string of length 0” errors in the php-error.log file.

    I found and tried all the suggestions in this thread: https://wordpress.org/support/topic/critical-uncaught-invalidargumentexception/

    But it’s still happening.

    The WF Diagnostics show that filesystems are writable. We are seeing files being written correctly up to the current moment.

    We’ve tried using the filesystem as well as the MySQLi storage engine, but the error persists. What else can we try?

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @rcwatson, sorry to see you’re still experiencing that issue after trying the other thread’s suggestions.

    I notice in that case we may have had to look at a diagnostic from the customer if the suggestions didn’t help, so I would say we should go straight to that first. Send it to wftest @ wordfence . com directly from the link at the top of the Wordfence > Tools > Diagnostics page. Then click on “Send Report by Email”. Please add your forum username where indicated and respond here after you have sent it.

    NOTE: It should look as follows – Screenshot of Tools > Diagnostic > Send by Email

    Thanks,
    Peter.

    Thread Starter Rob Watson

    (@rcwatson)

    Thanks. I sent the diagnostic just now.

    Plugin Support wfpeter

    (@wfpeter)

    Hi @rcwatson,

    The most immediate thing I see is that writing to /plugins/wordfence is reporting “FAIL”. The solution to this can be as simple as changing file permissions on your WordPress directory (and all files & folders within) to 755 with an owner of www-data. If that doesn’t work, I’d consider reaching out to your host or server administrator to check whether you are able to make changes to permissions on the plugins directory.

    I can start looking in a different area if the problem persists after reporting “OK” on this check.

    Let us know how you get on,
    Peter.

    Thread Starter Rob Watson

    (@rcwatson)

    Thanks. The host is Pantheon.io. On the Live environments of Pantheon, filesystems are read-only. We don’t have root access to Pantheon-managed containers, so we can’t just go in and change things to writeable. We’ve done all the workarounds they have us implement to make a symlink to their separate writable filesystem for Wordfence and other plugins with assumed write access. Pantheon doesn’t currently have any symlink workarounds listed in their documentation for the /plugins/wordfence directory. Can you let me know which file(s) and directory(ies) need to be writeable in /plugins/wordfence and I’ll create symlinks for those. I’ll also have them update their documentation so that others don’t have this issue in the future.

    Plugin Support wfpeter

    (@wfpeter)

    Hi @rcwatson, I apologize, I didn’t spot Pantheon was the host before my question.

    Pantheon themselves, and other cases I’ve seen with the same issue as above have mentioned the following page you’ve no doubt already seen: https://docs.pantheon.io/plugins-known-issues#wordfence

    The specific error you’re seeing is generally from having wp-content/wflogs/ files that are incomplete. Our usual advice is switching to the MySQLi engine (as in the above link, and as you’ve already mentioned trying). Could you confirm you used the method highlighted in the Pantheon docs? Also, does the error subside if you try removing the wflogs folder after switching to MySQLi? The symlinks are mentioned in the Pantheon docs so I’d imagine their instructions already consider this situation.

    Naturally I’m happy to look further into your diagnostic with the team if nothing seems to be working.

    Let me know what you find out,
    Peter.

    Thread Starter Rob Watson

    (@rcwatson)

    Thanks. We do have wordfence-waf.php set up for MySQLi storage. I’ve now removed wp-content/wflogs and used these instructions to look up whether it’s using MySQLi, but it still says “file system” for the Active WAF storage engine. Also, the filesystem checks for whether the web server can read/write ~/wp-content/wflogs is, predictably, saying “No files readable” and “no files writeable”. Now I’m also getting the error “Unable to open /code/wp-content/wflogs/ips.php for reading and writing.” in the php-error.log. But, the error that initiated this thread has not reappeared in the short time I’ve done this and have visited the site repeatedly. It could appear later, but for now, it’s gone. What should I try next to make sure that MySQLi is working and so I don’t get “Unable to open /code/wp-content/wflogs/ips.php for reading and writing.” in the php-error.log?

    Thread Starter Rob Watson

    (@rcwatson)

    Checking in to see if there are any other things we can try here. Thanks.

    Thread Starter Rob Watson

    (@rcwatson)

    Hello? Is thread now abandoned?

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Persistent Uncaught InvalidArgumentException’ is closed to new replies.