how can i use Murmur icesecure

oVioVi Member Florian MustermannOrganization: Serverline.deProject: websolutions
Hi,
i want wo use the icesecret parameter from murmur 1.2.2 and i use the ice-php 3.3.1 but i can't figure out, how i can make the right call...

The following code is my try, but i can't get the permission with it...
(without the icesecret entry in the murmur.ini and outcommented ->ice_context($secret) is it working perfect)
	error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
	ini_set("display_errors", 1); 
	
	Ice_loadProfile("Murmur12x");
	$secret = array('sectret'=>'testpwd');
	
	try{
		$base = $ICE->stringToProxy("Meta:tcp -h xxx.xxx.xxx.xxx -p 6502");
		$meta = $base->ice_checkedCast("::Murmur::Meta")->ice_context($secret);
		$default = $meta->getDefaultConf();
			
		print_r($meta->getServer(1)->getTree());
	}
	catch (Ice_Exception $ex) {
		print_r($ex);
	}

but i get only this exception:
Ice_UnknownUserException Object
(
    [unknown] => Murmur::InvalidSecretException
    [message:protected] => 
    [string:private] => 
    [code:protected] => 0
    [file:protected] => /var/www/html/icetest.php
    [line:protected] => 21
    [trace:private] => Array
        (
            [0] => Array
                (
                    [file] => /var/www/html/icetest.php
                    [line] => 21
                    [function] => getdefaultconf
                    [class] => Ice_ObjectPrx
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

        )

)

Thats the part of the murmur.ini
# If you want to use ZeroC ICE to communicate with Murmur, you need
# to specify the endpoint to use. Since there is no authentication
# with ICE, you should only use it if you trust all the users who have
# shell access to your machine.
# Please see the ICE documentation on how to specify endpoints.
ice="tcp -h xxx.xxx.xxx.xxx -p 6502"
icesecret="testpwd"

Whats the Problem?

best regards from germany,
oVi

Comments

  • oVioVi Member Florian MustermannOrganization: Serverline.deProject: websolutions
    *push**push**push*
    I need realy help :(
  • andreynechandreynech Member Andrey NechypurenkoOrganization: Veterobot.comProject: Robotics vehicle for researchers and makers ✭✭
    *push**push**push*
    I need realy help
    It sounds to me like very Murmur specific question. That is why I think that the chances to get answer are much higher if you post this question on the corresponding Murmur forum.

    Regards,
    Andrey.
  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    As Andrey wrote, it is probably better to post this question in Murmur support forums, since it is not a general Ice question. I'm afraid none of the ZeroC staff knows Murmur in enough detail to be able to assist you.
  • oVioVi Member Florian MustermannOrganization: Serverline.deProject: websolutions
    okey, but is the command in the right syntax to submit/authenticate something?
    $base = $ICE->stringToProxy("Meta:tcp -h xxx.xxx.xxx.xxx -p 6502");
    		$meta = $base->ice_checkedCast("::Murmur::Meta")->ice_context($secret);
    
  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    All I can tell from the above line is that you set $secret as a per-proxy context for $meta. How this context is used depends on the application, in this case, on Murmur.

    By the way, might the problem be a typo?
    $secret = array('sectret'=>'testpwd');
    

    Again, I don't know Murmur, but shouldn't this be:
    $secret = array('secret'=>'testpwd');
    
  • oVioVi Member Florian MustermannOrganization: Serverline.deProject: websolutions
    i got it... thx :D

    here's the solution/usage:
    	error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
    	ini_set("display_errors", 1); 
    	
    	Ice_loadProfile("Murmur12x");
    	$secret = array('secret'=>'[I]myPWD[/I]');
    	
    	try{
    		$base = $ICE->stringToProxy("Meta:tcp -h [I]myIP [/I]-p [I]myPort[/I]");
    		$meta = $base->ice_checkedCast("::Murmur::Meta")->ice_context($secret);
    		$default = $meta->getDefaultConf();
    		
    		print_r($default);	
    		print_r($meta->getServer(1)->ice_context($secret)->getTree());
    	}
    	catch (Ice_Exception $ex) {
    		print_r($ex);
    	}
    
Sign In or Register to comment.