phpwampwampserverdropbox-apidropbox-php

PHP x64 not supported x64 integer.. (Wamp & dropbox API)


I am trying to connect to the Dropbox API with WAMP x64 installed.

This is the exception from the Dropbox authentication file that I got from this Dropbox php API

Fatal error: Uncaught exception 'Exception' with message 'The Dropbox SDK uses 64-bit integers, but it looks like we're running on a version of PHP that doesn't support 64-bit integers (PHP_INT_MAX=2147483647). Library: "C:\Users\Albert\Desktop\www\test\dropbox-sdk\Dropbox\RequestUtil.php"' in C:\Users\Albert\Desktop\www\test\dropbox-sdk\Dropbox\RequestUtil.php on line 15

and I checked my PHP version, it says

Architecture x64

What should I do to get my Dropbox application to work? Thanks a lot.


Solution

  • Just comment the following line in \lib\Dropbox\RequestUtil.php(line.no : 19)

    if (strlen((string) PHP_INT_MAX) < 19) {
    //    // Looks like we're running on a 32-bit build of PHP.  This could cause problems because some of the numbers
    //    // we use (file sizes, quota, etc) can be larger than 32-bit ints can handle.
       throw new \Exception("The Dropbox SDK uses 64-bit integers, but it looks like we're running on a version of PHP that doesn't support 64-bit integers (PHP_INT_MAX=" . ((string) PHP_INT_MAX) . ").  Library: \"" . __FILE__ . "\"");
    }