您好,欢迎访问一九零五行业门户网

weiphp如何移植PHP7.0实例

本文主要和大家分享weiphp如何移植php7.0实例,希望能帮助到大家。第一个坑call to undefined function think\simplexml_load_string()
simplexml扩展包的问题,需要安装扩展包
sudo apt-get install php7.0-xml
第二个坑_storage_write_error_:./runtime/cache/install
路径权限的问题,需要设置跟目录权限可写,这个错误是由于创建runtime目录没有可写权限造成
第三个坑sqlstate[42000]: syntax error or access violation: 1055 expression #1 of select list is not in group by clause and contains nonaggregated column 'wp_db.wp_material_news.id' which is not functionally dependent on columns in group by clause; this is incompatible with sql_mode=only_full_group_by
出现这个错误的原因是mysql数据库里面默认将sql_mode增加了 only_full_group_by 的配置,导致无法使用group by来查询。
使用如下命令在mysql的终端中查询sql_mode:
select @@sql_mode;
修改sql_mode是在配置文件 /etc/mysql/mysql.conf.d/mysqld.cnf 中增加如下内容
sql_mode=strict_trans_tables,no_zero_in_date,no_zero_date,error_for_pision_by_zero,no_auto_create_user,no_engine_substitution
修改后查询结果为:
mysql> select @@sql_mode; +------------------------------------------------------------------------------------------------------------------------+ | @@sql_mode | +------------------------------------------------------------------------------------------------------------------------+ | strict_trans_tables,no_zero_in_date,no_zero_date,error_for_pision_by_zero,no_auto_create_user,no_engine_substitution | +------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)
相关推荐:
weiphp微信开发教程留言板插件开发详解
weiphp微信公众平台授权设置
运行weiphp的时候发生错误
以上就是weiphp如何移植php7.0实例的详细内容。
其它类似信息

推荐信息