开发者社区> 问答> 正文

OSS php Client sample code 运营报错

运行RunAll.php
打印如下:

createBucket: OK

bucket capitastar created

bucket capitastar exist? yes

bucket capitastar acl put

bucket capitastar acl get: public-read-write

createBucket: OK

doesBucketExist: OK

deleteBucket: FAILED

BucketNotEmpty: The bucket you tried to delete is not empty. RequestId: 5B8A2376B47FB8F31EB2280D

putBucketAcl: OK

getBucketAcl: OK

acl: privatelistBuckets: OK

oss-cn-hangzhou capitastar 2018-08-31T15:45:33.000Z

oss-cn-hangzhou capitastar2 2018-08-31T18:41:11.000Z

oss-cn-hangzhou ehe1989 2015-12-20T07:36:02.000Z

bucket capitastar corsConfig created:<?xml version="1.0" encoding="utf-8"?>

<CORSConfiguration><CORSRule><AllowedOrigin>http://www.b.com</AllowedOrigin><AllowedMethod>POST</AllowedMethod><AllowedHeader>x-oss-header</AllowedHeader><MaxAgeSeconds>10</MaxAgeSeconds></CORSRule></CORSConfiguration>


bucket capitastar corsConfig fetched:<?xml version="1.0" encoding="utf-8"?>

<CORSConfiguration><CORSRule><AllowedOrigin>http://www.b.com</AllowedOrigin><AllowedMethod>POST</AllowedMethod><AllowedHeader>x-oss-header</AllowedHeader><MaxAgeSeconds>10</MaxAgeSeconds></CORSRule></CORSConfiguration>


bucket capitastar corsConfig deleted

putBucketCors: OK

getBucketCors: OK

<?xml version="1.0" encoding="utf-8"?>

<CORSConfiguration><CORSRule><AllowedOrigin>http://www.b.com</AllowedOrigin><AllowedMethod>POST</AllowedMethod><AllowedHeader>x-oss-header</AllowedHeader><MaxAgeSeconds>10</MaxAgeSeconds></CORSRule></CORSConfiguration>


deleteBucketCors: OK

getBucketCors: OK

<?xml version="1.0" encoding="utf-8"?>

<CORSConfiguration/>


bucket capitastar lifecycleConfig created:<?xml version="1.0" encoding="utf-8"?>

<LifecycleConfiguration><Rule><ID>delete obsoleted files</ID><Prefix>obsoleted/</Prefix><Status>Enabled</Status><Expiration><Days>3</Days></Expiration></Rule></LifecycleConfiguration>


bucket capitastar lifecycleConfig fetched:<?xml version="1.0" encoding="utf-8"?>

<LifecycleConfiguration><Rule><ID>delete obsoleted files</ID><Prefix>obsoleted/</Prefix><Status>Enabled</Status><Expiration><Days>3</Days></Expiration></Rule></LifecycleConfiguration>


bucket capitastar lifecycleConfig deleted

putBucketLifecycle: OK

getBucketLifecycle: OK

<?xml version="1.0" encoding="utf-8"?>

<LifecycleConfiguration><Rule><ID>delete obsoleted files</ID><Prefix>obsoleted/</Prefix><Status>Enabled</Status><Expiration><Days>3</Days></Expiration></Rule><Rule><ID>delete temporary files</ID><Prefix>temporary/</Prefix><Status>Enabled</Status><Expiration><Date>2022-10-12T00:00:00.000Z</Date></Expiration></Rule></LifecycleConfiguration>


deleteBucketLifecycle: OK

getBucketLifecycle: OK

<?xml version="1.0" encoding="utf-8"?>

<LifecycleConfiguration/>


bucket capitastar refererConfig created:<?xml version="1.0" encoding="utf-8"?>

<RefererConfiguration><AllowEmptyReferer>true</AllowEmptyReferer><RefererList><Referer>www.aliiyun.com</Referer><Referer>www.aliiyuncs.com</Referer></RefererList></RefererConfiguration>


bucket capitastar refererConfig fetched:<?xml version="1.0" encoding="utf-8"?>

<RefererConfiguration><AllowEmptyReferer>true</AllowEmptyReferer><RefererList><Referer>www.aliiyun.com</Referer><Referer>www.aliiyuncs.com</Referer></RefererList></RefererConfiguration>


bucket capitastar refererConfig deleted

putBucketReferer: OK

getBucketReferer: OK

<?xml version="1.0" encoding="utf-8"?>

<RefererConfiguration><AllowEmptyReferer>true</AllowEmptyReferer><RefererList><Referer>www.aliiyun.com</Referer><Referer>www.aliiyuncs.com</Referer></RefererList></RefererConfiguration>


deleteBucketReferer: OK

getBucketReferer: OK

<?xml version="1.0" encoding="utf-8"?>

<RefererConfiguration><AllowEmptyReferer>true</AllowEmptyReferer><RefererList/></RefererConfiguration>


bucket capitastar lifecycleConfig created

bucket capitastar lifecycleConfig fetched:<?xml version="1.0" encoding="utf-8"?>

<BucketLoggingStatus><LoggingEnabled><TargetBucket>capitastar</TargetBucket><TargetPrefix>access.log</TargetPrefix></LoggingEnabled></BucketLoggingStatus>


bucket capitastar lifecycleConfig deleted

putBucketLogging: OK

getBucketLogging: OK

<?xml version="1.0" encoding="utf-8"?>

<BucketLoggingStatus><LoggingEnabled><TargetBucket>capitastar</TargetBucket><TargetPrefix>access.log</TargetPrefix></LoggingEnabled></BucketLoggingStatus>


deleteBucketLogging: OK

getBucketLogging: OK

<?xml version="1.0" encoding="utf-8"?>

<BucketLoggingStatus/>


bucket capitastar websiteConfig created:<?xml version="1.0" encoding="utf-8"?>

<WebsiteConfiguration><IndexDocument><Suffix>index.html</Suffix></IndexDocument><ErrorDocument><Key>error.html</Key></ErrorDocument></WebsiteConfiguration>


bucket capitastar websiteConfig fetched:<?xml version="1.0" encoding="utf-8"?>

<WebsiteConfiguration><IndexDocument><Suffix>index.html</Suffix></IndexDocument><ErrorDocument><Key>error.html</Key></ErrorDocument></WebsiteConfiguration>


bucket capitastar websiteConfig deleted

putBucketWebsite: OK

getBucketWebsite: OK

<?xml version="1.0" encoding="utf-8"?>

<WebsiteConfiguration><IndexDocument><Suffix>index.html</Suffix></IndexDocument><ErrorDocument><Key>error.html</Key></ErrorDocument></WebsiteConfiguration>


deleteBucketWebsite: OK

getBucketWebsite: OK

<?xml version="1.0" encoding="utf-8"?>

<WebsiteConfiguration><IndexDocument><Suffix/></IndexDocument><ErrorDocument><Key/></ErrorDocument></WebsiteConfiguration>



Fatal error: Uncaught OSS\Core\OssException: RequestCoreException: cURL resource: Resource id #90; cURL error: Empty reply from server (52) in /Users/danielwoo/capital_workspace/CapitastarShop/library/smartphp/libraries/OSS/src/OSS/OssClient.php:1655

Stack trace:

#0 /Users/danielwoo/capital_workspace/CapitastarShop/library/smartphp/libraries/OSS/src/OSS/OssClient.php(783): OSS\OssClient->auth(Array)

#1 /Users/danielwoo/capital_workspace/CapitastarShop/library/smartphp/libraries/OSS/samples/Signature.php(15): OSS\OssClient->uploadFile('capitastar', 'a.file', '/Users/danielwo...')

#2 /Users/danielwoo/capital_workspace/CapitastarShop/library/smartphp/libraries/OSS/samples/RunAll.php(11): require_once('/Users/danielwo...')

#3 {main}

  thrown in /Users/danielwoo/capital_workspace/CapitastarShop/library/smartphp/libraries/OSS/src/OSS/OssClient.php on line 1655




展开
收起
daniel198 2018-09-01 14:06:01 1348 0
1 条回答
写回答
取消 提交回答
  • 一个喜欢周月月且无法自拔的人。
    此类问题建议您提交工单解决。
    https://workorder.console.aliyun.com/console.htm#/ticket/add?productCode=oss&commonQuestionId=499&isSmart=true
    满意请采纳,感谢您对阿里云的信赖与支持。
    2018-09-01 14:19:46
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
阿里云栖开发者沙龙PHP技术专场-深入浅出网络编程与swoole内核-吴镇宇 立即下载
PHP安全开发:从白帽角度做安全 立即下载
PHP 2017.北京 全球开发者大会——高可用的PHP 立即下载