Title: Fatal error: Uncaught TypeError: fwrite()
Last modified: July 30, 2021

---

# Fatal error: Uncaught TypeError: fwrite()

 *  Resolved [k0paua](https://wordpress.org/support/users/k0paua/)
 * (@k0paua)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-fwrite/)
 * Error trace:
 *     ```
       PHP Fatal error:  Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool given in /home/629262.cloudwaysapps.com/bdyuxhggma/public_html/wp-content/plugins/really-simple-ssl/lets-encrypt/class-letsencrypt-handler.php:1172
       Stack trace:
       #0 /home/629262.cloudwaysapps.com/bdyuxhggma/public_html/wp-content/plugins/really-simple-ssl/lets-encrypt/class-letsencrypt-handler.php(1172): fwrite()
       #1 /home/629262.cloudwaysapps.com/bdyuxhggma/public_html/wp-content/plugins/really-simple-ssl/lets-encrypt/class-letsencrypt-handler.php(1320): rsssl_letsencrypt_handler->directory_has_writing_permissions()
       #2 /home/629262.cloudwaysapps.com/bdyuxhggma/public_html/wp-content/plugins/really-simple-ssl/lets-encrypt/class-letsencrypt-handler.php(42): rsssl_letsencrypt_handler->key_directory()
       #3 /home/629262.cloudwaysapps.com/bdyuxhggma/public_html/wp-content/plugins/really-simple-ssl/lets-encrypt/letsencrypt.php(66): rsssl_letsencrypt_handler->__construct()
       #4 /home/629262.cloudwaysapps.com/bdyuxhggma/public_html/wp-content/plugins/really-simple-ssl/lets-encrypt/letsencrypt.php(103): RSSSL_LETSENCRYPT::instance()
       #5 /home/629262.cloudwaysapps.com/bdyuxhggma/public_html/wp-includes/class-wp-hook.php(303): RSSSL_LE()
       #6 /home/629262.cloudwaysapps.com/bdyuxhggma/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
       #7 /home/629262.cloudwaysapps.com/bdyuxhggma/public_html/wp-includes/plugin.php(470): WP_Hook->do_action()
       #8 /home/629262.cloudwaysapps.com/bdyuxhggma/public_html/wp-settings.php(441): do_action()
       #9 /home/629262.cloudwaysapps.com/bdyuxhggma/public_html/wp-config.php(98): require_once('/home/629262.cl...')
       #10 /home/629262.cloudwaysapps.com/bdyuxhggma/public_html/wp-load.php(50): require_once('/home/629262.cl...')
       #11 /home/629262.cloudwaysapps.com/bdyuxhggma/public_html/wp-cron.php(44): require_once('/home/629262.cl...')
       #12 {main}
         thrown in /home/629262.cloudwaysapps.com/bdyuxhggma/public_html/wp-content/plugins/really-simple-ssl/lets-encrypt/class-letsencrypt-handler.php on line 1172
       ```
   
 * php8,wp5.8,really-simple-ssl5.0.5
 * In fact, we don’t need the functionality associated with the lets-encrypt certificate.
   Is it possible to disable it at all?

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

 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-fwrite/#post-14718685)
 * [@k0paua](https://wordpress.org/support/users/k0paua/),
 * This function should not run if you’re not running the Let’s Encrypt generation.
 * We’ll investigate and get back to you with a fix.
 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-fwrite/#post-14718728)
 * [@k0paua](https://wordpress.org/support/users/k0paua/) I’ve noticed that a cron
   job may run the lets encrypt class, even if the certificate is not generated 
   by Really Simple SSL. This is now fixed here:
 * [https://github.com/Really-Simple-Plugins/really-simple-ssl](https://github.com/Really-Simple-Plugins/really-simple-ssl)
 * Let me know if this resolves your issue!
 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-fwrite/#post-14719088)
 * This fix has just been released. This code should not run anymore on your system,
   as you’re not using Let’s Encrypt.
 *  Thread Starter [k0paua](https://wordpress.org/support/users/k0paua/)
 * (@k0paua)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-fwrite/#post-14719716)
 * Confirm that error disappeared after updating to 5.0.6.
    Thanks!
 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-fwrite/#post-14719965)
 * [@k0paua](https://wordpress.org/support/users/k0paua/) thanks for confirming!
 *  [rodrigolampugnani](https://wordpress.org/support/users/rodrigolampugnani/)
 * (@rodrigolampugnani)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-fwrite/#post-14720601)
 * Great, problem solved!

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

The topic ‘Fatal error: Uncaught TypeError: fwrite()’ is closed to new replies.

 * ![](https://ps.w.org/really-simple-ssl/assets/icon-256x256.png?rev=2839720)
 * [Really Simple Security - Simple and Performant Security (formerly Really Simple SSL)](https://wordpress.org/plugins/really-simple-ssl/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/really-simple-ssl/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/really-simple-ssl/)
 * [Active Topics](https://wordpress.org/support/plugin/really-simple-ssl/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/really-simple-ssl/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/really-simple-ssl/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [rodrigolampugnani](https://wordpress.org/support/users/rodrigolampugnani/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-fwrite/#post-14720601)
 * Status: resolved