当前位置:网站首页>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);
边栏推荐
- 1 张量的简单使用
- (1) Keras handwritten numeral recognition and recognition of self written numbers
- SAP OData 开发教程 - 从入门到提高(包含 SEGW, RAP 和 CDP)
- Failed to get convolution algorithm. This is probably because cuDNN failed to initialize
- JS教程之Electron.js设计强大的多平台桌面应用程序的好工具
- Interview pit summary I
- OpenSea上如何创建自己的NFT(Polygon)
- When a project with cmake is cross compiled to a link, an error cannot be found So dynamic library file
- svg野人动画代码
- 5000字解析:实战化场景下的容器安全攻防之道
猜你喜欢

SAP OData development tutorial - from getting started to improving (including segw, rap and CDP)
Practice of federal learning in Tencent micro vision advertising

NFT 项目的开发、部署、上线的流程(1)

9 use of tensorboard

9 Tensorboard的使用

Simple use of tensor

Have you ever had a Kindle with a keyboard?

10 tf. data

全面解析Discord安全问题

stm32h7b0替代h750程序导致单片机挂掉无法烧录程序问题
随机推荐
5 模型保存与加载
理想路径问题
Everyone is a scientist free gas experience Mint love crash
"C language" question set of ⑩
R language uses cor function to calculate the correlation matrix for correlation analysis, uses corrgram package to visualize the correlation matrix, reorders rows and columns using principal componen
This year, the AI score of college entrance examination English is 134. The research of Fudan Wuda alumni is interesting
『C语言』题集 of ⑩
Net based on girdview control to delete and edit row data
Lifeifei's team applied vit to the robot, increased the maximum speed of planning reasoning by 512 times, and also cued hekaiming's Mae
How to configure and use the new single line lidar
Super double efficiency! Pycharm ten tips
9 use of tensorboard
【蓝桥杯集训100题】scratch辨别质数合数 蓝桥杯scratch比赛专项预测编程题 集训模拟练习题第15题
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
Golang temporary object pool optimization
IntelliJ idea -- Method for formatting SQL files
Comprehensive analysis of discord security issues
Big talk Domain Driven Design -- presentation layer and others
4 custom model training
2 three modeling methods