简体   繁体   English

LimeSurvey RemoteControl API在Macos Sierra中的本地主机中失败

[英]LimeSurvey RemoteControl API failing in localhost in Macos Sierra

Currently using Version 2.57.1+161205 of Lime Survey. 当前使用的是Lime Survey版本2.57.1​​ + 161205。

I recently got a new Macbook Pro laptop and set up my dev environment. 我最近买了一台新的Macbook Pro笔记本电脑,并设置了我的开发环境。 Everything seems to be working except when I try to make JSON RPC calls to the LimeSurvey Remotecontrol API! 除非我尝试对LimeSurvey Remotecontrol API进行JSON RPC调用,否则一切似乎都正常!

It fails at getting the session key from Lime Survey (let alone any other call). 它无法从Lime Survey中获取会话密钥(更不用说其他任何呼叫了)。 It just pauses for a bit then returns an error saying it is unable to connect to the server. 它只是暂停片刻,然后返回错误消息,表明它无法连接到服务器。 Before the Mac, I had a Windows based PC using Vagrant/Homestead - I had no problems accessing the API. 在Mac之前,我有一台使用Vagrant / Homestead的Wi​​ndows PC-访问API没有任何问题。

If I open a browser tab and type in http://lime.app/admin/remotecontrol (lime.app is my vhost pointing to my limesurvey installation) -- I get the list of available API functions etc But when I try to use the functions through the RPC client (I'm using weberhofer/jsonrpcphp), I get the error. 如果我打开浏览器选项卡并键入http://lime.app/admin/remotecontrol(lime.app是我的虚拟主机,指向我的limesurvey安装),则会得到可用API函数的列表,但当我尝试使用时通过RPC客户端的功能(我正在使用weberhofer / jsonrpcphp),出现错误。

As a test, I tried to get a session key from an online instance of LimeSurvey (its in a test server). 作为测试,我尝试从LimeSurvey的在线实例(位于测试服务器中)获取会话密钥。 That works perfectly. 那很好。 But when I'm trying to do the same call locally, it fails each time. 但是,当我尝试在本地进行相同的调用时,每次都会失败。 Is there something that needs to be set in the Mac to allow this type of call?? 在Mac中是否需要设置某些内容才能允许这种类型的通话?

I didn't work out if this was just a Mac issue, but I seem to have resolved the problem. 如果这只是Mac问题,我没有解决,但是我似乎已经解决了问题。

I'm using the JSON RPC client from https://github.com/weberhofer/jsonrpcphp On a whim I thought I'd try a different client, so I decided to use https://github.com/fguillot/JsonRPC instead. 我正在使用来自https://github.com/weberhofer/jsonrpcphp的JSON RPC客户端,一时兴起,我认为我会尝试使用其他客户端,所以我决定改用https://github.com/fguillot/JsonRPC

Strange thing is, it works!! 奇怪的是,它有效! I have no idea why the previous client would no longer work. 我不知道为什么以前的客户将不再工作。

I guess this is a mac address issue , right? 我想这是mac地址问题,对不对? I am not a mac user, so I can't help you much. 我不是mac用户,因此无法为您提供很多帮助。

Nevertheless, I would test if you are pointing to the right server. 不过,我会测试您是否指向正确的服务器。 As that open the remotecontrol_handle file and add some kind of error_log command in the get_session_key function. 这样,打开remotecontrol_handle文件,并在get_session_key函数中添加某种error_log命令。 That will tell if Lime is ever being contacted or not. 这将告诉您是否正在联系Lime。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM