环境要求:
1.
系统: Linux CentOS 6.5或其他皆可
数据库:MySQL 5.4以上
PHP环境:版本5.5以上
端口:apache或nginx外网80端口
注:1. php环境需要支持安装dom组件 2.请提供配置服务器出口ip地址(配置白名单,实际应用中遇到过访问的ip和服务器出去的ip不一致)。
MySQL需要支持group by
问题1 如下 环境mysql,group by报ERROR 1055(42000)错误!
解决:
环境:
mysql版本5.7.18-log
查询:
group by
报错信息:
ERROR 1055 (42000): Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘s.type_name’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
解决方案:
打开/etc/my.cnf配置文件
在[mysqld]下面加上
sql_mode
=’STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION’;
重启mysql服务,再次执行sql语句,完美解决了!
问题2:
php常见错误Call to undefined function dom_import_simplexml()
答:配置环境的时候未安装上php的dom扩展