Title: PHP 8 causes WP Error
Last modified: April 22, 2022

---

# PHP 8 causes WP Error

 *  Resolved [juliedaq](https://wordpress.org/support/users/juliedaq/)
 * (@juliedaq)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-8-causes-wp-error/)
 * When using this plugin and switching to PHP8, we get an error that requires us
   to login to WordPress in safe mode and either deactivate the plugin or roll back
   our PHP version.

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

 *  Thread Starter [juliedaq](https://wordpress.org/support/users/juliedaq/)
 * (@juliedaq)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-8-causes-wp-error/#post-15582111)
 * Screenshot of error message: [https://zwdrive.com/DwXAp1](https://zwdrive.com/DwXAp1)
 *  [Jon](https://wordpress.org/support/users/jvalcq/)
 * (@jvalcq)
 * [4 years ago](https://wordpress.org/support/topic/php-8-causes-wp-error/#post-15609511)
 * I can also confirm this issue on PHP 8.0, rolling back corrects the issue when
   logging in.
 *  Plugin Author [osama.esh](https://wordpress.org/support/users/osamaesh/)
 * (@osamaesh)
 * [4 years ago](https://wordpress.org/support/topic/php-8-causes-wp-error/#post-15615169)
 * hello,
    Kindly update to the latest version and try again
 *  [meppyman](https://wordpress.org/support/users/meppyman/)
 * (@meppyman)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php-8-causes-wp-error/#post-15792216)
 * We are also getting this. It’s transient, as we can load the admin screen upon
   refresh, but it’s not ideal.
 * Running version 3.6
 *  Plugin Author [osama.esh](https://wordpress.org/support/users/osamaesh/)
 * (@osamaesh)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php-8-causes-wp-error/#post-15792220)
 * Thanks for letting us know,
    we will check and back to you soon
 *  [tymonello](https://wordpress.org/support/users/tymonello/)
 * (@tymonello)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-8-causes-wp-error/#post-16015667)
 * I also have encountered this issue when moving my website do docker. I have docker
   containers with PHP 8.1.10 and I got this error:
    Szczegóły błędu ===========
   ======== Błąd typu E_ERROR został spowodowany w linii 85 pliku /var/www/html/
   wp-content/plugins/all-404-redirect-to-homepage/all-404-redirect-to-homepage.
   php. Komunikat błędu: Uncaught TypeError: fread(): Argument #1 ($stream) must
   be of type resource, bool given in /var/www/html/wp-content/plugins/all-404-redirect-
   to-homepage/all-404-redirect-to-homepage.php:85 Stack trace: #0 /var/www/html/
   wp-content/plugins/all-404-redirect-to-homepage/all-404-redirect-to-homepage.
   php(85): fread(false, 261) #1 /var/www/html/wp-content/plugins/all-404-redirect-
   to-homepage/all-404-redirect-to-homepage.php(102): p404_check_default_permalink()#
   2 /var/www/html/wp-includes/class-wp-hook.php(307): p404_header_code(”) #3 /var/
   www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)#
   4 /var/www/html/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #5 /var/
   www/html/wp-admin/admin-header.php(163): do_action(‘admin_head’) #6 /var/www/
   html/wp-admin/index.php(137): require_once(‘/var/www/html/w…’) #7 {main} thrown
 *  Plugin Author [osama.esh](https://wordpress.org/support/users/osamaesh/)
 * (@osamaesh)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-8-causes-wp-error/#post-16030542)
 * hello,
    thank you for using our plugins,
 * please make sure that the .htaccess file permission is correct (it should be 
   755)
 * The error means that the plugin unable to read the file!
 * Thanks for your, we are looking forward to hearing from you!

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

The topic ‘PHP 8 causes WP Error’ is closed to new replies.

 * ![](https://ps.w.org/all-404-redirect-to-homepage/assets/icon-256x256.png?rev
   =1515215)
 * [All 404 Redirect to Homepage](https://wordpress.org/plugins/all-404-redirect-to-homepage/)
 * [Support Threads](https://wordpress.org/support/plugin/all-404-redirect-to-homepage/)
 * [Active Topics](https://wordpress.org/support/plugin/all-404-redirect-to-homepage/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-404-redirect-to-homepage/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-404-redirect-to-homepage/reviews/)

 * 8 replies
 * 5 participants
 * Last reply from: [osama.esh](https://wordpress.org/support/users/osamaesh/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/php-8-causes-wp-error/#post-16030542)
 * Status: resolved