Php uses shmop function to read and write memory data. Garbled (box question mark), urgent ~

when I test the php shared memory function shmop in the local virtual machine, everything is fine. When the test server reads it, the ideal (normal) effect should be an empty string, but in the test server, it is garbled, a string of question marks, and the test server and virtual machine system have the same version of PHP.

the screenshot below is my code. Of course, I commented out shmop_write. This piece writes data to shared memory. It should be an empty string before writing data, and a normal string only after writing data.
another example: for example, if I open up a length of 1000 bytes for shared memory and write 900bytes of data, then when the virtual machine reads the data, it is a normal string with a length of 10000.But on the test server, the read data is a normal 900byte string, followed by a question mark garbled ~

both the test server and the local virtual machine are version 5.5 PHP. My previous virtual machine is php7, which is later changed in order to be consistent with the test server version. The local virtual machine php5.5 version is normal, but the test server 5.5 is still abnormal

.

clipboard.png

clipboard.png

clipboard.png
1000000

:

clipboard.png

Mar.17,2021

you run php-v on the server command line and the current computer executes php-v to see the PHP version, and then we'll talk about it later.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38691-2c125.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38691-2c125.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?