Alb*_*uel 18 php wamp wampserver dropbox-api dropbox-php
我正在尝试连接到安装了WAMP x64的Dropbox API.
这是我从Dropbox php API获得的Dropbox身份验证文件的例外
致命错误:未捕获异常'Exception',消息'Dropbox SDK使用64位整数,但看起来我们正在运行不支持64位整数的PHP版本(PHP_INT_MAX = 2147483647).库:C:\ Users\Albert\Desktop\www\test\dropbox-sdk\Dropbox\RequestUtil.php中的"C:\ Users\Albert\Desktop\www\test\dropbox -sdk\Dropbox\RequestUtil.php"'在第15行
它说,我检查了我的PHP版本
架构x64
我应该怎么做才能使我的Dropbox应用程序工作?非常感谢.
小智 48
只需注释\ 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__ . "\"");
}
Run Code Online (Sandbox Code Playgroud)
ste*_*ven 11
似乎Windows不支持64位整数:
如何在PHP上使用64位整数? (第二个答案)
请注意,Windows上的PHP根本不支持64位整数,即使硬件和PHP都是64位...
也许您应该在Windows机器上配置一个带有64位debian版本的linux-vm.无论如何,我认为它是使用VM而不是在Windows上安装WAMP的最佳实践.它稳定,独立,便携,您无需处理Windows特定问题.