Title: PHP Fatal Error
Last modified: January 16, 2023

---

# PHP Fatal Error

 *  Resolved [JenWebDev](https://wordpress.org/support/users/jenwebdev/)
 * (@jenwebdev)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/php-fatal-error-342/)
 * New website setup with fresh WordFence install. PHP 8.1 on Bluehost. WordPress
   6.1.1 with everything up to date.
 * Server logs showing these repeatedly although it hasn’t crashed the site at this
   point:
 * PHP Warning: fopen(/tmp/phpyTogWh): Failed to open stream: Operation not permitted
   in <path>/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/request.
   php on line 957
 * PHP Fatal error: Uncaught TypeError: fread(): Argument #1 ($stream) must be of
   type resource, bool given in <path>/wp-content/plugins/wordfence/vendor/wordfence/
   wf-waf/src/lib/request.php:958

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

 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-fatal-error-342/#post-16381168)
 * Hi [@jenwebdev](https://wordpress.org/support/users/jenwebdev/), thanks for getting
   in touch.
 * I’ve seen warnings like the initial “Failed to open stream” caused by the need
   to [flush OPCache](https://ma.ttias.be/how-to-clear-php-opcache/) on the server.
   It appears like the two messages are linked so solving the warning may stop the
   fatal error being thrown later. It could also be worth clearing any caching plugins
   you have installed.
 * If that doesn’t seem to help, please drop us a diagnostic report to **wftest @
   wordfence . com** using the link at the top of the **Wordfence > Tools > Diagnostics**
   page, I can look into this further for you. 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 [JenWebDev](https://wordpress.org/support/users/jenwebdev/)
 * (@jenwebdev)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-fatal-error-342/#post-16417561)
 * I have had this happen on multiple sites now, and this fix works every time. 
   Much appreciated!

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

The topic ‘PHP Fatal Error’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [JenWebDev](https://wordpress.org/support/users/jenwebdev/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/php-fatal-error-342/#post-16417561)
 * Status: resolved