WHAT TO DO: login functionality doesn't works?

Discuss everything related to ApPHP Durecty CMF. All versions. Any questions related to the Directy CMF developing or using should be posted to this forum.

Moderators: ne_moj, alexmst, zewa, vadimako, ne_moj, alexmst, zewa, vadimako

administrator
Site Admin
Site Admin
Posts: 5992
Joined: Jan 7th, '09, 23:18
Contact:

WHAT TO DO: login functionality doesn't works?

Postby administrator » Jun 17th, '17, 15:12

If you check login in "users" module or on admin panel and it doesn't work, even if you enter valid username and password.
the one of possible problems may be a CSRF validation.

To make sure the problem in it, simply open your protected/config/main.php file and disable CSRF protection by:

Code: Select all

'validation' => array(
    'csrf' => array('enable' => FALSE, 'exclude' => array('PaymentProviders')),
    'bruteforce' => array('enable' => true, 'badLogins' => 5, 'redirectDelay' => 3)
),


If now login functionality is working - the reason was CSRF.

Check if you have missing files from any types: click F12 on your browser and check console panel.
If you see that your script has missing files, open .htaccess file and check it's removed from exclusion of rewrite rules:

Code: Select all

# Exclude images from rewriting rules
RewriteCond %{REQUEST_URI} !(\.gif|\.jpg|\.jpeg|\.png|\.bmp)$ [NC]
# Exclude fonts from rewriting rules
RewriteCond %{REQUEST_URI} !(\.eot|\.woff|\.woff2|\.svg)$ [NC]
# Exclude css files from rewriting rules
RewriteCond %{REQUEST_URI} !(\.css)$ [NC]
# Exclude Javascript files from rewriting rules
RewriteCond %{REQUEST_URI} !(\.js)$ [NC]


If not - add it manually to the list of these exclusions.

Return to “ApPHP Directy CMF {developers/users}”