All Products
Search
Document Center

Tablestore:What do I do if the "Checksum mismatch" error message is returned when I use Tablestore SDK for PHP?

Last Updated:Apr 29, 2026

If you see a "Checksum mismatch" error when using Tablestore SDK for PHP on Windows, you are likely running a PHP version earlier than PHP 7, which is effectively 32-bit on Windows. Upgrade to 64-bit PHP 7 or later to resolve the issue.

Problem description

The following error is thrown when running Tablestore SDK for PHP on Windows with PHP 5.6:

Fatal error: Uncaught exception 'AliyunOTSOTSClientException' with message 'Checksum mismatch. expected:120,actual:-48'

Cause

This is a known PHP ecosystem limitation, not an SDK bug. Tablestore uses 64-bit integers internally. On a 32-bit platform — meaning the combination of CPU, OS, web server, and PHP binary — PHP can only represent 64-bit integers as strings, which causes the checksum calculation to produce incorrect results.

On Windows, PHP versions earlier than PHP 7 are not truly 64-bit, even if the underlying OS is 64-bit.

Solution

Warning: Tablestore does not support 32-bit PHP. On Windows, this means PHP versions earlier than PHP 7 are not supported.

Upgrade to 64-bit PHP 7 or later. We recommend PHP 7 for optimal performance. To verify your current PHP architecture, run phpinfo() and check the Architecture field in the output:

  • Architecture: X86 — your PHP is 32-bit. Upgrade to 64-bit PHP 7 or later.

  • Architecture: X64 — your PHP already supports 64-bit integers. The issue lies elsewhere.