pv-patrick Posted November 2, 2010 Share Posted November 2, 2010 I am trying to get a PHP script to work via Ice and can't seem to get it connected.My first question is: I have Murmur running on 1 machine and my script on another web server. Does the machine running Murmur need to have apache/ice/etc installed and running?I have this in my .ini : ice="tcp -h 127.0.0.1 -p 6502" and in the logs it shows: MurmurIce: Endpoint "tcp -h 127.0.0.1 -p 6502" runningWith my php script, I get the following error:Uncaught exception ::Ice::ConnectionRefusedException { error = 111 } thrown in /opt/Ice-3.4.1/php/Murmur.php on line 1110 PHP Code: require_once 'Ice.php'; require_once 'Murmur.php'; $ICE = Ice_initialize(); $meta = Murmur_MetaPrxHelper::checkedCast($ICE->stringToProxy('Meta:tcp -h MurmurServerIP -p 6502')); I turned off/on the icesecret since I can't figure out how to pass it along with 3.4.1. Any help would be much appreciated, thank you! Link to comment Share on other sites More sharing options...
rawnar Posted November 2, 2010 Share Posted November 2, 2010 I do not know a lot about Ice, but what I do know is that 127.0.0.1 is the loopback ip of your machine. So if you want Ice to listen to requests coming from the outside you have to set it to the ip address of your computer. Computer specs: AMD FX-8320, 8GB DDR3-SDRAM, AMD Radeon HD 7950, Asus Xonar D1, Windows 7 Ultimate 64bit/Debian Jessie AMD64. Link to comment Share on other sites More sharing options...
Administrators kissaki Posted November 2, 2010 Administrators Share Posted November 2, 2010 Yeah. My first question is: I have Murmur running on 1 machine and my script on another web server. Does the machine running Murmur need to have apache/ice/etc installed and running?No.You only need murmur to listen on the public ip, and a php script can call to Ice from elsewhere via that IP. I have this in my .ini : ice="tcp -h 127.0.0.1 -p 6502" and in the logs it shows: MurmurIce: Endpoint "tcp -h 127.0.0.1 -p 6502" runningAs rawnar said, that’s local (loopback).You’ll have to set this to your public IP (or omit -h 127.0.0.1; it will probably listen on all available IPs then, but I’m not sure / have not tried). I turned off/on the icesecret since I can't figure out how to pass it along with 3.4.1. Any help would be much appreciated, thank you!When you make Ice public you should do 2 things for security:change the default port of Iceset an ice secretWithout an icesecret you should secure it via firewall or ices thing whichs name I forgot again, which is even more complex though.To set your icesecret on PHP, see MumPI as a reference.You’ll have to set the ice context on meta and server objects via ice_context function. Pass an array of 'secret'=>'icesecret value' as a parameter. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now