How to port Weiphp to PHP7.0 instance

小云云
Release: 2023-03-21 09:54:01
Original
1269 people have browsed it

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
Copy after login

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;
Copy after login

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
Copy after login

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)
Copy after login

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!

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template