-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
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
MAC M1芯片,用swoole-cli,CURL请求或者携程请求一直会报DNS超时 #5103
Comments
查看一下 /etc/resole.conf 配置,通过 nslookup 命令,查看是否可以正常解析 另外,请安装 issue 模版提供详细的版本信息 |
nslookup可以解析,但是用swoole-cli还是不行,用自己编译到本地swoole.so是可以的。用的版本是@MacBook server % swoole5 -v |
执行如下命令,把结果截图,反馈到这里 otool -L ./swoole-cli
file ./swoole-cli |
swoole5 % otool -L ./swoole-cli |
@fengyikang88 <?php
\Co\run(function() {
go(function () {
$filename='https://www.swoole.com/dist/skin1/images/project-0.png';
$size = getimagesize($filename);
var_dump($size);
});
}); getimagesize 函数用法:https://www.php.net/manual/zh/function.getimagesize.php 此函数要求 filename 是有效的图像文件。如果提供的是非图像,可能会错误的识别为图像且函数会成功返回,但数组可能包含无意义的值。 |
@MacBook Desktop % swoole5 index.php |
@fengyikang88 ,我没有 M1pro 。 提议,你可以自己编译 swoole-cli , 看看自己编译出来的是否也有同样的错误 git clone -b main --recursive https://github.com/swoole/swoole-cli.git
cd swoole-cli
composer update
php prepare.php
bash make.sh all-library
bash make.sh config
bash make.sh build
# 编译好
./bin/swoole-cli -v
./bin/swoole-cli --ri swoole
|
DEBUG] Event Hyperf\FramTe0 getimagesize(https://st1o/ 1oroe6fla7d7314d.png[ERROR] ErrorException: getimagesize(r-r."hund /2820-03/16/16f5e6f77314d. mno): Failed to open stream: DS LookuD resolve timeout in /users/ fy/Desktop/w/cataboard _hyperf/app/comand/itmicomand.,pip:33Stack trace:dler\Listener{closure}(2,'getimagesize(ht...",'/users/fyk/Desk...', 33)#0 [internal function]: Hyperf Exception#1 /Users/fyk/Desktop/WWW/dataBoard_hyperf/app/Commo(33): getimagesize( https://static#2 /Users/fyk/Desktop/WWw/dataBoard_hyperf/ved.php(428): App\Command\HtmLCommand->handle()#3[internal function]: Hyperf\Command\Command->Hyperf\Command{closure}()#4 [main}
,用这个函数getimagesize或者其他带有curl请求都会报超时,自己编译的swoole版本没问题。
The text was updated successfully, but these errors were encountered: