laruence / yar

Light, concurrent RPC framework for PHP & C
Other
1.43k stars 319 forks source link

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

Open munggruel opened 10 years ago

munggruel commented 10 years ago

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,*/

mymicroblog commented 10 years ago

这个咋解决的 ???

ghost commented 10 years ago

同求解决方案.php5.5 fs

ghost commented 10 years ago

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

laruence commented 10 years ago

使用主干代码

ghost commented 9 years ago

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

laruence commented 9 years ago

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

zcmyworld commented 9 years ago

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

laruence commented 9 years ago

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

zcmyworld commented 9 years ago

@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 的问题。

sapolang commented 8 years ago

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

wanminny commented 8 years ago

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

beckbikang commented 8 years ago

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