Creating a cPanel auto-installer ISO

Over the past few weeks I have been working on a custom spin of the CentOS installation image that automatically installs cPanel.  This ISO also performs some pre-installation configuration and installs updated packages as well as installing cpanel.  I think this information is handy for anyone who wants to create a CentOS installation image, whether for cPanel or for something else.  To create the installation image, we will modify the CentOS installation DVD; adding in …

Recommendations From The Field

Working on the front lines, I have an opportunity to see how cPanel/WHM customizations are implemented in practice.  Often, I encounter novel ways of assembling our hooks and APIs to provide functionality.  However, there are times when I wonder if I saw this in the CodeSOD segment on a popular developer website that offers free stickers. You want to automate or customize cPanel, what should you do? Before beginning your project,  I recommend that you …

Known Integration Issues inside of 11.25

As most of you probably know, we released 11.25 to our RELEASE branch this week.  This is a major change to cPanel/WHM which presents some issues with integration.  I have been trying to track as many integration support requests as possible so that I can get an idea of what common issues have arisen.  Here is a summary of the issues and what we are doing about them. …

How to trace the cPanel API

At this point, cPanel’s APIs are not 100% documented.  We are working on it and hope to have complete API docs up in a few months.  I’ve written a CustomEventHandler that will print every API call made into cpanel’s error_log (/usr/local/cpanel/logs/error_log). Installation To use the API Tracer, you will need to download it, then place the Dumper.pm file at /usr/local/cpanel/perl/Dumper and the CustomEventHandler.pm file at /usr/local/cpanel/Cpanel. Once this has been put into the proper location, cPanel …

Troubleshooting the XML-API

We have had a flurry of integration tickets over the past week, which is awesome to see.  Most of these tickets have come down to a couple of basic problems.  The first of which is due to some confusion about how to utilize HTTP to call  an API function.The second problem appears to stem from a lack of information API troubleshooting tools that come with cPanel/WHM. The first of our common problems stem from some …

Spotlight On: The cPanel Interface – Icons, Groups and Variables

This past week we have been working on documenting how to add icons and groups to cPanel without using our plugin generator.  Writing DynamicUI files is a direct and flexible approach to adding custom groups, icons and extra logic not available through the plugin generator (boolean ExpVar checks, etc).  During the course of documenting this, we realized that we also needed to document the variables available within the cPanel interface.  These are referred to …

XML API PHP class version 1.0

Some of the reasons why there hasn’t been many updates lately include our cPanel conference, the cPanel/WHM 11.25.0 release, and the release of the XML-API PHP class 1.0.  If you are not familiar with the XML-API PHP class, it makes interacting with the XML-API much more simple by implementing functions that allow you to call your remote cPanel server without ever having to touch cURL or simplexml.  This works by implementing a function for every …

Spotlight On: WHM Plugins & cPanel PHP

If you haven’t noticed, we’ve been working on overhauling our development documentation pretty heavily.  We have a ton of great ways to integrate with cPanel but until recently, no information on how to use them.  Starting this week, every week I will be posting about what new articles we’ve added to this documentation along with why you should know about these features. Past couple of weeks I personally have been trying to focus on how …

Creating cPanel CGI Scripts

One of the most flexible ways of working within cPanel is by creating CGI applications.  Of course, this isn’t the most efficient method, however sometimes efficiency isn’t your best bet when you’re in a rush.  You can use a standard CGI script within cPanel, you are limited by our APIs, such as what perl version to use. First thing to note, is that these CGI scripts  have to be placed in /usr/local/cpanel/base/3rdparty/ with normal CGI …

WHM Plugins

We really have no information available on how to write WHM Plugins.  I have had 3 people ask me in the past 48 hours on how to write them, so I thought I might want to consolidate and post this knowledge.  A WHM plugin is merely a simple CGI application that has a couple of special comments in it to handle how it is displayed.  Any CGI language can be used here, however only perl …