Jump to content

WHMCS admin/client login not working after server transfer


Recommended Posts

My previous Server was working fine. but I need faster server that's why i have upgraded my server. i have transfer my cPanel from old server to new server. 

all are working fine without WHMCS Client Area login and admin login!!! 

when customer trying to logging in they got an error "

Quote

 Invalid CSRF Protection Token"



and why I am trying to login at admin area  i am unable to log in. there are not showing anything any type of error. but i am unable to login! 
home directory , php version all are exact some. still facing this issue. 

note : Previous server was using ea-php72
New server using alt-php72

so please help me out of this situation.

Link to comment
Share on other sites

15 minutes ago, Damo said:

ea- is cPanel PHP, alt- is CloudLinux. Try looking for a .htaccess or php.ini file in the home directory of the account. Rename it to something else and try again.  


here is htaccess for old server.. 

(is there anything wrong with "RewriteOptions inherit"????

 

 

Quote

 

RewriteOptions inherit

### BEGIN - WHMCS managed rules - DO NOT EDIT BETWEEN WHMCS MARKERS ###
<IfModule mod_rewrite.c>
RewriteEngine on

# RewriteBase is set to "/" so rules do not need updating if the
# installation directory is relocated.  It is imperative that
# there is also a RewriteCond rule later that can effectively get
# the actual value by comparison against the request URI.
#
# If there are _any_ other RewriteBase directives in this file,
# the last entry will take precedence!
RewriteBase /

# Redirect directories to an address with slash
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$  $1/ [R]

# Send all remaining (routable paths) through index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Determine and use the actual base
RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
RewriteRule ^.*$ %2index.php [QSA,L]
</IfModule>
### END - WHMCS managed rules - DO NOT EDIT BETWEEN WHMCS MARKERS

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php7_module>
   php_flag display_errors Off
   php_value max_execution_time 10000
   php_value max_input_time 1000
   php_value max_input_vars 3000
   php_value memory_limit 512M
   php_value post_max_size 512M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php72"
   php_value upload_max_filesize 512M
   php_flag zlib.output_compression On
</IfModule>
<IfModule lsapi_module>
   php_flag display_errors Off
   php_value max_execution_time 10000
   php_value max_input_time 1000
   php_value max_input_vars 3000
   php_value memory_limit 512M
   php_value post_max_size 512M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php72"
   php_value upload_max_filesize 512M
   php_flag zlib.output_compression On
</IfModule>
# END cPanel-generated php ini directives, do not edit

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

 


and php ini 


 

Quote

 

; cPanel-generated php ini directives, do not edit
; Manual editing of this file may result in unexpected behavior.
; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
; For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)

display_errors = Off
max_execution_time = 10000
max_input_time = 1000
max_input_vars = 3000
memory_limit = 512M
post_max_size = 512M
session.gc_maxlifetime = 1440
session.save_path = "/var/cpanel/php/sessions/ea-php72"
upload_max_filesize = 512M
zlib.output_compression = On

 


 

so,, is everything seems ok?

 

Link to comment
Share on other sites

  • WHMCS Technical Analyst II

Hi,

Thanks for your post!

I would advise using the session test script here to help determine the issue: https://help.whmcs.com/m/troubleshooting/l/678268-troubleshooting-login-problems#php-session

Assuming you are using WHMCS version 7.7 or above, a potentially quick solution, where the issue relates to PHP session storage on the web server, is to configure WHMCS to leverage database driven sessions: https://docs.whmcs.com/Sessions#Configuration_2

Simply adding the line below to the configuration.php file would do that:

$session_handling = 'database';

 

Link to comment
Share on other sites

19 hours ago, WHMCS Alex said:

Hi,

Thanks for your post!

I would advise using the session test script here to help determine the issue: https://help.whmcs.com/m/troubleshooting/l/678268-troubleshooting-login-problems#php-session

Assuming you are using WHMCS version 7.7 or above, a potentially quick solution, where the issue relates to PHP session storage on the web server, is to configure WHMCS to leverage database driven sessions: https://docs.whmcs.com/Sessions#Configuration_2

Simply adding the line below to the configuration.php file would do that:


$session_handling = 'database';

 

thanks... it's fixed.. but facing some error,,

i tried to fix,,, cron tasks and php session support. not working 😞

Screenshot 2022-06-27 152556.png

Link to comment
Share on other sites

  • 1 month later...

I encountered the similar problem, and after running this test file, I discovered that there are several .htaccess,.user.ini, php.ini,  files in the home directory that were created by cPanel and include incorrect session save path. I corrected the path and saved the file. WHMCS login works fine after that. Check all the .ini files in home directory and public_html

sessiontest.zip

Link to comment
Share on other sites

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