How to extends remoting.inc.php

Discussion in 'Developers' Forum' started by MaamuT, Dec 4, 2015.

  1. MaamuT

    MaamuT Member

    Hi,

    I would like to add new features without changing the original file…

    Here my "exotic implementation" :

    /usr/local/ispconfig/interface/web/remote/myExtended.php
    Code:
    <?php
    
    require_once '../../lib/config.inc.php';
    $conf['start_session'] = false;
    require_once '../../lib/app.inc.php';
    
    if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
    
    $app->load('remoting');
    $app->load('billing_remote');
    $app->load('myExtended_remote');
    $app->uses('remoting_lib');
    
    $server = new SoapServer(null, array('uri' => $_SERVER['REQUEST_URI']));
    $server->setClass('myExtended_remote');
    $server->handle();
    
    ?>
    /usr/local/ispconfig/interface/lib/classes/myExtended_remote.inc.php
    Code:
    <?php
    class myExtended_remote extends billing_remote {
        public…
    }
    And the soap connexion file :
    Code:
    $soap_username = 'userName';
    $soap_password = 'PassWord';
    
    $soap_location = 'https://localhost:1234/remote/myExtended.php';
    $soap_uri = 'https://localhost:1234/remote/';
    
    But…

    SOAP Error: Forbidden
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Extending the file should work (use the same way that the billing module endpoint billing.php uses). Maybe zjere is an issue in one of the code files, try to enable the error.log in the apache ispconfig.vhost file, restart apache and check the error.log to see if you get any php errors during soap connect.
     
  3. MaamuT

    MaamuT Member

    Ok,

    So, my build is correct ?

    Ok, big mystake, bad chown :/

    After correction, i have a new error message who said the login finction don't exist…

    Hm, billing extends remoting, but i can't extends billin with my class ?

    billing extends remote => login function ok

    myclass extends billing => logon function not exist… :/
     

Share This Page