yar icon indicating copy to clipboard operation
yar copied to clipboard

Windows下调用yar报错

Open munggruel opened this issue 10 years ago • 3 comments

( ! ) Warning: [Debug Yar_Client 9:48:56.841297]: -293666116: call api 'api_call' at (r)'http://127.0.0.1/wxservice/' with '1' parameters in D:\MiniServer\www\htdocs\wxservice\test.php on line 22 Call Stack

Time Memory Function Location

1 0.0006 133864 {main}( ) ..\test.php:0 2 0.0013 147768 api_call ( ) ..\test.php:22

( ! ) Warning: [Debug Yar_Client 9:48:56.841940]: -293666116: pack request by 'JSON', result len '57', content: '{"i":-293666116,"m":"api_call","' in D:\MiniServer\www\htdocs\wxservice\test.php on line 22 Call Stack

Time Memory Function Location

1 0.0006 133864 {main}( ) ..\test.php:0 2 0.0013 147768 api_call ( ) ..\test.php:22 exception 'Yar_Client_Protocol_Exception' with message 'malformed response header '

Stack trace: #0 D:\MiniServer\www\htdocs\wxservice\test.php(22): Yar_Client->__call('api_call', Array) #1 D:\MiniServer\www\htdocs\wxservice\test.php(22): Yar_Client->api_call('parameter') #2 {main}

munggruel avatar Mar 27 '14 01:03 munggruel

apache 用的是fastcgi,apache <IfModule mod_fcgid.c> yar版本是windows dll ,php 5.4 nts

munggruel avatar Mar 27 '14 01:03 munggruel

apache 的 error.log [Thu Mar 27 09:48:53.834996 2014] [fcgid:warn] [pid 3240:tid 1664] [client 127.0.0.1:65337] mod_fcgid: stderr: PHP 1. {main}() D:\MiniServer\www\htdocs\wxservice\test.php:0 [Thu Mar 27 09:48:53.834996 2014] [fcgid:warn] [pid 3240:tid 1664] [client 127.0.0.1:65337] mod_fcgid: stderr: PHP 2. Yar_Client->api_call() D:\MiniServer\www\htdocs\wxservice\test.php:22 [Thu Mar 27 09:48:56.856169 2014] [fcgid:warn] [pid 3240:tid 1656] [client 127.0.0.1:65339] mod_fcgid: stderr: PHP Warning: json_encode(): recursion detected in D:\MiniServer\www\htdocs\wxservice\index.php on line 11 [Thu Mar 27 09:48:56.856169 2014] [fcgid:warn] [pid 3240:tid 1656] [client 127.0.0.1:65339] mod_fcgid: stderr: PHP Stack trace: [Thu Mar 27 09:48:56.856169 2014] [fcgid:warn] [pid 3240:tid 1656] [client 127.0.0.1:65339] mod_fcgid: stderr: PHP 1. {main}() D:\MiniServer\www\htdocs\wxservice\index.php:0 [Thu Mar 27 09:48:56.856169 2014] [fcgid:warn] [pid 3240:tid 1656] [client 127.0.0.1:65339] mod_fcgid: stderr: PHP 2. json_encode() D:\MiniServer\www\htdocs\wxservice\index.php:11 [Thu Mar 27 09:48:56.856169 2014] [fcgid:warn] [pid 3240:tid 1656] [client 127.0.0.1:65339] mod_fcgid: stderr: PHP Warning: [Debug Yar_Server 9:48:56.854611]: -293666116: accpect rpc request form '' in D:\MiniServer\www\htdocs\wxservice\index.php on line 13

munggruel avatar Mar 27 '14 02:03 munggruel

如果 php.ini 中配置 yar.debug=Off 或者 display_errors=Off,刚才的异常不再显示

但是 Chrome 访问的页面如果使用了yar client 调用 就会 超时,firefox 和 IE不会,刚刚试过

munggruel avatar Mar 27 '14 03:03 munggruel