If the "Checksum mismatch" error message is returned when you use Tablestore SDK for PHP in Windows, make sure that you use 64-bit PHP 7 or later. We recommend that you use PHP 7 to obtain the optimal performance.
Problem description
The following error message is returned when I use Tablestore SDK for PHP by using PHP 5.6 in Windows:
Fatal error: Uncaught exception 'AliyunOTSOTSClientException' with message 'Checksum mismatch. expected:120,actual:-48'Possible cause
Tablestore uses 64-bit integers. In 32-bit PHP, only the String type can be used to represent 64-bit Integer values. Therefore, Tablestore does not support 32-bit PHP. In Windows, PHP versions earlier than PHP 7 are not actually 64-bit.
Solution
When you use Tablestore SDK for PHP in Windows, make sure that you use 64-bit PHP 7 or later. We recommend that you use PHP 7 to obtain the optimal performance.
You can use phpinfo() to check the value of Architecture in PHP configuration information. This way, you can determine whether your PHP version supports 64-bit integers.
If the value of Architecture is X86, the current PHP version supports only 32-bit integers. You must upgrade your PHP version to 64-bit PHP 7 or later.
If the value of Architecture is X64, the current PHP version supports 64-bit integers and can meet your requirement.