New ISPConfig module for WHMCS

Discussion in 'Tips/Tricks/Mods' started by cwispy, Dec 11, 2014.

  1. webguyz

    webguyz Active Member HowtoForge Supporter

    You would have to write a script using the API's of both ISPConfig and WHMCS. All the script does is automate creating new customers and plans from within WHMCS. You would have to continue using what ever billing system you were using before WHMCS and manually create Users and Plans for them in WHMCS or automate the whole thing using api's.
  2. Order Accept Encountered Problems
    SOAP Error: Could not connect to host

    I tried them all, IP: port, URL: port, http or https...
    I feel pretty frustrated...
  3. webguyz

    webguyz Active Member HowtoForge Supporter

    I would break it down into a simple test and then get larger. Here is a simple test to see if the login/password you set up is correct. Just tested it here so I know it works. If user or pw is incorrect, fix it and then move over to the iscfg3 code. replace your user info and ip info.

    $username = 'test_user';
    $password = 'test_password';
    $soap_location = '';
    $soap_uri = '';
    $client = new SoapClient(null, array('location' => $soap_location,
                                         'uri'      => $soap_uri,
                                         'trace' => 1,
                                         'exceptions' => 1));
    try {
        if($session_id = $client->login($username,$password)) {
            echo 'Logged successfull. Session ID:'.$session_id.'<br />';
    } catch (SoapFault $e) {
        echo $client->__getLastResponse();
        die('SOAP Error: '.$e->getMessage());
  4. Hello webguyz and thanks for the reply.
    Unfortunately register again this error:
    SOAP Error: Could not connect to host

    Username and password have been reinsert correctly both in ISPConfig that WHMCS. Any suggestions or solutions are appreciated. I'm using the latest version of the module discharged a few hours ago.
  5. MasteRTriX

    MasteRTriX Member

    what happens if you enter the url on your browser?
    Are you sure you are using http/https accordingly to your ispconfig configuration?
    If you are using https, do you have self signed certificates or properly chained ones?
  6. I use https not signed on ISPConfig. Until yesterday I had no problems.
  7. cwispy

    cwispy Active Member

    Do you mean that the WHMCS module worked until yesterday, or your ISPConfig url worked until yesterday?
  8. I'm talking about the module, my ISPConfig url always used https.
  9. cwispy

    cwispy Active Member

    Then I would have to say what changed on your systems in the last few days to stop it working? Can you connect to the ispconfig web interface from the whmcs system using lynx for example?
  10. I can connect with linx, provided I accept an unknown certificate
  11. cwispy

    cwispy Active Member

    Ok, so its not a network issue. However the issue still seems to be with the whmcs server. The error message is quite clear, "Could not connect to host" So you will have to do some debugging on your whmcs server. To start with, you can turn on the module logging in whmcs and see if it gives you any more clues. Otherwise, you will need to turn up your apache logging to try and see whats going on.
  12. Thank you for reply cwispy.
    I investigated in the system log, but does not see any error message.
    It's really strange...
    I use Nginx and since I installed your form I've never had a problem, however the form of Germanius that I have created several problems, but never mind I got around them alone...
  13. cwispy

    cwispy Active Member

    Glad to hear you got things sorted out again.
  14. Unfortunately I have not solved the problem, your form will always return the same error and debug WHMCS does not report anything.
    I ask for support, even for a fee, to the solution of the problem.
  15. cwispy

    cwispy Active Member

    Try making these changes to the module, and with the module debug turned on you should at least see something in the module log in whmcs module log.

    Turn on the display_errors option at the top of the module.
    ini_set('error_reporting'E_ALL & ~E_NOTICE);
    ini_set("display_errors"1); // Set this option to Zero on a production machine.

    And add the logModuleCall options further down.
        if (
    $username)) &&
    $username != '')) &&
    $password)) &&
    $password != ''))

        try {
    logModuleCall('ispconfig','CreateClient','Trying to Connect','','');
    /* Connect to SOAP Server */
    $client = new SoapClientnull,
    'location' => $soap_url,
    'uri' => $soap_uri,
    'exceptions' => 1,
    'trace' => false
    /* Authenticate with the SOAP Server */
    $session_id $client->login$soapuser$soappassword );
  16. If setup
    ini_set("display_errors", 1);
    products/services in clients area are not visible...
  17. cwispy

    cwispy Active Member

    Check your server error log. That means there is a error in the parsing of the module.
  18. In whmcs debug there are no posts.
    In error log of nginx is present this post:
    *24461 FastCGI sent in stderr: "PHP message: PHP Warning: Missing argument 3 for ModuleCallFunction(), called in /var/www/clients/client1/web2/web/includes/modulefunctions.php on line 0 and defined in /var/www/clients/client1/web2/web/includes/modulefunctions.php on line 0" while reading response header from upstream, client:, server:, request: "POST /admin/clientsservices.php HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/web2.sock:", host: "", referrer: "
  19. cwispy

    cwispy Active Member

    Missing argument 3 for ModuleCallFunction() is a normal error. WHMCS has had that for ages. Any other errors?
  20. No, I not have any other errors.
    If someone is available to check and solve the problem I would be grateful.
    You will be paid for the work.

Share This Page