dongpu1331 2018-12-17 09:39
浏览 163

Symfony 2.8 - Session和Twig的问题

I deployed small app in symfony 2.8 on host without ssh. Copied all files without cache and log, cloned DB. When i go to address: address.com/web/app.php, app show errors:

Warning: SessionHandler::read(): open(/web/clients/www/3/a/8/8/address.com/tmp/sess_9ff0c94b9bd261554814764d051524e0, O_RDWR) failed: No such file or directory (2) in /app/cache/prod/classes.php on line 431

Warning: include(/web/clients/www/3/a/8/8/address.com/vendor/composer/../twig/twig/lib/Twig/Cache/Filesystem.php): failed to open stream: No such file or directory in /vendor/composer/ClassLoader.php on line 444

Warning: include(): Failed opening '/web/clients/www/3/a/8/8/address.com/vendor/composer/../twig/twig/lib/Twig/Cache/Filesystem.php' for inclusion (include_path='.:/opt/httpd-clients/php-7.2.10/lib/php') in /vendor/composer/ClassLoader.php on line 444

Warning: include(/web/clients/www/3/a/8/8/address.com/vendor/composer/../twig/twig/lib/Twig/Cache/Filesystem.php): failed to open stream: No such file or directory in /vendor/composer/ClassLoader.php on line 444

Warning: include(): Failed opening '/web/clients/www/3/a/8/8/address.com/vendor/composer/../twig/twig/lib/Twig/Cache/Filesystem.php' for inclusion (include_path='.:/opt/httpd-clients/php-7.2.10/lib/php') in /vendor/composer/ClassLoader.php on line 444

Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "Twig_Cache_Filesystem" from the global namespace. Did you forget a "use" statement? in /web/clients/www/3/a/8/8/address.com/app/cache/prod/classes.php:3212 
Stack trace: #0 /web/clients/www/3/a/8/8/address.com/app/cache/prod/classes.php(3149): Twig_Environment->setCache('/web/clients/ww...') 
#1 /web/clients/www/3/a/8/8/address.com/app/cache/prod/appProdProjectContainer.php(2476): Twig_Environment->__construct(Object(Symfony\Bundle\TwigBundle\Loader\FilesystemLoader), Array) 
#2 /web/clients/www/3/a/8/8/address.com/app/bootstrap.php.cache(2271): appProdProjectContainer->getTwigService() 
#3 /web/clients/www/3/a/8/8/address.com/app/cache/prod/appProdProjectContainer.php(2505): Symfony\Component\DependencyInjection\Container->get('twig') 
#4 /web/clients/www/3/a/8/8/address.com/app/bootstrap.php.cache(2271): appProdProjectContainer->getTwig_Controller_ExceptionService() 
#5 /web/clients/www/3/a/8/8/address.com/app/cache in /app/cache/prod/classes.php on line 3212

Warning: SessionHandler::write(): open(/web/clients/www/3/a/8/8/address.com/tmp/sess_9ff0c94b9bd261554814764d051524e0, O_RDWR) failed: No such file or directory (2) in /app/cache/prod/classes.php on line 435

Warning: session_write_close(): Failed to write session data using user defined save handler. (session.save_path: /web/clients/www/3/a/8/8/address.com/tmp) in %s%02d on line 0

I add chmod 777 to cache and log dir. Any ideas?

  • 写回答

1条回答 默认 最新

  • doulong2782 2018-12-17 09:44
    关注

    It's a typical permissions issue. You should clear you cache, then add recursively the appropriate permissions like this:

    chmod -R 775 /cache
    
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog