wrong reason
PHP7.3 version causes
Solution:
1. Change the PHP version
2. Change continue to break
wrong reason
PHP7.3 version causes
Solution:
1. Change the PHP version
2. Change continue to break
wrong reason
PHP7.3 version impact
Solution
1. Change the PHP version
2.
$nullOffset = strpos($url, 0x00 ); // before replacement $nullOffset = strpos($url, chr( 0x00 )); // after replacement
$server = 'emqx server url';
$port = 1883;
$clientId = 'sys_client';
$username = 'test';
$password = '12345678';
$topics='$SYS/brokers/+/clients/#';//Subscription client online and offline
$mqtt = new \PhpMqtt\Client\MqttClient($server, $port, $clientId);
$connectionSettings = (new \PhpMqtt\Client\ConnectionSettings)
->setUsername($username)
->setPassword($password);
$mqtt->connect($connectionSettings, true);
$mqtt->subscribe($topics, function ($topic, $message) {
echo sprintf("Received message on topic [%s]: %s\n", $topic, $message);
}, 0);
$mqtt->loop(true);
$mqtt->disconnect();
Received subscribe acknowledgement with invalid QoS values from the broker.
{allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}.
{allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}.
{deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.
{allow, all}.
$SYS/brokers/+/clients/#
{allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}.
{allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}.
#Specify ip subscription
{allow, {ipaddr, "127.0.0.1"}, subscribe, ["$SYS/brokers/+/clients/#"]}.
#Allow all clients to subscribe
#{allow, all, subscribe, ["$SYS/brokers/+/clients/#"]}.
{deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.
{allow, all}.
Usually this situation is caused by the php extension module not having simplexml installed.
yum install php73-php-simplexml //install simplexml
systemctl restart php73-php-fpm //restart php
If it is another version you can replace 73 accordingly
Then print phpinfo() and see the following module, then the problem is solved
When the APCU extension is installed and PHP FPM is started, an error is reported: Note: PHP message: PHP fatal error: PHP startup: APC_ mmap: mmap failed: in Unknown on line 0
The reason is shm_size setting is too large.
Solution: Just set shm_size to make the size configuration smaller
As follows:
apc.shm_size=1024M
apc.shm_size=1024M
Currently from PHP5 6 when upgrading to PHP 7.4, directly replace the compiled installation package. When entering PHP – V, an error will be reported: error while loading shared libraries: libonig so.5:cannot open share directory
#php -v
#php: error while loading shared libraries: libonig.so.5:cannot open share directory
Solution:
Step 1
Modify /ECT/LD.so.conf and add the following line:
#vim /etc/ld.so.conf
include ls.so.conf.d/*.conf
/usr/local/lib
/usr/local/x264/lib
/usr/local/openssl/lib
/usr/local/python3.7.1/lib
After saving, execute ldconfig
#ldconfig
Step 2:
Install oniguruma lirary
Download:
oniguruma-6.8.2-1.el7.x86_64.rpm
oniguruma-devel-6.8.2-1.el7.x86_64.rpm
Use the following commands to install
#rpm -ivh oniguruma-devel-6.8.2-1.el7.x86_64
#rpm -ivh oniguruma-6.8.2-1.el7.x86_64
Then run the command PHP – V to display it perfectly
In case of installation error
Generating autotools files.
./autogen.sh: line 6: autoreconf: command not found
Solution:
[root@yjweb oniguruma-6.9.4]# yum install autoconf automake libtool
One day, the operator came over and said that it was useless to send the verification code by e-mail. As developers, it was our job to solve the problem.
First, check the error log and immediately find that PHP reported an error:
ErrorException: preg_match(): Compilation failed: invalid range in character class at offset 4
The error content means that the regular validation format is wrong and needs to be modified. However, we found no problems in the previous development and use, but recently.
This made us confused until we found that the PHP version of the server was changed from 7.2 to 7.3!
anger
After the difference, we found the cause of the problem:
Upgrade PHP from 7.2 to PHP 7.3
The writing of regular verification format is not standardized
The solution is also simple:
Upgrade the PHP Version (you can not do it, but it is recommended to keep it unified with the server)
Note whether special characters in regular format are escaped. For example, -
in []
needs to be escaped: \-
Error reason: phpstorm comes with an old or wrong version of vcruntime140.dll
Solution:
Open phpstorm Vcruntime140 exists in C:\program files\JetBrains\phpstorm 2019.3.1\JBR\bin
Then rename the file vcruntime140.dll
is vcruntime140.dll.old
Restart phpstorm
After the website uses Vultr for arrears, it crashes and restarts, and an error occurs:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /www/wwwroot/******.com/wp-content/plugins/header-footer-elementor/inc/class-hfe-settings-page.php on line 422
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /www/wwwroot/******.com/wp-content/plugins/wordpress-seo/lib/model.php on line 1
Analysis: After inspection, it is found that the memory size refers to the php cache, which is judged to be a memory overflow problem.
Solution:
1. Modify the background PHP configuration parameter memory_limit 128M to 80M
2. Service>>>Reload configuration>>>Restart>>>Refresh the browser
Solution:
#1. Edit the file /etc/opt/rh/rh-php72/php-fpm.d/zabbix.con, uncomment and set to the local time zone
vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
#2. Restart PHP after modification (remember)
systemctl restart rh-php72-php-fpm
#3. If you log in again, you won’t report an error