Hi,
I have a magento on a server, and decided to download a copy to a local server using xampp, which I am going to use while making some modifications to magento.
the problem is that after I downloaded the copy and imported the database, I ran the:
php bin/magento setup:upgrade
php bin/magento indexer:reindex
but I am still getting an error, which I never had before. does anyone know what it means and how to fix it?
There has been an error processing your request Warning: SessionHandler::read(): open(/var/cpanel/php/sessions/ea-php71\sess_8vcl0uulsglk43pkh6ij055859, O_RDWR) failed: No such file or directory (2) in C:\xampp\htdocs\vendor\magento\framework\Session\SaveHandler\Native.php on line 22
Solved! Go to Solution.
As you have already done this - session.save_handler = files
You also need to check below parameters in php.ini
session.save_path = "var/www/magento2/var/session" // value should be your magento2 root directory/var/session
Also you need to Edit env.php file:
'session' => array ( 'save' => 'files', 'save_path' => '/var/www/magento2/var/session', ),
As you are moving site from production environment to local so in env.php you need to pass files in session and var/session as path
Then check it will works for you !
Hi @robertbits
As per my knowledge this is known issue , when your session.save_handler PHP parameter is set to some another session storage instead of files !
open your php.ini file - find session.save_handler - uncomment it by removing # and add value as files , like this : session.save_handler : files
For more reference refer this link - https://devdocs.magento.com/guides/v2.2/install-gde/trouble/php/tshoot_session.html
It will works for you !
@Manthan Dave Thanks for your response.
I checked the setting in php.ini and noticed that it was already set as "session.save_handler : files"
I commented the option and checked what happens - same error.
so with or without that option, I am getting the same error.
I am still wondering what the solution is for this problem. as @Manthan Dave said, I have checked the php.ini and session.save_handler=files is enabled.
but I am still stuck and cannot use my magento. now I am uploading the error file that is being generated with the error, maybe there will be someone that can help with this since I cannot figure out what can I do.
Just to explain, I am using xampp on windows and I imported magento from a backup to test on it.
after the import I run the following commands, as how I normally do:
php bin/magento setup:upgrade php bin/magento indexer:reindex php bin/magento cache:flush
then when tried to load page I get the error:
{"0":"Warning: SessionHandler::read(): open(\/var\/cpanel\/php\/sessions\/ea-php71\\sess_22t8fm36o66macktki261omi91, O_RDWR) failed: No such file or directory (2) in C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\Session\\SaveHandler\\Native.php on line 22","1":"#0 [internal function]: Magento\\Framework\\App\\ErrorHandler->handler(2, 'SessionHandler:...', 'C:\\\\xampp\\\\htdocs...', 22, Array)\n#1 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\Session\\SaveHandler\\Native.php(22): SessionHandler->read('22t8fm36o66mack...')\n#2 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\Session\\SaveHandler.php(93): Magento\\Framework\\Session\\SaveHandler\\Native->read('22t8fm36o66mack...')\n#3 [internal function]: Magento\\Framework\\Session\\SaveHandler->read('22t8fm36o66mack...')\n#4 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\Session\\SessionManager.php(189): session_start()\n#5 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\Interception\\Interceptor.php(58): Magento\\Framework\\Session\\SessionManager->start()\n#6 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\Interception\\Interceptor.php(138): Magento\\Framework\\Session\\Generic\\Interceptor->___callParent('start', Array)\n#7 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\Interception\\Interceptor.php(153): Magento\\Framework\\Session\\Generic\\Interceptor->Magento\\Framework\\Interception\\{closure}()\n#8 C:\\xampp\\htdocs\\magento\\generated\\code\\Magento\\Framework\\Session\\Generic\\Interceptor.php(52): Magento\\Framework\\Session\\Generic\\Interceptor->___callPlugins('start', Array, Array)\n#9 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\Session\\SessionManager.php(130): Magento\\Framework\\Session\\Generic\\Interceptor->start()\n#10 C:\\xampp\\htdocs\\magento\\generated\\code\\Magento\\Framework\\Session\\Generic\\Interceptor.php(14): Magento\\Framework\\Session\\SessionManager->__construct(Object(Magento\\Framework\\App\\Request\\Http), Object(Magento\\Framework\\Session\\SidResolver\\Proxy), Object(Magento\\Framework\\Session\\Config), Object(Magento\\Framework\\Session\\SaveHandler), Object(Magento\\Framework\\Session\\Validator), Object(Magento\\Framework\\Session\\Storage), Object(Magento\\Framework\\Stdlib\\Cookie\\PhpCookieManager), Object(Magento\\Framework\\Stdlib\\Cookie\\CookieMetadataFactory), Object(Magento\\Framework\\App\\State))\n#11 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\Factory\\AbstractFactory.php(111): Magento\\Framework\\Session\\Generic\\Interceptor->__construct(Object(Magento\\Framework\\App\\Request\\Http), Object(Magento\\Framework\\Session\\SidResolver\\Proxy), Object(Magento\\Framework\\Session\\Config), Object(Magento\\Framework\\Session\\SaveHandler), Object(Magento\\Framework\\Session\\Validator), Object(Magento\\Framework\\Session\\Storage), Object(Magento\\Framework\\Stdlib\\Cookie\\PhpCookieManager), Object(Magento\\Framework\\Stdlib\\Cookie\\CookieMetadataFactory), Object(Magento\\Framework\\App\\State))\n#12 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\Factory\\Dynamic\\Developer.php(66): Magento\\Framework\\ObjectManager\\Factory\\AbstractFactory->createObject('Magento\\\\Framewo...', Array)\n#13 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\ObjectManager.php(70): Magento\\Framework\\ObjectManager\\Factory\\Dynamic\\Developer->create('Magento\\\\Framewo...')\n#14 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\Factory\\AbstractFactory.php(144): Magento\\Framework\\ObjectManager\\ObjectManager->get('Magento\\\\Framewo...')\n#15 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\Factory\\AbstractFactory.php(230): Magento\\Framework\\ObjectManager\\Factory\\AbstractFactory->resolveArgument(Array, 'Magento\\\\Framewo...', NULL, 'session', 'Magento\\\\Store\\\\A...')\n#16 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\Factory\\Dynamic\\Developer.php(34): Magento\\Framework\\ObjectManager\\Factory\\AbstractFactory->resolveArgumentsInRuntime('Magento\\\\Store\\\\A...', Array, Array)\n#17 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\Factory\\Dynamic\\Developer.php(59): Magento\\Framework\\ObjectManager\\Factory\\Dynamic\\Developer->_resolveArguments('Magento\\\\Store\\\\A...', Array, Array)\n#18 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\ObjectManager.php(70): Magento\\Framework\\ObjectManager\\Factory\\Dynamic\\Developer->create('Magento\\\\Store\\\\A...')\n#19 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\Factory\\AbstractFactory.php(144): Magento\\Framework\\ObjectManager\\ObjectManager->get('Magento\\\\Store\\\\A...')\n#20 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\Factory\\AbstractFactory.php(230): Magento\\Framework\\ObjectManager\\Factory\\AbstractFactory->resolveArgument(Array, 'Magento\\\\Framewo...', NULL, 'redirect', 'Magento\\\\Framewo...')\n#21 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\Factory\\Dynamic\\Developer.php(34): Magento\\Framework\\ObjectManager\\Factory\\AbstractFactory->resolveArgumentsInRuntime('Magento\\\\Framewo...', Array, Array)\n#22 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\Factory\\Dynamic\\Developer.php(59): Magento\\Framework\\ObjectManager\\Factory\\Dynamic\\Developer->_resolveArguments('Magento\\\\Framewo...', Array, Array)\n#23 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\ObjectManager.php(70): Magento\\Framework\\ObjectManager\\Factory\\Dynamic\\Developer->create('Magento\\\\Framewo...')\n#24 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\Factory\\AbstractFactory.php(144): Magento\\Framework\\ObjectManager\\ObjectManager->get('Magento\\\\Framewo...')\n#25 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\Factory\\AbstractFactory.php(230): Magento\\Framework\\ObjectManager\\Factory\\AbstractFactory->resolveArgument(Array, 'Magento\\\\Framewo...', NULL, 'context', 'Magento\\\\Cms\\\\Con...')\n#26 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\Factory\\Dynamic\\Developer.php(34): Magento\\Framework\\ObjectManager\\Factory\\AbstractFactory->resolveArgumentsInRuntime('Magento\\\\Cms\\\\Con...', Array, Array)\n#27 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\Factory\\Dynamic\\Developer.php(59): Magento\\Framework\\ObjectManager\\Factory\\Dynamic\\Developer->_resolveArguments('Magento\\\\Cms\\\\Con...', Array, Array)\n#28 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\ObjectManager\\ObjectManager.php(56): Magento\\Framework\\ObjectManager\\Factory\\Dynamic\\Developer->create('Magento\\\\Cms\\\\Con...', Array)\n#29 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\App\\ActionFactory.php(40): Magento\\Framework\\ObjectManager\\ObjectManager->create('Magento\\\\Cms\\\\Con...')\n#30 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\App\\Router\\Base.php(297): Magento\\Framework\\App\\ActionFactory->create('Magento\\\\Cms\\\\Con...')\n#31 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\App\\Router\\Base.php(158): Magento\\Framework\\App\\Router\\Base->matchAction(Object(Magento\\Framework\\App\\Request\\Http), Array)\n#32 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\App\\FrontController.php(50): Magento\\Framework\\App\\Router\\Base->match(Object(Magento\\Framework\\App\\Request\\Http))\n#33 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\Interception\\Interceptor.php(58): Magento\\Framework\\App\\FrontController->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#34 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\Interception\\Interceptor.php(138): Magento\\Framework\\App\\FrontController\\Interceptor->___callParent('dispatch', Array)\n#35 C:\\xampp\\htdocs\\magento\\vendor\\magento\\module-store\\App\\FrontController\\Plugin\\RequestPreprocessor.php(94): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#36 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\Interception\\Interceptor.php(135): Magento\\Store\\App\\FrontController\\Plugin\\RequestPreprocessor->aroundDispatch(Object(Magento\\Framework\\App\\FrontController\\Interceptor), Object(Closure), Object(Magento\\Framework\\App\\Request\\Http))\n#37 C:\\xampp\\htdocs\\magento\\app\\code\\Amasty\\InvisibleCaptcha\\Plugin\\Predispatch.php(77): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#38 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\Interception\\Interceptor.php(135): Amasty\\InvisibleCaptcha\\Plugin\\Predispatch->aroundDispatch(Object(Magento\\Framework\\App\\FrontController\\Interceptor), Object(Closure), Object(Magento\\Framework\\App\\Request\\Http))\n#39 C:\\xampp\\htdocs\\magento\\vendor\\magento\\module-page-cache\\Model\\App\\FrontController\\BuiltinPlugin.php(73): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#40 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\Interception\\Interceptor.php(135): Magento\\PageCache\\Model\\App\\FrontController\\BuiltinPlugin->aroundDispatch(Object(Magento\\Framework\\App\\FrontController\\Interceptor), Object(Closure), Object(Magento\\Framework\\App\\Request\\Http))\n#41 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\Interception\\Interceptor.php(153): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#42 C:\\xampp\\htdocs\\magento\\generated\\code\\Magento\\Framework\\App\\FrontController\\Interceptor.php(26): Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins('dispatch', Array, NULL)\n#43 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\App\\Http.php(135): Magento\\Framework\\App\\FrontController\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#44 C:\\xampp\\htdocs\\magento\\generated\\code\\Magento\\Framework\\App\\Http\\Interceptor.php(24): Magento\\Framework\\App\\Http->launch()\n#45 C:\\xampp\\htdocs\\magento\\vendor\\magento\\framework\\App\\Bootstrap.php(256): Magento\\Framework\\App\\Http\\Interceptor->launch()\n#46 C:\\xampp\\htdocs\\magento\\index.php(39): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http\\Interceptor))\n#47 {main}","url":"\/magento\/","script_name":"\/magento\/index.php"}
As you have already done this - session.save_handler = files
You also need to check below parameters in php.ini
session.save_path = "var/www/magento2/var/session" // value should be your magento2 root directory/var/session
Also you need to Edit env.php file:
'session' => array ( 'save' => 'files', 'save_path' => '/var/www/magento2/var/session', ),
As you are moving site from production environment to local so in env.php you need to pass files in session and var/session as path
Then check it will works for you !
Thanks a lot for your help @Manthan Dave without you could not have solved this problem.
Just for the records and for others, apart from the php.ini and env.php I had to also modify the session.save_path in .htaccess & .user.ini found in the root of magento installation.
Hi @robertbits
Thanks for sharing the details , Glad to know that you have resolved your issue.
Happy to help and keep helping
Here is also this article on how to fix "There has been an error processing your request" issue in Magento 2. I am sure, you'll find the solution there.