部署 CI 框架遇到的坑
2016-12-17 本文已影响701人
7c03aed0f01f
- session 需要写入权限,否则执行不了,没有权限造成的错误
**Warning**: Uncaught Exception:
Session: Configured save path '/apps/aaa/application/cache' is not writable by the PHP process. in
/apps/aiyouFinance/system/libraries/Session/drivers/Session_files_driver.php:125 Stack trace:
#0 [internal function]: CI_Session_files_driver->open('/apps/aaa...', 'ci_session')
#1 /apps/aiyouFinance/system/libraries/Session/Session.php(141): session_start()
#2 /apps/aiyouFinance/system/core/Loader.php(1292): CI_Session->__construct()
#3 /apps/aiyouFinance/system/core/Loader.php(1185): CI_Loader->_ci_init_library('Session', 'CI_', NULL, 'session')
#4 /apps/aiyouFinance/system/core/Loader.php(1048): CI_Loader->_ci_load_stock_library('Session', 'Session/', NULL, NULL)
#5 /apps/aiyouFinance/system/core/Loader.php(1093): CI_Loader->_ci_load_library('Session', NULL, NULL)
#6 /apps/aiyouFinance/system/core/Loader.php(218): CI_Loader->_ci_load_library('Session', NULL, NULL)
#7 /apps/aiyouFinance/system/core/Loader.php(202): CI_Loader->library('session', NULL)
#8 /apps/aiyouFinance/sys in **/apps/aiyouFinance/system/libraries/Session/drivers/Session_files_driver.php** on line **125****Fatal error**: session_start(): Failed to initialize storage module: user (path: /apps/aiyouFinance/application/cache) in **/apps/aiyouFinance/system/libraries/Session/Session.php** on line **141**A PHP Error was encountered
Severity: Error
Message: session_start(): Failed to initialize storage module: user (path: /apps/aiyouFinance/application/cache)
Filename: Session/Session.php
Line Number: 141
Backtrace:
解决方案
chmod -R 777 /apps/aaa