tp5项目从windows迁移到centos出现500错误

白糕茶 2017-01-19 10:19:19
在windows下没问题,但是上传到服务器后访问接口出现500错误,在入口文件加入error_reporting(E_ALL);
ini_set('display_errors', '1');代码打印出的错误如下:

<b>Fatal error</b>: Uncaught exception 'think\exception\ErrorException' with message 'error_log(/data/wwwroot/default/1lu8/runtime/log/201701/19.log): failed to open stream: Permission denied' in /data/wwwroot/default/1lu8/thinkphp/library/think/log/driver/File.php:98
Stack trace:
#0 [internal function]: think\Error::appError(2, 'error_log(/data...', '/data/wwwroot/d...', 98, Array)
#1 /data/wwwroot/default/1lu8/thinkphp/library/think/log/driver/File.php(98): error_log('[ 2017-01-19T10...', 3, '/data/wwwroot/d...')
#2 /data/wwwroot/default/1lu8/thinkphp/library/think/Log.php(157): think\log\driver\File->save(Array)
#3 /data/wwwroot/default/1lu8/thinkphp/library/think/Error.php(84): think\Log::save()
#4 [internal function]: think\Error::appShutdown()
#5 {main}
thrown in <b>/data/wwwroot/default/1lu8/thinkphp/library/think/log/driver/File.php</b> on line <b>98</b><br />

求大神帮忙看看怎么解决
...全文
1134 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq_34799907 2017-07-23
  • 打赏
  • 举报
回复
怎么解决的,我现在也遇到这个问题了?
白糕茶 2017-01-19
  • 打赏
  • 举报
回复
引用 3 楼 xuzuning 的回复:
/data/wwwroot/default/1lu8/runtime/log/201701/19.log
谢谢 已经解决了
xuzuning 2017-01-19
  • 打赏
  • 举报
回复
/data/wwwroot/default/1lu8/runtime/log/201701/19.log
白糕茶 2017-01-19
  • 打赏
  • 举报
回复
引用 1 楼 xuzuning 的回复:
failed to open stream: Permission denied :打开流失败:权限被拒绝
是哪个文件的权限问题
xuzuning 2017-01-19
  • 打赏
  • 举报
回复
failed to open stream: Permission denied :打开流失败:权限被拒绝

4,251

社区成员

发帖
与我相关
我的任务
社区描述
国内外优秀PHP框架讨论学习
社区管理员
  • Framework
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧