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.
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__ . "\"");
}
it seems to be the case that Windows doesn't support 64bit integers:
how to have 64 bit integer on PHP? (second answer)
Note that PHP on Windows does not support 64-bit integers at all, even if both the hardware and PHP are 64-bit...
Maybe you should configure a linux-vm with for example a 64bit debian version on your windows machine. I think its anyway the best practice to work with a VM instead of installing WAMP on windows. Its stable, independent, portable and you don't have to deal with windows specific issues.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With