Module for WHMCS

Discussion in 'Plesk Automation Suggestions and Feedback' started by Andrew Andriatis, Nov 21, 2012.

  1. FlorisB

    FlorisB Bit Poster

    While their sample code is not, the development documentation is publicly available on their website nowadays:
    So I do not see the issue about it being confidential.

    The main problem with closed source modules is that they tend to come with bugs, which can only be found and properly solved by the original developer (you) and not by others.
    In fact your module currently has an issue, which causes other WHMCS modules stop working if the Plesk module is installed.

    Your module includes a hooks.php that is always loaded by WHMCS, even when the product the user is viewing is not Plesk related.
    I suspect you do something that loads the Zend framework there -that you bundled with your module- and this causes problems for other modules that bundle their own version of the Zend framework as well. They can no longer load their version, because yours is already in loaded, and you cannot have a class with the same name multiple times.
    But that is just an educated guess, given I cannot view your source.
  2. Andrew Andriatis

    Andrew Andriatis Odin Team

    Sorry, are you talking about Parallels Plesk Panel or Parallels Plesk Automation module?

    Andrey Andriatis
  3. FlorisB

    FlorisB Bit Poster

    The Automation module posted in this thread.

    The moment one extracts the module to WHMCS, and creates at least one PPA product in WHMCS (which activates the module), other modules that like to use their own version of the Zend framework stop working.
    E.g. our NOC-PS WHMCS module then gives:

    Fatal error: Cannot redeclare class Zend_Loader in /var/www/whmcs/modules/servers/nocprovisioning/include/Zend/Loader.php on line 31
    This is caused by the PPA module already having loaded its own Zend_Loader which conflicts.
    If I add "print_r( get_included_files() );" to the top of our module that no longer works, it confirms my suspicion that it is your hooks.php that causes this:

        [0] => /var/www/whmcs/clientarea.php
        [1] => /var/www/whmcs/init.php
        [2] => /var/www/whmcs/includes/classes/WHMCS/Init.php
        [3] => /var/www/whmcs/includes/classes/WHMCS/Application.php
        [4] => /var/www/whmcs/includes/classes/WHMCS/Terminus.php
        [5] => /var/www/whmcs/includes/dbfunctions.php
        [6] => /var/www/whmcs/includes/functions.php
        [7] => /var/www/whmcs/includes/clientareafunctions.php
        [8] => /var/www/whmcs/includes/classes/WHMCS/Input/Sanitize.php
        [9] => /var/www/whmcs/includes/classes/WHMCS/Config/Application.php
        [10] => /var/www/whmcs/includes/classes/WHMCS/Config/AbstractConfig.php
        [11] => /var/www/whmcs/includes/classes/WHMCS/Config/DatabaseInterface.php
        [12] => /var/www/whmcs/configuration.php
        [13] => /var/www/whmcs/includes/classes/WHMCS/Database.php
        [14] => /var/www/whmcs/includes/classes/WHMCS/Session.php
        [15] => /var/www/whmcs/includes/classes/WHMCS/TokenManager.php
        [16] => /var/www/whmcs/includes/classes/WHMCS/Auth.php
        [17] => /var/www/whmcs/includes/classes/WHMCS/Version/SemanticVersion.php
        [18] => /var/www/whmcs/includes/classes/WHMCS/Version/AbstractVersion.php
        [19] => /var/www/whmcs/includes/classes/WHMCS/License.php
        [20] => /var/www/whmcs/lang/english.php
        [21] => /var/www/whmcs/includes/hookfunctions.php
        [22] => /var/www/whmcs/includes/hooks/example.php
    [B]    [23] => /var/www/whmcs/modules/servers/PleskAutomation/hooks.php
        [24] => /var/www/whmcs/modules/servers/PleskAutomation/PPAAccount.php
        [25] => /var/www/whmcs/modules/servers/PleskAutomation/PPABase.php
        [26] => /var/www/whmcs/modules/servers/PleskAutomation/PPAConnector.php
        [27] => /var/www/whmcs/modules/servers/PleskAutomation/Zend/XmlRpc/Client.php
        [28] => /var/www/whmcs/modules/servers/PleskAutomation/Zend/Http/Client.php
        [29] => /var/www/whmcs/modules/servers/PleskAutomation/Zend/Loader.php
        [30] => /var/www/whmcs/modules/servers/PleskAutomation/Zend/Uri.php
        [31] => /var/www/whmcs/modules/servers/PleskAutomation/Zend/Http/Client/Adapter/Interface.php
        [32] => /var/www/whmcs/modules/servers/PleskAutomation/Zend/Http/Response.php
        [33] => /var/www/whmcs/modules/servers/PleskAutomation/Zend/Http/Response/Stream.php
        [34] => /var/www/whmcs/modules/servers/PleskAutomation/Zend/XmlRpc/Client/ServerProxy.php
        [35] => /var/www/whmcs/modules/servers/PleskAutomation/Zend/XmlRpc/Client/ServerIntrospection.php
        [36] => /var/www/whmcs/modules/servers/PleskAutomation/Zend/XmlRpc/Value.php
        [37] => /var/www/whmcs/modules/servers/PleskAutomation/Zend/XmlRpc/Request.php
        [38] => /var/www/whmcs/modules/servers/PleskAutomation/Zend/XmlRpc/Fault.php
        [39] => /var/www/whmcs/modules/servers/PleskAutomation/Zend/XmlRpc/Response.php
        [40] => /var/www/whmcs/modules/servers/PleskAutomation/PPAServiceTemplate.php[/B]
        [41] => /var/www/whmcs/includes/clientfunctions.php
        [42] => /var/www/whmcs/includes/gatewayfunctions.php
        [43] => /var/www/whmcs/includes/ccfunctions.php
        [44] => /var/www/whmcs/includes/domainfunctions.php
        [45] => /var/www/whmcs/includes/registrarfunctions.php
        [46] => /var/www/whmcs/includes/customfieldfunctions.php
        [47] => /var/www/whmcs/includes/invoicefunctions.php
        [48] => /var/www/whmcs/includes/configoptionsfunctions.php
        [49] => /var/www/whmcs/includes/classes/WHMCS/Gateways.php
        [50] => /var/www/whmcs/includes/classes/WHMCS/ClientArea.php
        [51] => /var/www/whmcs/includes/classes/WHMCS/Smarty.php
        [52] => /var/www/whmcs/includes/classes/Smarty/Smarty.class.php
        [53] => /var/www/whmcs/includes/classes/WHMCS/Client.php
        [54] => /var/www/whmcs/includes/countries.php
        [55] => /var/www/whmcs/includes/countriescallingcodes.php
        [56] => /var/www/whmcs/includes/classes/WHMCS/Service.php
        [57] => /var/www/whmcs/includes/classes/WHMCS/Module.php
        [58] => /var/www/whmcs/modules/servers/nocprovisioning/nocprovisioning.php
    If you really need to have that hooks.php -that is always loaded by WHMCS, on every page-, please at least modify it so that it only includes the other files numbered 24 to 40 on-demand, when it actually needs them, instead of including them always.
  4. Alexander Nesterenko

    Alexander Nesterenko Bit Poster

    Please download and replace modules/servers/PleskAutomation/hooks.php to file from archive

    Thank you for useful report!
  5. FlorisB

    FlorisB Bit Poster

  6. TDub

    TDub Kilo Poster

    Any idea why I'm getting the following error when trying to view ParallelsAutomation 11.5 module pages in WHMCS?

    PHP Notice: Undefined variable: jscode in C:\\whmcs\admin\configservers.php on line 0
    PHP Notice: Undefined variable: jquerycode in C:\\whmcs\admin\configservers.php on line 0

    In the WHMCS system activity log is shows:

    PleskAutomation_module check that is used for PPA branding failed: Unable to Connect to ssl:// Error #10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

    Why is it connecting to Port 8440? Shouldn't it be 8443?

    Update: I see that the Access Point is set to the internal IP address over Port 8440, so I'm assuming I need to configure it to the external IP. How do I do that?
    Last edited: Mar 19, 2014
  7. assilb

    assilb Bit Poster

    Last edited: Apr 22, 2014
  8. parallelsbox

    parallelsbox Kilo Poster

    We just need WHMCS module to subscribe new resellers, not manage them or create subaccounts under the reseller so this should be simple, doesn’t WHMCS module support this?

    Looking at PPA API it doesn’t seem to be too difficult since we can pass “R” in [account_type] in pem.addAccountMember.
  9. Starl1ght

    Starl1ght Just a cat

  10. DNI-Ghost

    DNI-Ghost Bit Poster

    It fails the products > server page see the following screenshot. Running the latest version of PPA and WHMCS and Module.
    Unless ofcourse this is just happening to me can anyone confirm?

    RESOLVED - Fixed the issue on my end. I needed to install php-xml.

    Attached Files:

    Last edited: Sep 11, 2015
  11. GrantN

    GrantN Kilo Poster

    DNI-Ghost, which version of WHMCS are you running? We are running V6 and cannot seem to get automation working, also on PPA11.5#17 and latest module. Odin support told us that it will not work with V6 and to put in a useless vote for a new module.
  12. DNI-Ghost

    DNI-Ghost Bit Poster

    It was working on V6 for me and PPA11.5#17. Which error are you getting? As long as the proper credentials were setup on the server and the SSL option was checked. Note I did have PPA admin side with correct SSL cert. Did you add your ips of WHMCS to the API side in PPA?
  13. GrantN

    GrantN Kilo Poster

    When we go into the Servers page of WHMCS, an error appears in the log: "PleskAutomation_module check that is used for PPA branding failed: Unable to Connect to ssl:// Error #0:".

    The IP of the WHMCS machine address has been added to the allowed networks in Console, Running tcpdump on the console server clearly shows that the two machines are talking when I access the Servers page.

    The exception above occurs during the $ppaConnector->pleskintegration->isBrandedDomain(array('domain' => $address)) call.

    Any ideas :)

Share This Page