New ISPConfig module for WHMCS

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

Thread Status:
Not open for further replies.
  1. Brano

    Brano New Member

    Hi, during testing whmcs and ispconfig integration we cannot handle with this error:

    SOAP Error: Internal Server Error

    In webserver error log is this error:

    Code:
    [Sun Sep 20 12:54:23.005779 2015] [fcgid:warn] [pid 1033] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Warning:  include(/usr/local/ispconfig/interface/lib/lang/.lng): failed to open stream: No such file or directory in /usr/local/ispconfig/interface/lib/classes/tform.inc.php on line 134
    [Sun Sep 20 12:54:23.005840 2015] [fcgid:warn] [pid 1033] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Warning:  include(/usr/local/ispconfig/interface/lib/lang/.lng): failed to open stream: No such file or directory in /usr/local/ispconfig/interface/lib/classes/tform.inc.php on line 134
    [Sun Sep 20 12:54:23.005846 2015] [fcgid:warn] [pid 1033] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Warning:  include(): Failed opening '/usr/local/ispconfig/interface/lib/lang/.lng' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/local/ispconfig/interface/lib/classes/tform.inc.php on line 134
    [Sun Sep 20 12:54:23.005851 2015] [fcgid:warn] [pid 1033] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Warning:  include(lib/lang/en_dns_soa.lng): failed to open stream: No such file or directory in /usr/local/ispconfig/interface/lib/classes/tform.inc.php on line 141
    [Sun Sep 20 12:54:23.005855 2015] [fcgid:warn] [pid 1033] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Warning:  include(lib/lang/en_dns_soa.lng): failed to open stream: No such file or directory in /usr/local/ispconfig/interface/lib/classes/tform.inc.php on line 141
    [Sun Sep 20 12:54:23.005860 2015] [fcgid:warn] [pid 1033] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Warning:  include(): Failed opening 'lib/lang/en_dns_soa.lng' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/local/ispconfig/interface/lib/classes/tform.inc.php on line 141
    [Sun Sep 20 12:54:23.015970 2015] [fcgid:warn] [pid 1033] (104)Connection reset by peer: [client xxx.xxx.xxx.xxx] mod_fcgid: error reading data from FastCGI server
    [Sun Sep 20 12:54:23.016074 2015] [core:error] [pid 1033] [client xxx.xxx.xxx.xxx] End of script output before headers: index.php
    
    The user and dns zone are created in ISPConfig but its all, nothing more and result is INternal server error.
     
  2. cwispy

    cwispy Active Member

    I have no idea what that issue is in ISPConfig. The module only posts the info into the soap server, ispconfig does the rest. The error appears to be something to do with language translation.
     
  3. webguyz

    webguyz Active Member HowtoForge Supporter

    Upgraded my WHMCS to 6.1.0 yesterday and getting a strange error at the top on the client page for my ispcfg3:

    Warning: Invalid argument supplied for foreach() in /var/www/clients/client1/web1/web/home/includes/classes/WHMCS/Service.php on line 0

    Has anyone else who is running ispcfg3 and upgraded to 6.1 get this error when in Product Details in the clientarea?
    That script its referencing is encoded so I'm not sure what its complaining about. Don't get that error on other products just the ispcfg3.

    Thanks!
     
  4. cwispy

    cwispy Active Member

    Just turn off php warnings with something like this in your php.ini
    E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_WARNING
     
  5. pinkfeet

    pinkfeet Member HowtoForge Supporter

    Hi cwispy,

    first, congratulations for this great code/module.

    I need a little of help, i would like to know how to debug a strange situation.

    I cannot to suspend completely an ISPConfig product in WHMCS, i get "SOAP Error: looks like we got no XML document" when i try it. I said 'completely' because, in fact, the website itself is disabled in ISPConfig but still i get that error and the status remains 'Active' in WHMCS. By last, i can suspend any other ISPConfig product in WHMSC without problems but not this one.

    In "System Module Debug Log" i obtain two entries:

    30/10/2015 19:45 ispconfig suspend web domain 0
    30/10/2015 19:45 ispconfig suspend web domain 295 0

    295 stands for the web number like:

    mydomain.com -> /var/www/clients/client225/web295//

    ISPConfig itself seems to process the suspend action as normal, it shows this if configured in DEBUG mode:

    30.10.2015-18:51 - DEBUG - Found 2 changes, starting update process.
    30.10.2015-18:51 - DEBUG - Calling function 'update' from plugin 'apps_vhost_plugin' raised by event 'server_update'.
    30.10.2015-18:51 - DEBUG - Calling function 'update' from plugin 'network_settings_plugin' raised by event 'server_update'.
    30.10.2015-18:51 - DEBUG - Network configuration disabled in server settings.
    30.10.2015-18:51 - DEBUG - Processed datalog_id 21664
    30.10.2015-18:51 - DEBUG - Calling function 'update' from plugin 'apps_vhost_plugin' raised by event 'server_update'.
    30.10.2015-18:51 - DEBUG - Calling function 'update' from plugin 'network_settings_plugin' raised by event 'server_update'.
    30.10.2015-18:51 - DEBUG - Network configuration disabled in server settings.
    30.10.2015-18:51 - DEBUG - Processed datalog_id 21665
    30.10.2015-18:51 - DEBUG - Calling function 'restartHttpd' from module 'web_module'.
    30.10.2015-18:51 - DEBUG - Restarting httpd: /etc/init.d/apache2 restart
    ...

    For this, honestly i don't know where could be the problem, please could you tell me how to debug the call ispcfg3_SuspendAccount ?

    Thanks a lot cwispy,

    Regards,
    Pablo
     
  6. cwispy

    cwispy Active Member

    Hi Pablo,

    You can turn on module logging in WHMCS and see what the error is that the module is getting. It sounds like the module is trying to disable something that does not exist for that account your having trouble with.

    cwispy
     
  7. Aivaras

    Aivaras Member

    Hello,

    I was testing module many times, but it always creates a bad DNS records.
    Always the same problem with DNS zone > Records
    "ERROR
    No server selected"

    Dns zones created by ispcfg always have empty "server" field and do not work/impossible to edit (just delete and create manualy always. ) Dns zones created manualy by me, always have field "server filed" by ns1.<myserver>.com.

    Can anyone help please?
     
  8. cwispy

    cwispy Active Member

    Do you have the DNS server listed in the server group in WHMCS?
     
    Aivaras likes this.
  9. Aivaras

    Aivaras Member

    Do you have in mind that the DNS servers (ns1.domain.com and ns2.domain.com) must be added to the whmcs servers group:
    Setup > Products/Services > Servers > Groups > Ispcfg3
    along with the other ispcfg/hosting servers? :)

    And also what means "Zone IP Addresseg" (Syntax: NS1,NS2,Emailname,Templateid,Zone IP Addresseg) in the Setup > Products/Services > Product > Module Settings
    This must be:
    primary DNS name server IP address
    or
    IP addres of web server where ispconfig web interface installed
    or
    server IP, where hosting account will be created?
    If it must be server IP, where hosting account will be created, what to do if there are multiple servers?
    :)
     
    Last edited: Nov 4, 2015
  10. cwispy

    cwispy Active Member

    Hi Aivaras,

    Is there a question in there, or is this post just a comment? Sorry I do not understand what your asking if its meant as a question.

    cwispy
     
  11. Aivaras

    Aivaras Member

    This post is two questions :)
     
    Last edited: Nov 5, 2015
  12. webguyz

    webguyz Active Member HowtoForge Supporter

    Aivaras,
    Yes you need to include your ISPCONFIG dns server in the WHMCS group. We use a single DNS server on our multiserver setup and have 2 mirror servers of the dns. We only have the primary DNS server in the whmcs group, not the 2 mirrors

    The Zone IP value gets overwritten later in the code so it not important in a multiserver setup
     
    Aivaras likes this.
  13. concept21

    concept21 Active Member

    My system also encounters a new problem after upgrading to Ubuntu 14.04:
    ispconfig3 : PHP Warning: Illegal string offset 'FriendlyName' in /var/www/.../web/.../something.php on line 0

    Anybody knows how to repair it?
     
  14. Aivaras

    Aivaras Member

    I have added master-DNS server in to the group, but now even more strange situation..

    Ispcfg module creates looking-good DNS records, but they do not work! :)
    Records created by ispcfg module:
    ------------------------------
    A my-domain.com. 100.100.100.100 0 3600
    A my-domain.com. 100.100.100.100 0 3600
    A mail 100.100.100.100 0 3600
    A www 100.100.100.100 0 3600
    CNAME www my-domain.com. 0 3600
    MX my-domain.com. mail.my-domain.com. 10 3600
    NS my-domain.com. ns2.hosting-website.net. 0 3600
    NS my-domain.com. ns1.hosting-website.net. 0 3600
    ------------------------------
    DNSViz shows 8 errors (example there: http://dnsviz.net/d/paidto.info/dnssec/)

    If I deleted this automatically created (by ispcfg) zone and add zone manualy (in the ispconfig web interface) using default DNS template, DNS records looks like this:
    -----------------------------
    A my-domain.com. 100.100.100.100 0 3600
    A mail 100.100.100.100 0 3600
    A www 100.100.100.100 0 3600
    MX my-domain.com. mail.my-domain.com. 10 3600
    NS my-domain.com. ns2.hosting-website.net. 0 3600
    NS my-domain.com. ns1.hosting-website.net. 0 3600
    -----------------------------
    DNSViz exapmle of MANUALY created website DNS records on the same system: http://dnsviz.net/d/surasti.lt/dnssec/
    Where is the difference and why does not work automatically created DNS records?
    Please help :(
     
    Last edited: Nov 5, 2015
  15. Aivaras

    Aivaras Member

    I have removed manualy two records from automatically created zone:
    A my-domain.com. 100.100.100.100 0 3600 (duplicated)
    and
    CNAME www my-domain.com. 0 3600
    and now DNS works fine...
    Very strange.. Why these record is bad/ wrong? and how to fix it in ispcfg3.php? :)
     
  16. radim_h

    radim_h Member

    Hello,
    i tried the module after some time and everything is working fine, it is great ! (havent tried with multiserver setup yet)

    I'd lik to change format of username in ISPconfig. Instead of have it created from domainname, use same number as Customer No. (whmcsdb.tlbhosting.id)
    So username will be something like "hosting450"
    Can you please point me to the code or what i could change ? I can't find part, where username is derived from domainname...
     
    Last edited: Nov 6, 2015
  17. webguyz

    webguyz Active Member HowtoForge Supporter

    cwispy,
    Have you by any chance tried ispcdfg3 with WHMCS 6.1.1? I upgraded and when I go to Products and try to modify one of my existing ispcfg3 products or add a new one, my screen is blank. I don't have a problem pulling up other Products and seeing them, only the ispcfg3.

    I tried the default template and it does not work there either.

    I downloaded the most current version of ispcfg3.php and installed it to test and it does the same thing.
    Would be great to know if anyone else using ispcfg3 has upgraded to the latest version of WHMCS (6.1.1) and whether they can see anything in the product config.

    Thanks!

    !! Followup: It was another server module from an old WHMCS addon that I was not even using anymore causing the problem. I opened a ticket with WHMCS and they helped me find the problem. Was not an Ispcfg3 issue at all.
     
    Last edited: Nov 10, 2015
  18. radim_h

    radim_h Member

    Hello,
    i was testing it with 6.1.1. and it worked
    If you want to see the error instead of bank page in wHMCS go to menu Setup-> General Settings ->Other and check on the bottom "Display Errors Tick to enable PHP Error Reporting (Not recommended for production use)"
     
  19. webguyz

    webguyz Active Member HowtoForge Supporter

    I have that display Errors option ticked and its not helping. When I go to Servers I can't add a new server or edit an existing one so its more then just an ispcfg3 issue. Will check out WHMCS forums and if I can't find anything out will open a WHMCS ticket.

    Thanks!

    !!Followup: Was another server module causing the problem, not Ispcfg3.
     
    Last edited: Nov 10, 2015
  20. cwispy

    cwispy Active Member

    The username that is created in ISPConfig is the same as the username for the product in WHMCS. So you might want to look at how your creating the username in WHMCS. Otherwise look at the variable $username in the ispcfg3.php file and adjust it as you require. Just be sure to change it everywhere so that it matches all the way through or you may end up with issues.
     
Thread Status:
Not open for further replies.

Share This Page