当前位置:网站首页>Hyperf框架使用阿里云OSS上传失败
Hyperf框架使用阿里云OSS上传失败
2022-06-26 15:58:00 【精哥哥】
阿里云官方PHP OSS SDK和Swoole CURL_HOOK的兼容问题
开启CURL_HOOK后使用阿里云OSS会报错:
Oss\Core\OssException: : RequestId:
1
解决方案
请同时安装官方SDK和reasno/swoole-aliyunoss-addon。
composer require aliyuncs/oss-sdk-php
composer require reasno/swoole-aliyunoss-addon
安装后就可以顺畅开启CURL_HOOK协程化阿里云OSS。
参考:https://zhuanlan.zhihu.com/p/141056740
2,升级swoole扩展,打开所有支持的扩展,也可以解决上传失败
3,通过代码解决
修改bin/hyperf.php
! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
#! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL ^ SWOOLE_HOOK_CURL);
边栏推荐
- Svg animation around the earth JS special effects
- Nanopi duo2 connection WiFi
- SAP OData 开发教程 - 从入门到提高(包含 SEGW, RAP 和 CDP)
- How to identify contractual issues
- 4 custom model training
- Lifeifei's team applied vit to the robot, increased the maximum speed of planning reasoning by 512 times, and also cued hekaiming's Mae
- R语言使用cor函数计算相关性矩阵进行相关性分析,使用corrgram包可视化相关性矩阵、行和列使用主成分分析重新排序、下三角形中使用平滑的拟合线和置信椭圆,上三角形中使用散点图、对角线最小值和最大值
- SVG大写字母A动画js特效
- 1 张量的简单使用
- C# 读写文件从用户态切到内核态,到底是个什么流程?
猜你喜欢

(1) Keras handwritten numeral recognition and recognition of self written numbers

NFT transaction principle analysis (1)

NFT Platform Security Guide (1)

Panoramic analysis of upstream, middle and downstream industrial chain of "dry goods" NFT

Transaction input data of Ethereum

10 tf.data

5000字解析:实战化场景下的容器安全攻防之道

手写数字体识别,用保存的模型跑自己的图片

清华“神奇药水”登Nature:逆转干细胞分化,比诺奖成果更进一步,网友:不靠精子卵子就能创造生命了?!...

理想路径问题
随机推荐
8 user defined evaluation function
【力扣刷题】二分查找:4. 寻找两个正序数组的中位数
4 custom model training
Simple use of tensor
[problem solving] the loading / downloading time of the new version of webots texture and other resource files is too long
Net based on girdview control to delete and edit row data
OpenSea上如何创建自己的NFT(Polygon)
9 use of tensorboard
11 cnn简介
R language plot visualization: plot visualizes the normalized histogram, adds the density curve KDE to the histogram, and uses geom at the bottom edge of the histogram_ Adding edge whisker graph with
R语言使用cor函数计算相关性矩阵进行相关性分析,使用corrgram包可视化相关性矩阵、行和列使用主成分分析重新排序、下三角形中使用平滑的拟合线和置信椭圆,上三角形中使用散点图、对角线最小值和最大值
Swiftui retrieves the missing list view animation
5 模型保存与加载
Redis顺序排序命令
Solidus labs welcomes zhaojiali, former head of financial innovation in Hong Kong, as a strategic adviser
Svg savage animation code
清华“神奇药水”登Nature:逆转干细胞分化,比诺奖成果更进一步,网友:不靠精子卵子就能创造生命了?!...
11 introduction to CNN
JS text scrolling scattered animation JS special effect
振动式液量检测装置