nginx搭建php程序报错解决---TP框架

Posted effortsing

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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]: ThinkStorageDriverFile->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): ThinkStorage::__callstatic(‘put‘, Array)
#4 /www/wwwroot/default/ThinkPHP/Library/Think/Template.class.php(76): ThinkTemplate->loadTemplate(‘/www/wwwroot/de...‘, ‘‘)
#5 /www/wwwroot/default/ThinkPHP/Library/Behavior/ParseTemplateBehavior.class.php(32): ThinkTemplate->fetch(‘/www/wwwroot/de...‘, Array, ‘‘)
#6 /www/wwwroot/default/ThinkPHP/Library/Think/Hook.class.php(123): BehaviorParseTemplateBehavior->run(Array)
#7 /www/wwwroot/default/ThinkPHP/Library/Think/Hook.class.php(89): ThinkHook::exec(‘Behavior\ParseT...‘, ‘run‘, Array)
#8 /www/wwwroot/default/ThinkPHP/Library/Think/View.class.php(123): ThinkHook::listen(‘view_parse‘, Array)
#9 /www/wwwroot/default/ThinkPHP/Library/Think/View.class.php(72): ThinkView->fetch(‘/www/wwwroot/de...‘, ‘‘, ‘‘)
#10 /www/wwwroot/default/ThinkPHP/Library/Think/Controller.class.php(56): ThinkView->display(‘/www/wwwroot/de...‘, ‘‘, ‘‘, ‘‘, ‘‘)
#11 /www/wwwroot/default/ThinkPHP/Library/Think/Controller.class.php(290): ThinkController->display(‘/www/wwwroot/de...‘)
#12 /www/wwwroot/default/ThinkPHP/Library/Think/Controller.class.php(187): ThinkController->dispatchJump(‘xE7xABx99xE7x82xB9xE5xB7xB2xE7xBBx8FxE5x85xB3...‘, 0, ‘‘, false)
#13 /www/wwwroot/default/Application/Home/Controller/HomeController.class.php(31): ThinkController->error(‘xE7xABx99xE7x82xB9xE5xB7xB2xE7xBBx8FxE5x85xB3...‘)
#14 /www/wwwroot/default/ThinkPHP/Library/Think/Controller.class.php(41): HomeControllerHomeController->_initialize()
#15 /www/wwwroot/default/ThinkPHP/Common/functions.php(535): ThinkController->__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): ThinkApp::exec()
#18 /www/wwwroot/default/ThinkPHP/Library/Think/Think.class.php(117): ThinkApp::run()
#19 /www/wwwroot/default/ThinkPHP/ThinkPHP.php(94): ThinkThink::start()
#20 /www/wwwroot/default/index.php(34): require(‘/www/wwwroot/de...‘)
#21 {main}

 

解决:出现这样原因是因为 Runtime 权限不够   

 chmod 777 Runtime  即可

 
























以上是关于nginx搭建php程序报错解决---TP框架的主要内容,如果未能解决你的问题,请参考以下文章

nginx解析PHP程序报错的解决方案

Nginx+PHP框架laravel状态码500错误解决!

tp5 的nginx配置

nginx服务器中若php项目的url带参数则报错

用phpstudy 2016搭建环境访问thinkphp出现403 急!!!

tp5框架composer安装验证码报错