Wordfence critical error

I have 22 sites connected with MainWP. If I go to Extensions, Wordfence and click any of the shields, I get a message that there has been a critical error on the website and I can’t see the scan results.

Any thoughts? Thank you in advance!

I got an email with these details:

An error of type E_ERROR was caused in line 598 of the file /home1/manage/public_html/wp-content/plugins/mainwp-wordfence-extension/class/mainwp-wordfence-config.class.php. Error message: Uncaught TypeError: unserialize(): Argument #1 ($data) must be of type string, array given in /home1/manage/public_html/wp-content/plugins/mainwp-wordfence-extension/class/mainwp-wordfence-config.class.php:598
Stack trace:
#0 /home1/manage/public_html/wp-content/plugins/mainwp-wordfence-extension/class/mainwp-wordfence-config.class.php(598): unserialize()
#1 /home1/manage/public_html/wp-content/plugins/mainwp-wordfence-extension/libs/wfPersistenceController.php(15): MainWP_Wordfence_Config::get_ser()
#2 /home1/manage/public_html/wp-content/plugins/mainwp-wordfence-extension/libs/wfPersistenceController.php(9): MainWP_wfPersistenceController->__construct()
#3 /home1/manage/public_html/wp-content/plugins/mainwp-wordfence-extension/views/scanner/scan-progress-detailed.php(24): MainWP_wfPersistenceController::shared()
#4 /home1/manage/public_html/wp-content/plugins/mainwp-wordfence-extension/libs/wfView.php(62): include('/home1/manage/p...')
#5 /home1/manage/public_html/wp-content/plugins/mainwp-wordfence-extension/class/mainwp-wordfence-log.class.php(81): MainWP_wfView->render()
#6 /home1/manage/public_html/wp-content/plugins/mainwp-wordfence-extension/class/mainwp-wordfence.class.php(832): MainWP_Wordfence_Log::gen_result_tab()
#7 /home1/manage/public_html/wp-includes/class-wp-hook.php(303): MainWP_Wordfence::render_general_tabs()
#8 /home1/manage/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
#9 /home1/manage/public_html/wp-includes/plugin.php(470): WP_Hook->do_action()
#10 /home1/manage/public_html/wp-content/plugins/mainwp/class/class-mainwp-manage-sites-view.php(745): do_action()
#11 /home1/manage/public_html/wp-content/plugins/mainwp/pages/page-mainwp-manage-sites.php(1063): MainWP\Dashboard\MainWP_Manage_Sites_View::render_scan_site()
#12 /home1/manage/public_html/wp-content/plugins/mainwp/pages/page-mainwp-manage-sites.php(1235): MainWP\Dashboard\MainWP_Manage_Sites::render_scan_site()
#13 /home1/manage/public_html/wp-includes/class-wp-hook.php(303): MainWP\Dashboard\MainWP_Manage_Sites::render_manage_sites()
#14 /home1/manage/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
#15 /home1/manage/public_html/wp-includes/plugin.php(470): WP_Hook->do_action()
#16 /home1/manage/public_html/wp-admin/admin.php(259): do_action()
#17 {main}

Can you please post the community system report from your MainWP Dashboard for review? The report is located in your Dashboard under Status → Server, on the top right of the page.

Be sure to use the button like the one below; this button hides all your private information:

image

Pressing the button auto-copies the report to your clipboard then just paste it in a reply here.

In doing this, I ended up changing my version of PHP (from 8.0 to 7.4) and it seems to work now!


### Server Info                    Required                                               Detected                                     Status   ###

MainWP Dashboard                   
MainWP Dashboard Version           4.1.11                                                 4.1.11                                       Pass        
MainWP Upload Directory            Writable                                               Writable                                     Pass        
MainWP Extensions                  
Advanced Uptime Monitor Extension  5.2.2                                                  API License Active                           Pass        
MainWP White Label Extension       4.1.1                                                  API License Active                           Pass        
MainWP Code Snippets Extension     4.0.1                                                  API License Active                           Pass        
MainWP Comments Extension          4.0.3                                                  API License Active                           Pass        
MainWP Custom Dashboard Extension  4.0.2                                                  API License Active                           Pass        
MainWP Custom Post Type            4.0.3                                                  API License Active                           Pass        
MainWP Favorites Extension         4.0.8                                                  API License Active                           Pass        
MainWP Google Analytics Extension  4.0.4                                                  API License Active                           Pass        
MainWP Lighthouse Extension        4.0                                                    API License Active                           Pass        
MainWP Maintenance Extension       4.1.1                                                  API License Active                           Pass        
MainWP Pro Reports Extension       4.0.7                                                  API License Active                           Pass        
MainWP Rocket Extension            4.0.3                                                  API License Active                           Pass        
MainWP Sucuri Extension            4.0.9                                                  API License Active                           Pass        
MainWP UpdraftPlus Extension       4.0.5                                                  API License Active                           Pass        
MainWP URL Extractor Extension     4.0.1.1                                                API License Active                           Pass        
MainWP Virusdie Extension          4.0.0-beta5                                            API License Active                           Pass        
MainWP Wordfence Extension         4.0.5                                                  API License Active                           Pass        
WordPress                          
WordPress Version                  >=3.6                                                  5.8.3                                        Pass        
WordPress Memory Limit             >=64M                                                  40M                                          Warning     
MultiSite Disabled                 =true                                                  true                                         Pass        
FileSystem Method                  = direct                                               direct                                       Pass        
PHP                                
PHP Version                        >=7.0                                                  7.4.27                                       Pass        
PHP Safe Mode Disabled             =true                                                  true                                         Pass        
PHP Max Execution Time             >=30 seconds                                           30                                           Pass        
PHP Max Input Time                 >=30 seconds                                           -1                                           Pass        
PHP Memory Limit                   >=128M                                                 256M                                         Pass        
PCRE Backtracking Limit            >=10000                                                1000000                                      Pass        
PHP Upload Max Filesize            >=2M                                                   32M                                          Pass        
PHP Post Max Size                  >=2M                                                   32M                                          Pass        
SSL Extension Enabled              =true                                                  true                                         Pass        
SSL Warnings                       = empty                                                                                             Pass        
cURL Extension Enabled             =true                                                  true                                         Pass        
cURL Timeout                       >=300 seconds                                          60                                           Warning     
cURL Version                       >=7.18.1                                               7.71.0                                       Pass        
cURL SSL Version                   >=OpenSSL/1.1.0                                        OpenSSL/1.1.1d                               Pass        
PHP Allow URL fopen                YES                                                    
PHP Exif Support                   YES ( V7.4.)                                           
PHP IPTC Support                   YES                                                    
PHP XML Support                    YES                                                    
PHP Disabled Functions             No functions disabled.                                 
PHP Loaded Extensions              Core, PDO, Phar, Reflection, SPL, SimpleXML, bcmath, bz2, calendar, ctype, curl, date, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imagick, imap, intl, json, libxml, litespeed, mbstring, mysqli, mysqlnd, openssl, pcntl, pcre, pdo_mysql, pdo_sqlite, posix, readline, session, shmop, soap, sockets, sqlite3, standard, tidy, timezonedb, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib
MySQL                              
MySQL Version                      >=5.0                                                  10.3.32-MariaDB-cll-lve                      Pass        
MySQL Mode                         NOT SET                                                
MySQL Client Encoding              utf8                                                   
Server Info                        
Server Software                    LiteSpeed                                              
Operating System                   Linux                                                  
Architecture                       64		 bit                                               
Server Protocol                    HTTP/1.1                                               
HTTPS                              ON                                                     
Server self connect                Response Test O.K.                                     
User Agent                         Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:95.0) Gecko/20100101 Firefox/95.0
Gateway Interface                                                                         
Memory Usage                       62.53 MB                                               
Request Time                       1642208415                                             
Accept Content                     text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Charset Content             N/A                                                    
MainWP Settings                    
Number Of Child Sites              22                                                     
Use WP-Cron                        No                                                     
Optimize for Shared Hosting or Big NetworksNo                                                     
Automatic Daily Update             Install trusted updates                                
Abandoned Plugins/Themes Tolerance 365                                                    
Maximum number of posts to return                                                         
Maximum number of pages to return  50                                                     
Maximum Number of Comments                                                                
Primary Backup System              Default MainWP Backups                                 
Maximum simultaneous requests      4                                                      
Minimum delay between requests     200                                                    
Maximum simultaneous requests per ip1                                                      
Minimum delay between requests to the same ip1000                                                   
Maximum simultaneous sync requests                                                        
Maximum simultaneous install and update requests                                                       
Active Plugins                     
Mail logging - WP Mail Catcher     1.5.4                                                  Active                                       
MainWP Dashboard                   4.1.11                                                 Active                                       
MainWP Lighthouse Extension        4.0                                                    Active                                       
Wordfence Security                 7.5.7                                                  Active                                       
WP Mail SMTP                       3.2.1                                                  Active                                       

@renemorozowich Ohh Ok good find! I can confirm that this is the case with PHP8 enabled.

I will mark this as something that we need to look into with PHP8.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.