Hello, I am planning to create my own whm plugin.
So I got an example plugin from some forums and I uploaded it to
addon_hello.cgi to /usr/local/cpanel/whostmgr/docroot/cgi
Now, I can see my plugin in Plugins section of WHM.
But when I click this addon from whm I recieve the following error:
The code of plugin that I have uploaded is following:Code:open3: exec of /usr/local/cpanel/whostmgr/docroot/cgi/addon_hello.cgi failed at cpsrvd-ssl.pl line 5654
Please help in this regard and help me to resolve the error I am recieving.Code:#!/usr/bin/perl #WHMADDON:helloworld:Hello World <b>Example</b> ############################################################################### # This is an example hello world WHM plugin feel free to modify it as you see fit ############################################################################### # Load general use case perl modules use lib '/usr/local/cpanel'; use Cpanel::cPanelFunctions (); use Cpanel::Form (); use Cpanel::Config (); use Whostmgr::HTMLInterface (); use Whostmgr::ACLS (); ############################################################################### print "Content-type: text/html\r\n\r\n"; # Check user has root permissions Whostmgr::ACLS::init_acls(); if ( !Whostmgr::ACLS::hasroot() ) { # User is not root, tell them where to go print "You need to be root to see the hello world example.\n"; exit(); } # Parse input parameters from GET and POST into $FORM{} for later use my %FORM = Cpanel::Form::parseform(); # Print a WHM Header Whostmgr::HTMLInterface::defheader( "Hello World Example Plugin",'/path/to/logo.gif', '/cgi/addon_helloworld.cgi' ); # Print General Output print "<p>Hello world indeed...</p>"; # End Example 1;
Although for me the code of plugin is ok.
Is that any other configuration needed ?



LinkBack URL
About LinkBacks
Reply With Quote
.






