0

This is my current magento 2 website http://jamesviana.online/

enter image description here Above is the error I have installed a new paid theme which have been installed the backend is working while in the frontend the js not been taken.

I have tried to deploy the magento 2 cli commands in php bin/magento static:content:deploy but no use.

While indexing it shows this error

Warning: SessionHandler::read(): open(/var/www/magento2/var/session/sess_69186e4b7bf9a9b00a807cc1452a452d, O_RDWR) failed: No such file or directory (2) in /var/sites/j/jamesviana.online/public_html/vendor/magento/framework/Session/SaveHandler/Native.php on line 22
Fatal error: Uncaught exception 'Exception' with message 'Warning: SessionHandler::write(): open(/var/www/magento2/var/session/sess_69186e4b7bf9a9b00a807cc1452a452d, O_RDWR) failed: No such file or directory (2) in /var/sites/j/jamesviana.online/public_html/vendor/magento/framework/Session/SaveHandler.php on line 105' in /var/sites/j/jamesviana.online/public_html/vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'SessionHandler:...', '/var/sites/j/ja...', 105, Array)
#1 /var/sites/j/jamesviana.online/public_html/vendor/magento/framework/Session/SaveHandler.php(105): SessionHandler->write('69186e4b7bf9a9b...', 'adminhtml|a:0:{...')
#2 [internal function]: Magento\Framework\Session\SaveHandler->write('69186e4b7bf9a9b...', 'adminhtml|a:0:{...')
#3 {main}
  thrown in /var/sites/j/jamesviana.online/public_html/vendor/magento/framework/App/ErrorHandler.php on line 61

I have given 777 permission for all folders I have tried with this cli command also

php -dmemory_limit=80G bin/magento setup:static-content:deploy

Issue remains. In my local system with the same version and with the paid theme which is working good. only in my live server it have been showing this issue can anyone give a better solution to solve this it will be very helpful.

7
  • whats the mode ? is it production or developer on the server ? also removed all var pub/static folder and then try to run setup:di:compille and static-content:deploy give permisson 777 to var directory and then check Feb 11 '17 at 7:32
  • @Manthan DaveI have tried everything what you said from the first itself but the issue remains any other ideas?
    – Sri
    Feb 15 '17 at 6:59
  • can you check your console ? and post the screenshot what error it shows ? Feb 15 '17 at 7:09
  • @Manthan Dave I have already mentioned the error in my question itself I have attached the screenshot of the frontend view the error what I am facing is shown in the code view in my question itself
    – Sri
    Feb 15 '17 at 7:19
  • Not any js error are seen in your above site, please let you know when error are coming? Feb 15 '17 at 7:20
1

Run following 2 commands, I am sure issue will be resolved:

  1. php bin/magento setup:upgrade
  2. php bin/magento setup:di:compile
0

I think your local server is running on windows(maybe Xampp or Wamp server) and your live server is running on Linux(maybe Ubuntu or Center-OS). Linux has complex permission rule and mage 2 has a critical spot on it.

After run the cli commands and check permissions of all assets(js, css & images).

0

Follow this steps:

  1. sudo bin/magento setup:upgrade

  2. remove MagentoRoot/var/ folder

  3. sudo bin/magento setup:di:compile

  4. remove pub/static

  5. sudo bin/magento setup:static-content:deploy

  6. sudo bin/magento cache:clean

  7. sudo bin/magento cache:flush

  8. remove browser cache

then check.

0

Remove all files from pub/static and var use command

rm -rf -R pub/static *
rm -rf -R var *

use following command to generate new files

php bin/magento setup:static-content:deploy

now provide permission to these files

chmod -R 755 pub/static var
0

Sometimes js are not loaded because of missing .htaccess in var/pub/static folder. Just check .htaccess file exists or not in hidden files also.

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.