yar icon indicating copy to clipboard operation
yar copied to clipboard

Windows下调用yar也出现 can not get fd from curl instance

Open munggruel opened this issue 10 years ago • 12 comments

Windows下调用yar也出现 can not get fd from curl instance

Yar_Concurrent_Client::call($conf['yar_url'], "api_call", array('province_baiducity','read',array('1')), "callback", "error_callback", array(YAR_OPT_PACKAGER => "json")); Yar_Concurrent_Client::call($conf['yar_url'], "api_call", array("province_lessons",'read',array('00174','173')), "callback", "error_callback", array(YAR_OPT_TIMEOUT=>5000)); Yar_Concurrent_Client::loop("callback", "error_callback"); //send the requests,*/

munggruel avatar Mar 27 '14 14:03 munggruel

这个咋解决的 ???

mymicroblog avatar Apr 22 '14 15:04 mymicroblog

同求解决方案.php5.5 fs

ghost avatar Jun 13 '14 17:06 ghost

Yar_Concurrent_Client::loop: can not get fd from curl instance 亲,这个问题是怎么解决的啊,求解

ghost avatar Jul 18 '14 09:07 ghost

使用主干代码

laruence avatar Jul 18 '14 11:07 laruence

哥哥,今天我试了你说的主干代码(就是那个master是吧),编译后还是can not get fd from curl instance错误,我是本地建的虚拟主机,call的时候用的域名死活都出上面的错,host文件映射的域名,但是call的时候我用ip(或加端口)就没问题了,是不是yar内部绕过了hosts文件内映射,直接去找dns做解析了?之前我curl后在通过域名call没问题,注释掉curl后,再刷新短时间内没问题,就一点就有错误了。

ghost avatar Jan 28 '15 08:01 ghost

那这个应该是libcurl的实现了, 我觉得不应该, 应该使用本地hosts....

laruence avatar Jan 28 '15 09:01 laruence

鸟哥你好,我也遇到了 @czk2012 遇到的问题,使用域名的时候会出现 can not get fd from curl instance 的错误,使用 ip 的时候就能够正常使用,请问能解析下个中原因吗?

zcmyworld avatar May 19 '15 13:05 zcmyworld

@zcmyworld 你也是windows么? 如果不是, 那么你使用的libcurl的版本是?

laruence avatar May 20 '15 03:05 laruence

@laruence 系统是ubuntu 15.04 , libcurl 版本是 7.42.1 , 使用的时候,只要有一个是以ip访问的即可。如:

Yar_Concurrent_Client::call("http://localhost:81/index.php", "api", array("parameters"), "callback"); Yar_Concurrent_Client::call("http://localhost:81/index.php", "api", array("parameters"), "callback"); Yar_Concurrent_Client::call("http://127.0.0.1:81/index.php", "api", array("parameters"), "callback");

但如果全部用 localhost 则会报 Yar_Concurrent_Client::loop(): can not get fd from curl instance 的问题。

zcmyworld avatar May 20 '15 05:05 zcmyworld

我使用的mac也出现了Warning: Yar_Concurrent_Client::loop(): can not get fd from curl instance

sapolang avatar Jul 15 '16 00:07 sapolang

mac也出现了Warning: Yar_Concurrent_Client::loop(): can not get fd from curl instance

wanminny avatar Jul 25 '16 08:07 wanminny

我的mac也出现了Warning Yar_Concurrent_Client::loop(): can not get fd from curl instance

beckbikang avatar Aug 30 '16 06:08 beckbikang