Home >Backend Development >PHP Tutorial >How to port Weiphp to PHP7.0 instance

How to port Weiphp to PHP7.0 instance

小云云
小云云Original
2018-03-13 11:31:251288browse

This article mainly shares with you how Weiphp transplants PHP7.0 instances, hoping to help everyone.

The first pit

Call to undefined function Think\simplexml_load_string()

The problem with simplexml expansion package, you need to install the expansion package

sudo apt-get install php7.0-xml

Second Pitfall

_STORAGE_WRITE_ERROR_:./Runtime/Cache/Install

It is a problem with path permissions. You need to set the directory permissions to be writable. This error is caused by creating the Runtime directory without writable permissions

The third pit

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

The reason for this error is that the sql_mode is added to the only_full_group_by configuration by default in the mysql database, resulting in the inability to use group by to query.

Use the following command to query sql_mode in the mysql terminal:

select @@sql_mode;

To modify sql_mode, add the following content to the configuration file /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

The modified query result is:

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)

Related recommendations:

weiphp WeChat development tutorial message board plug-in development details

weiphpWeChat public platform authorization setting

An error occurred when running weiphp

The above is the detailed content of How to port Weiphp to PHP7.0 instance. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn