We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function actionTest($fileName) { $auth = new Auth(QINIU_ACCESS_KEY, QINIU_SECRET_KEY); $bucketMgr = new BucketManager($auth); return $bucketMgr->stat($this->bucket, $fileName); }
Error: Call to undefined method Qiniu\Config::getRsHostV2() in /workspace/project/src/vendor/qiniu/php-sdk/src/Qiniu/Storage/BucketManager.php:1019 Stack trace: #0 /workspace/project/src/vendor/qiniu/php-sdk/src/Qiniu/Storage/BucketManager.php(608): Qiniu\Storage\BucketManager->rsGet('project-private-...', '/stat/xxxxx...') #1 /workspace/project/src/backend/components/Qiniu.php(135): Qiniu\Storage\BucketManager->stat('project-private-...', '\xE6\x9C\x83\xE5\x93\xA1\xE5\xB0\x8E\xE5\x87\xBA_20...') #2 /workspace/project/src/backend/utils/ExcelUtil.php(336): backend\components\Qiniu->test('\xE6\x9C\x83\xE5\x93\xA1\xE5\xB0\x8E\xE5\x87\xBA_20...') 之后还有,但是不方便展示
麻烦帮忙看下
The text was updated successfully, but these errors were encountered:
@jeanli-mai
您好,久等了,未能复现。
具体代码:
use Qiniu\Auth; use Qiniu\Storage\BucketManager; $accessKey = getenv('QINIU_ACCESS_KEY'); $secretKey = getenv('QINIU_SECRET_KEY'); $bucket = getenv('QINIU_TEST_BUCKET'); $key = "qiniu.mp4"; $auth = new Auth($accessKey, $secretKey); $bucketMgr = new BucketManager($auth); list($ret, $err) = $bucketMgr->stat($bucket, $key); if ($err != null) { var_dump($err); } else { var_dump($ret); }
输出为:
array(6) { ["fsize"]=> int(25538648) ["hash"]=> string(28) "lhsawSRA9-0L8b0s-cXmojaMhGqn" ["md5"]=> string(32) "3e3a14fd770889162c4c5b94b7994cae" ["mimeType"]=> string(9) "video/mp4" ["putTime"]=> int(16735803257165241) ["type"]=> int(0) }
针对您的错误信息,可以看下 var_dump($bucketMgr); 的输出中是否有 ["config":"Qiniu\Storage\BucketManager":private]=>object(Qiniu\Config)
var_dump($bucketMgr);
["config":"Qiniu\Storage\BucketManager":private]=>object(Qiniu\Config)
另外,试下手动实例化一个 Config?
+ use Qiniu\Config; ... + $config = new Config(); - $bucketMgr = new BucketManager($auth); + $bucketManager = new BucketManager($auth, $config);
Sorry, something went wrong.
已解决,原因是 PHP pgcache 没有清理掉,重启一下 supervisor 就可以了
No branches or pull requests
问题描述
麻烦帮忙看下
相关信息
The text was updated successfully, but these errors were encountered: