1. 程式人生 > >nginx搭建php程式報錯解決---TP框架

nginx搭建php程式報錯解決---TP框架

1、TP框架中 出現如下錯誤:     

訪問網站 http://192.168.0.204/

STORAGE_WRITE_ERROR_:./Runtime/Cache/Home/51620d75af91aa77adc53082d1113d54.php
錯誤位置
FILE: /www/wwwroot/default/ThinkPHP/Library/Think/Storage/Driver/File.class.php  LINE: 47

TRACE
#0 /www/wwwroot/default/ThinkPHP/Library/Think/Storage/Driver/File.class.php(47): E('_STORAGE_WRITE_...')
#1 [internal function]: Think\Storage\Driver\File->put('./Runtime/Cache...', ' #2 /www/wwwroot/default/ThinkPHP/Library/Think/Storage.class.php(42): call_user_func_array(Array, Array)
#3 /www/wwwroot/default/ThinkPHP/Library/Think/Template.class.php(110): Think\Storage::__callstatic('put', Array)
#4 /www/wwwroot/default/ThinkPHP/Library/Think/Template.class.php(76): Think\Template->loadTemplate('/www/wwwroot/de...', '')
#5 /www/wwwroot/default/ThinkPHP/Library/Behavior/ParseTemplateBehavior.class.php(32): Think\Template->fetch('/www/wwwroot/de...', Array, '')
#6 /www/wwwroot/default/ThinkPHP/Library/Think/Hook.class.php(123): Behavior\ParseTemplateBehavior->run(Array)
#7 /www/wwwroot/default/ThinkPHP/Library/Think/Hook.class.php(89): Think\Hook::exec('Behavior\\ParseT...', 'run', Array)
#8 /www/wwwroot/default/ThinkPHP/Library/Think/View.class.php(123): Think\Hook::listen('view_parse', Array)
#9 /www/wwwroot/default/ThinkPHP/Library/Think/View.class.php(72): Think\View->fetch('/www/wwwroot/de...', '', '')
#10 /www/wwwroot/default/ThinkPHP/Library/Think/Controller.class.php(56): Think\View->display('/www/wwwroot/de...', '', '', '', '')
#11 /www/wwwroot/default/ThinkPHP/Library/Think/Controller.class.php(290): Think\Controller->display('/www/wwwroot/de...')
#12 /www/wwwroot/default/ThinkPHP/Library/Think/Controller.class.php(187): Think\Controller->dispatchJump('\xE7\xAB\x99\xE7\x82\xB9\xE5\xB7\xB2\xE7\xBB\x8F\xE5\x85\xB3...', 0, '', false)
#13 /www/wwwroot/default/Application/Home/Controller/HomeController.class.php(31): Think\Controller->error('\xE7\xAB\x99\xE7\x82\xB9\xE5\xB7\xB2\xE7\xBB\x8F\xE5\x85\xB3...')
#14 /www/wwwroot/default/ThinkPHP/Library/Think/Controller.class.php(41): Home\Controller\HomeController->_initialize()
#15 /www/wwwroot/default/ThinkPHP/Common/functions.php(535): Think\Controller->__construct()
#16 /www/wwwroot/default/ThinkPHP/Library/Think/App.class.php(79): A('Index')
#17 /www/wwwroot/default/ThinkPHP/Library/Think/App.class.php(181): Think\App::exec()
#18 /www/wwwroot/default/ThinkPHP/Library/Think/Think.class.php(117): Think\App::run()
#19 /www/wwwroot/default/ThinkPHP/ThinkPHP.php(94): Think\Think::start()
#20 /www/wwwroot/default/index.php(34): require('/www/wwwroot/de...')
#21 {main}

 

解決:出現這樣原因是因為 Runtime 許可權不夠   

 chmod 777 Runtime  即可