Jump to content

2FA - Admin issue - An error occurred while communicating with the server. Please try again.


bluesteam

Recommended Posts

Hello,

I am unable to use my WHMCS after I moved to a new server.

Before moving to a new server, I forgot to disable the Two-Factor Authentication module.

On the new server, it would not let me log in to WHMCS so I ran the following sql commands on the database:

update tbladmins set authmodule = '' where username = 'admin';
update tbladmins set authdata = '' where username = 'admin';

update tbladmins set authmodule = '' where username = 'admin';
update tbladmins set authdata = '' where username = 'admin';

after this I could log in but now it wants me to re-configure the 2fa so after clicking "Get Started" I see the error: http://prntscr.com/pzhtv5

An error occurred while communicating with the server. Please try again.

Now I cannot proceed past this point because it just fails over and over...

Please can somene shed light on this??

Link to comment
Share on other sites

Thanks Brian

 

I already saw that link and that link instructs me to execute the below sql command on the tblconfiguration:

update tblconfiguration set value='a:3:{s:11:"forceclient";s:0:"";s:10:"forceadmin";s:0:"";s:7:"modules";a:1:{s:6:"yubico";a:2:{s:8:"clientid";s:0:"";s:9:"secretkey";s:0:"";}}}' where setting='2fasettings';

However, that breaks things COMPLETELY because that removed all settings for totp and other two factors platforms.

I am using totp and the above sql statement sets ONLY yubico.

Link to comment
Share on other sites

So on the new server, the SOAP module wasn't enabled.  This was preventing the communication between the server and the token servers.

After I enabled the SOAP module I went through all the modules to make sure that the necessary ones were enabled.

I retested and I was now able to get past the communication error.  However, now the barcode is not rendering.  it's simply not generation.

Any idea??

barcode-not-rendering.png.55428566eb8e9ba22bf0d25ce057cbd0.png

Link to comment
Share on other sites

ok, so the problem was related to the .htaccess file containing the following PHP entries:

Quote

<IfModule php7_module>
   php_flag display_errors On
   php_value max_execution_time 300
   php_value max_input_time 6300
   php_value max_input_vars 5000
   php_value memory_limit 512M
   php_value post_max_size 256M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
   php_value upload_max_filesize 128M
   php_flag zlib.output_compression Off
</IfModule>
<IfModule lsapi_module>
   php_flag display_errors On
   php_value max_execution_time 300 
   php_value max_input_time 6300
   php_value max_input_vars 5000
   php_value memory_limit 512M
   php_value post_max_size 256M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
   php_value upload_max_filesize 128M
   php_flag zlib.output_compression Off
</IfModule>

I removed these and everything worked.  So it's clear the old host used a different PHP setup than the new host.

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated