error 404 Posted June 25, 2022 Share Posted June 25, 2022 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. 0 Quote Link to comment Share on other sites More sharing options...
Damo Posted June 25, 2022 Share Posted June 25, 2022 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. 0 Quote Link to comment Share on other sites More sharing options...
error 404 Posted June 25, 2022 Author Share Posted June 25, 2022 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? 0 Quote Link to comment Share on other sites More sharing options...
Damo Posted June 25, 2022 Share Posted June 25, 2022 There are references to ea- in both. So yes there is something wrong. Rename them like I suggested and try again. 0 Quote Link to comment Share on other sites More sharing options...
error 404 Posted June 25, 2022 Author Share Posted June 25, 2022 4 hours ago, Damo said: There are references to ea- in both. So yes there is something wrong. Rename them like I suggested and try again. already tried! not working 💔 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst III WHMCS Alex Posted June 26, 2022 WHMCS Technical Analyst III Share Posted June 26, 2022 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'; 0 Quote Link to comment Share on other sites More sharing options...
error 404 Posted June 27, 2022 Author Share Posted June 27, 2022 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 😞 0 Quote Link to comment Share on other sites More sharing options...
error 404 Posted June 27, 2022 Author Share Posted June 27, 2022 i have fixed some issue, but still have some issue... 0 Quote Link to comment Share on other sites More sharing options...
error 404 Posted June 27, 2022 Author Share Posted June 27, 2022 thank you,, i have fixed almost all.. but having this issue... i have tried. but not working ... 0 Quote Link to comment Share on other sites More sharing options...
yohanecs Posted August 6, 2022 Share Posted August 6, 2022 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 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.