1

Fresh Install of Magento 2.2.2 on Centos (Plesk) with Apache 2.4, php 7.0.2 + all modules, mariaDb 10.1.

Magento Installation was done via browser wizard -> readyness check-> everything was ok. When I try to login to the Magento Admin Page "Your current session has been expired." is always showing.

I am running Magento 2.1.7 on this Server and had the same problem. But I solved this problem by changing one line of Timezone.php (shown in here https://github.com/magento/magento2/issues/5383). However with Magento 2.2.2 this solution does not work anymore.

Any Ideas how to solve this ?

Ps: Already cleared cache folders and cache via cli.

When I run "php -v" via SSH --> php 7.0.27 is shown

I configured Php 7 (via Plesk) for scripts on my domain "/opt/plesk/php/7.0/bin/php -v" --> shows php 7

BUT phpMyAdmin (login to mariaDB) shows this (php 5.6.30): enter image description here

Maybe this is causing the error ?

3
  • Find path admin/security/session_lifetime in core_config_data table
  • If it's present then set its value to 86400
  • If that path is not present then add it with value 86400
    INSERT INTO `core_config_data` (`scope`, `scope_id`, `path`, `value`)
    VALUES ('default', 0, 'admin/security/session_lifetime', '86400');

After that, refresh Magento cache:

php bin/magento cache:clean
1

Try clearing your cache and login to admin.

rm -rf var/cache/*

rm -rf var/page_cache/*

php bin/magento cache:flush

0

I had enabled Magento Profiler before by adding 'SetEnv MAGE_PROFILER "html"' to my .htaccess. After removing this line again, the error stopped and I can access the admin page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.