ISPConfig Remote Control doesn't works anymore after php update

Discussion in 'Developers' Forum' started by vaio1, May 1, 2015.

  1. vaio1

    vaio1 Member

    Hi guys,
    I have a strange issue in my server installation. ISPConfig doesn't respond at the http://www.mydomain.com:8080/remote/index.php
    I see a blank page only.

    $client = new SoapClient($endpointlocation);
    $this->setSession ( $client->login ( $username, $password ) );
    $this->setSoapclient($client);


    I get this exception:

    SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.mydomain.com:8080/remote/index.php' : Start tag expected, '<' not found

    How to solve this error?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which php version do you use now? Check with phpinfo() in the ispconfig web directory if the soap functions exist in php.
     
  3. vaio1

    vaio1 Member

    # php -v
    PHP 5.4.39-0+deb7u2 (cli) (built: Mar 25 2015 09:10:46)
    Copyright (c) 1997-2014 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

    [​IMG]

    what's the problem? I don't understand the behavior of the SoapClient and of the SoapServer.
    If I read your code:
    $server = new SoapServer(null, array('uri' => $_SERVER['REQUEST_URI']));
    $server->setClass('remoting');
    $server->handle();
    and I check the $server var I get:
    SoapServer Object ( [service] => Resource id #13 )

    Both seems to me work as well but the WSDL file doesn't appear.
    Any idea?

    If I call /remote/index.php?wsdl I can see the wsdl envelope with the exception:
    WSDL generation is not supported yet
    is it normal?

    thanks
     
    Last edited: May 1, 2015
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no wsdl. You have to use the connect string like it is used in the examples for the remote api.
     
  5. vaio1

    vaio1 Member

    Yes Till of course as you can see I am using the code posted in the remote api.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so the code in your first post is not the one that you used for your test? The api does not use wsdl and the connect type in the remote api example does not need a wsdl file as php can not create one, so if you would want a wsdl file e.g. when you use a different programming language then php that does not support connections without wsdl, then you would have to create such a file manually. But I never needed that yet for a ispconfig integration, it walways worked without a wsdl api description. You need wsdl only if you want to do auto discovery of api functions.
     
    vaio1 likes this.
  7. vaio1

    vaio1 Member

    Hi again, I have solved the issue!

    I had wrote this code:
    $opts = array('http'=>array('user_agent' => 'PHPSoapClient'));
    $context = stream_context_create($opts);
    $client = new SoapClient($endpointlocation, array('stream_context' => $context, 'cache_wsdl' => WSDL_CACHE_NONE));

    then I have updated the login connection in this way:
    $client = new SoapClient(null, array('location' => $endpointlocation, 'uri' => $endpointuri));

    thanks
     

Share This Page