标签 php 下的文章

官方Discuz是不支持mysql的innodb的,所以安装到innodb数据库时,会有两个表run_sql_error(pre_common_member_grouppm,pre_forum_post),Error:Incorrect table definition; there can be only one auto column and it must be defined as a key

解决办法:

  1. 解压官方软件包,将根目录下的upload下的所有内容,复制到站点根目录下
  2. 然后修改./install/data目录下的install.sql(提取码:6tnc),支持innodb(注意,仅供测试研究,不做风险担保)
  3. 访问https://站点名称/install/,正常安装即可

 

because its MIME type ('text/html') is not executable, and strict MIME type checking is enable

该句的含义是:因为页面返回的mime类型是text/html,所以不可执行,而且浏览器开启了mime类型检测

问题场景:我的php站点开启了https,设置了严格的header策略;当web首页登录时,调用的php验证码函数返回类型未设置mime type,所以验证码显示异常。

解决办法:在返回函数部分添加@header("content-type: text/javascript; charset=utf-8");

站点登录页验证码显示正常。