Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Integrate custom plugin with WHM default theme?

Discussion in 'cPanel Developers' started by Dharmik Soni, Apr 24, 2019.

Tags:
  1. Dharmik Soni

    Dharmik Soni Registered

    Joined:
    Apr 24, 2019
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Pune
    cPanel Access Level:
    Root Administrator
    Question: How can i integrate default whm theme (x) with custom whm plugin UI. I have tried following the guidance on

    1)whm plugin - interface
    2)create a new whm interface in template toolkit
    When i run script index.cgi it gives me
    "
    Internal Server Error
    500

    No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/watch7/index.cgi): The subprocess reported error number 72,057,594,037,927,935 when it ended. The process dumped a core file.


    cpsrvd Server at vps235171.example.com"


    ->main.tmpl
    is using default script provided on Tutorial - Create a New WHM Interface in Template Toolkit - Developer Documentation - cPanel Documentation

    ->Below is my index.cgi script code
    ----------------------------------------------
    Code:
     #!/bin/sh
    eval 'if [ -x /usr/local/cpanel/3rdparty/bin/perl ]; then exec /usr/local/cpanel/3rdparty/bin/perl -x -- $0 ${1+"$@"}; else exec /usr/bin/perl -x $0 ${1+"$@"}; fi;'
      if 0;
    #!/usr/bin/perl
    #WHMADDON:watch7:Watch7 - Instant Installs
    use strict;
    BEGIN { unshift @INC, '/usr/local/cpanel/whostmgr/docroot/cgi/watch7'}
    use warnings;
    use Whostmgr::ACLS          ();
    use Whostmgr::HTMLInterface ();
    use Cpanel::Form ();
    use Cpanel::Template ();
    Whostmgr::ACLS::init_acls();
    if (!Whostmgr::ACLS::hasroot())
    {
            print "Content-type: text/html\r\n\r\n";
            print "You do not have access to LogView, Please contact your Server Adminitator.\n";
            exit();
    }
    else
        {
            _headers("text/html");
            my $template_file = '/usr/local/cpanel/whostmgr/docroot/templates/main.tmpl';
            Cpanel::Template::process_template(
                'whostmgr',
                {
                    'template_file'            => $template_file
                },
            );
        }
    # my $URL;
    # if ( 'root' eq $ENV{'REMOTE_USER'} ){
    #     $URL = "../cgi/watch7/index.php";
    # }else{
    #     $URL = "../cgi/watch7/index.cgi";
    # }
    # print "Location: $URL\n\n";
    
     
    #1 Dharmik Soni, Apr 24, 2019
    Last edited by a moderator: Apr 24, 2019
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,272
    Likes Received:
    2,154
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @Dharmik Soni,

    Can you open a support ticket so we can take a closer look to make sure you are correctly performing the steps referenced in our documentation? You can post the ticket number here and we'll link this thread to it.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice