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}

解决:出现这样原因是因为 源码包所在的目录权限不够

源码包放在了  /www/wwwroot/default/

[root@bogon ~]# ls /www/wwwroot/default/

Addons Application doc favicon.ico info.php Public ThinkPHP wx
api Data errpage index.php pma_6a8f9f27 Runtime Uploads
[root@bogon ~]# cd /www/wwwroot/
[root@bogon wwwroot]# chmod -R 777 default/

2、浏览器访问总是出现站点已关闭

场景: 之前把公司线上的php源码包拿到笔记本的虚拟机上测试部署,部署完成后通过浏览器访问总是出现站点已关闭

原因:把线上php程序配置文件config.php里面的数据库连接信息改成了笔记本虚拟机的数据库连接信息,所有报错

解决:把config.php里面的数据库连接信息 重新改回来即可,就是说拿来线上的php程序里面的数据库信息不要动

[root@bogon conf.d]# vi /www/wwwroot/default/Application/Common/Conf/config.php

/* 数据库配置 */
'DB_TYPE' => 'mysqli', // 数据库类型
'DB_HOST' => 'rf-wz91fw8763zf022573fo.mysql.rds.aliyuncs.com', // 服务器地址
'DB_NAME' => 'ayziyun', // 数据库名
'DB_USER' => 'ayziyun', // 用户名
'DB_PWD' => 'ki8uyYUUU_lknh', // 密码
'DB_PORT' => '3306', // 端口
'DB_PREFIX' => 't_', // 数据库表前缀
'DB_CHARSET'=> 'utf8mb4',

部署php程序报错解决---TP框架的更多相关文章

  1. 部署php程序报错:站点已关闭

    场景: 之前把公司线上的php源码包拿到笔记本的虚拟机上测试部署,部署完成后通过浏览器访问总是出现站点已关闭 原因:把线上php程序配置文件config.php里面的数据库连接信息改成了笔记本虚拟机的 ...

  2. IIS7部署ASP.NET MVC4程序报错解决

    今天安装了windows7 开发web项目需要安装IIS,当安装完以后,web程序已经映射到了本地IIS上,运行出现如下错误提示 处理程序“PageHandlerFactory-Integrated” ...

  3. python pyinstaller 打包程序报错解决

    python打包exe,各种入坑 一.安装PyInstaller 1.安装pywin32 pip命令安装:pip install pywin32(推荐) 2.安装Pyinstaller pip命令安装 ...

  4. 小程序-报错 xxx is not defined (已解决)

    小程序-报错 xxx is not defined (已解决) 问题情境: 这样一段代码,微信的小程序报错 is not defined 我 wxml 想这样调用 //wxml 代码 <view ...

  5. (报错解决)Exception encountered during context initialization

    转: (报错解决)Exception encountered during context initialization 关键词 JavaEE JavaWeb eclipse XML AspectJ ...

  6. CentOS 6.5 Maven 编译 Apache Tez 0.8.3 踩坑/报错解决记录

    最近准备学习使用Tez,因此从官网下载了最新的Tez 0.8.3源码,按照安装教程编译使用.平时使用的集群环境是离线的,本打算这一次也进行离线编译,无奈一编译就开始报缺少jar包的错,即使手动下载ja ...

  7. 记录微信小程序报错 Unexpected end of JSON input;at pages/flow/checkout page getOrderData function

    微信小程序报错 Unexpected end of JSON input;at pages/flow/checkout page getOrderData function 这个报错是在将数组对象通过 ...

  8. MyEclipse Server view报错解决方法

    MyEclipse Server view报错解决方法 方法/步骤     启动MyEclipse,弹出一个框,报错. ---------------------------------------- ...

  9. 单点登录(五)-----遇到问题-----cas server 源码部署tomcat运行报错BeanCreationException:Error creating bean with name 's

    我们在上一篇文章已经解决了把下载好的cas server源码部署到tomcat缺少子项目编辑文件或者jar包导致找不到class报错的问题 单点登录(四)-----遇到问题-----cas serve ...

随机推荐

  1. springboot中使用servlet时返回结果乱码问题

    在总的配置文件:application.properties中做一个配置,把我的问题解决了. #编码格式 spring.http.encoding.force=true spring.http.enc ...

  2. 小程序UI设计(6)-布局分解-九宫格

    今天我们来个庖丁解牛.对于一个完整的组合组件,看看通过工具是如何轻松完成的.首先看看九宫格完整的样子. 结构树是这样的.在结构树中,我们可以看到WViewColumn下面有九个WViewRow.WVi ...

  3. 树形DP Choosing Capital for Treeland

    给你一棵有向树,需要选定一个点为capital,满足翻转边数最小 思路:先求出1为capital 的答案,然后向下更新孩子节点 dp[i]=dp[i-1]+judge(i); #include< ...

  4. cmd命令行显示中文乱码

    cmd命令行显示中文乱码多数是由于字符编码不匹配导致. 1.查看cmd编码方式 方法一.打开cmd,输入chcp命令回车(显示默认编码:活动代码页:936指GBK) 方法二.打开cmd在标题栏单击鼠标 ...

  5. 什么叫AOP(面向切面编程)?

    spring的AOP面向切面编程,实现在不改变代码的情况下完成对方法的增强.比较常用的就是spring的声明式事务管理,底层通过AOP实现,避免了我们每次都要手动开启事物,提交事务的重复性代码,使得开 ...

  6. 简单加密 DEncrypt

    /// <summary> /// Encrypt 的摘要说明. /// </summary> public class DEncrypt { /// <summary& ...

  7. HDU 6438 Buy and Resell ( 2018 CCPC 网络赛 && 贪心 )

    题目链接 题意 : 给出一些数.你可以从左到右对这些数进行三种操作花费 Ai 买入东西.以 Ai 价格卖出你当前有的东西.或者什么都不做.现在问你可以获取的最大利益是多少? 分析 : 和 CF 867 ...

  8. hdu 1208 Ignatius and the Princess III 划分数,dp

    题目 题意:给你一个数字n,求将其划分成若干个数字相加总共有多少种划分数: <span style="font-size:24px;">#include <ios ...

  9. 【杂题】[CodeForces 1172F] Nauuo and Bug【数据结构】【线段树】

    Description 给出一个长度为n的序列a和一个整数p 有m组询问,每组询问给出一个区间\([l,r]\) 你需要给出下面这个过程的结果 ans = 0 for i from l to r { ...

  10. [POI2011]DYN-Dynamite

    题目链接:Click here Solution: 直接做似乎不太可行,我们考虑二分 我们设\(f[x]\)表示以\(x\)为根的子树中选择了的节点到\(x\)的距离的最小值,初值为\(inf\) \ ...