Title: Persistent Uncaught InvalidArgumentException
Last modified: March 4, 2024

---

# Persistent Uncaught InvalidArgumentException

 *  [Rob Watson](https://wordpress.org/support/users/rcwatson/)
 * (@rcwatson)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/persistent-uncaught-invalidargumentexception/)
 * 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/](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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpersistent-uncaught-invalidargumentexception%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/persistent-uncaught-invalidargumentexception/#post-17472464)
 * Hi [@rcwatson](https://wordpress.org/support/users/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](https://www.wordfence.com/wp-content/uploads/2021/09/diagnosticsendbyemail.png)
 * Thanks,
   Peter.
 *  Thread Starter [Rob Watson](https://wordpress.org/support/users/rcwatson/)
 * (@rcwatson)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/persistent-uncaught-invalidargumentexception/#post-17473142)
 * Thanks. I sent the diagnostic just now.
 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/persistent-uncaught-invalidargumentexception/#post-17475961)
 * Hi [@rcwatson](https://wordpress.org/support/users/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](https://wordpress.org/support/users/rcwatson/)
 * (@rcwatson)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/persistent-uncaught-invalidargumentexception/#post-17476029)
 * Thanks. The host is Pantheon.io. On the Live environments of Pantheon, [filesystems are read-only](https://docs.pantheon.io/guides/filesystem/files-directories#write-access-on-environments).
   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](https://docs.pantheon.io/plugins-known-issues#wordfence)
   they have us implement to make a symlink to their separate writable filesystem
   for Wordfence and other plugins with [assumed write access](http://assumed write access).
   Pantheon doesn’t currently have any symlink [workarounds listed in their documentation for the /plugins/wordfence directory](https://docs.pantheon.io/plugins-known-issues#wordfence).
   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](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/persistent-uncaught-invalidargumentexception/#post-17476200)
 * Hi [@rcwatson](https://wordpress.org/support/users/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](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](https://wordpress.org/support/users/rcwatson/)
 * (@rcwatson)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/persistent-uncaught-invalidargumentexception/#post-17476410)
 * Thanks. We do have wordfence-waf.php set up for MySQLi storage. I’ve now removed
   wp-content/wflogs and used [these instructions](https://docs.pantheon.io/plugins-known-issues#how-do-i-confirm-i-am-using-data-storage-with-wordfence)
   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](https://wordpress.org/support/users/rcwatson/)
 * (@rcwatson)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/persistent-uncaught-invalidargumentexception/#post-17483784)
 * Checking in to see if there are any other things we can try here. Thanks.
 *  Thread Starter [Rob Watson](https://wordpress.org/support/users/rcwatson/)
 * (@rcwatson)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/persistent-uncaught-invalidargumentexception/#post-17492369)
 * Hello? Is thread now abandoned?

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

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

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * 8 replies
 * 2 participants
 * Last reply from: [Rob Watson](https://wordpress.org/support/users/rcwatson/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/persistent-uncaught-invalidargumentexception/#post-17492369)
 * Status: not resolved