Murmur and PHP Script on separate servers

Ice/DBus, Web-Interfaces, Management tools

Murmur and PHP Script on separate servers

Postby pv-patrick » Tue Nov 02, 2010 12:45 am

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" running

With my php script, I get the following error:
Code: Select all
Uncaught exception ::Ice::ConnectionRefusedException {     error = 111 }   thrown in /opt/Ice-3.4.1/php/Murmur.php on line 1110


PHP Code:
Code: Select all
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!
pv-patrick
 
Posts: 2
Joined: Tue Nov 02, 2010 12:41 am

Re: Murmur and PHP Script on separate servers

Postby rawnar » Tue Nov 02, 2010 7:38 am

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.
rawnar
 
Posts: 243
Joined: Tue Mar 09, 2010 8:54 am
Location: Borne, the Netherlands

Re: Murmur and PHP Script on separate servers

Postby kissaki » Tue Nov 02, 2010 10:13 am

Yeah.

pv-patrick wrote: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" running

As 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 Ice
  • set an ice secret
Without 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.
MumPI: Your Mumble Web Interface in PHP
User avatar
kissaki
Team member
Team member
 
Posts: 1292
Joined: Sat Jan 09, 2010 12:15 pm


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest

cron