Featured Post

One of the Best Places to Work in Houston

In 2014, Forbes rated Houston as one of the Best Places for Business and Careers. BusinessWeek ranked Houston as the Best City for New College Grads. And this same year, Business Insider went on to name Houston as the Best City in America. Indeed, some of the most desirable places to work in the entire US are located right here in the Bayou City, and according to the Houston Chronicle — we’re pretty high up on the list.

TWP Houston 2014 AW Logo

This past weekend, cPanel was selected, amongst hundreds of companies, as one of the Top Workplaces in Houston. More specifically, we were ranked 6th in the “Mid-Size Company” category when it comes to job satisfaction, as surveyed by employees. This news, which arrives on the heels of a new version release of the cPanel & WHM product, adds to a growing list of wonderful things happening in the cPanel ecosystem.

Between flexible work schedules, company outings, and limitless opportunities for continuing development, our Employee Support Department (ESD) works hard to keep each employee happy and eager to come to work each day (it also doesn’t hurt to have daily catered lunches and a monthly “Sweet Treat Day”).

“We work really hard to make sure we don’t just hire brilliant people; we hire people who are passionate about what they do and have the innovative skills to take our company to the next level.”

– Shaun, ESD Coordinator

One of the most exciting things about cPanel is that we’re always growing. We’re constantly looking for new talent to join the team and become a part of our mission. Make sure to stop by our jobs site and check out the latest openings. You can also learn more about cPanel’s culture and take a peek into what goes on behind the scenes. And if you feel compelled, submit your resume to find out why some consider cPanel one of the best places you could ever work.

Take a peek:

, | Category: Inside cPanel® | 2 Comments

cPanel & WHM 11.46 Webinar

In case you missed last week’s webinar on cPanel & WHM 11.46, we’re happy to provide you with a nifty recording of the discussion. Feel free to share the new knowledge with your team and we hope to see you at the next event. Cheers!

-The cPanel Team

Category: Product Development, Tips & Tricks | Leave a comment

Denver, here we come!

cPanel Conference 2015 is heading to the Mile-High City.

denverSkyline-1200x800

Denver will be the host city to cPanel Conference 2015!

After a successful run in Houston, the cPanel team knew that we wanted to make the 10th anniversary of cPanel Conference extra special. We wanted to bring our signature event to a city that not only embodies innovation, but is also loaded with personality. After careful consideration, we are happy to announce that Denver, Colorado will be our host city for cPanel Conference 2015!

We are inviting all of our friends from across the world of hosting to join us September 14-16 at the Westin Denver Downtown for this special event. Experience the newest updates to cPanel & WHM along with the great city of Denver as we take cPanel Conference to new heights.

Stay tuned for more information on how you and your company can get involved!

Category: Product Development | Leave a comment

Introduction to using the WHM API

Hey everyone!

This post is meant to be a brief overview for using the WHM API. We’ll explore two methods of using the API – from a browser and from a Perl script on the command line.

Finding out what you can do with the API

You can view a list of all the Available Functions for the API calls at http://documentation.cpanel.net/disp…ions-Functions. We’ll reference this page later when we’re constructing our API commands. You can also get specific details about each function by clicking the item, such as the adddns function at http://documentation.cpanel.net/disp…API+1+-+adddns which we’ll be using throughout this guide as our example.

Using the API in a Browser and Constructing the API URL

The easiest way to get familiar with the cPanel API is to call a function using your browser. Just like visiting a website by entering a URL, you can enter a URL that will perform API calls. During your use of the WHM interface you’ve likely noticed additional data after the typical URL of https://x.x.x.x:2087 and we can manipulate that data to perform administrative functions on the server. Although calling functions using the API may seem redundant since you’re already logged into WHM, and thus have full access to the interface and available GUI tools, it will let you see if your API call works as you expect and gives you some helpful output (in either JSON or XML format, whichever you prefer) if you do run into problems.

Here’s an image that shows the basic formatting of an API call – this looks a lot like the familiar WHM login of https://x.x.x.x:2087 but just includes extra data after the session ID.

WHM_API_1_breakout

***NOTE***
The following methods assume you’re already logged in to WHM as root and have a security token. This means that you’ll have a unique, 10-digit session ID in the format of https://x.x.x.x:2087:cpsess##########. In the following examples I’ll just use the localhost IP of 127.0.0.1 and cpsess########## to avoid confusion so be sure to edit these commands with the appropriate details for your own server if you want to try these out for yourself.
**********

Using the URL

Now that we have a basic idea of what the URL should look like, let’s perform a basic task with the API – creating a DNS zone. According to the functions page listed earlier in this guide we’ll want to use the “adddns” function. If we follow the URL formatting guide above and the layout details from the function guide at http://documentation.cpanel.net/disp…API+1+-+adddns we can construct our URL to look like this:

https://127.0.0.1:2087/cpsess##########/json-api/adddns?api.version=1&domain=example.com&ip=127.0.0.1

If we analyze this command using the above URL breakout image we have the following areas::

-The “output format” is JSON

-we’re using the “adddns” function

-The API version we’re using is version 1

The rest of the command is the variables that the function requires to operate. I’ve just used “example.com” for the domain to create and I’m setting it up on the IP of 127.0.0.1

Now, assuming we’re already logged into WHM, we can enter that command in our browser – you should receive JSON output that looks similar to the following, but depending on your browser this could be all displayed on one line.

{
   metadata: {
      result: 1,
      version: 1,
      reason: 'Added example.com ok belonging to user root',
      command: 'adddns'
   }
}

In general, when working with JSON, “1” indicastes positive output, meaning the action completed successfully. We can see from this output that the domain was accepted and example.com has been created on the server. If we check out WHM >> Edit a DNS Zone you should see example.com in your list now, and selecting it will show a zone file with all the default cPanel records:

example1_adddns

Using Custom Code for API Calls

The second way to interact with the cPanel API is to call the API functions through custom code. When writing your own code there are many options limited only by your creativity. The examples here are just that – examples to show you the basics so you can see how the API code functions within a Perl script. They are by no means exhaustive in any way.

Prerequisites

Since this code will be called from a file we need to have a way to interact with WHM so we use an access hash so our commands are authenticated just as if we were clicking items in the WHM interface. An access hash is a way for a program to access a server without having to use the root password. This hash is used for several things in the cPanel system, most notably setting up DNS Clusters. To create this hash you can visit WHM >> Remote Access Key. There is likely a key already in place on your server – if this is the case it’s best to just use what already exists. If there isn’t a key in place you can generate one with the blue “Generate New Key” button on the right.

access_hash

That long string of text is what we’ll need to use in our file. You can also find that at /root/.accesshash. We’ll need to add that block to line 14 of the code in the example below.

Since we’re working with Perl we’ll also need some of the standard Perl modules installed on the server. You’ll want to run the following two commands to get these modules installed:

yum install perl-XML-Simple
/scripts/perlinstaller LWP::Protocol::https

Building the Code

Now that we have the access hash we can use that in our code to authenticate our script to make an API call. Just like in our first example, here is some code that will create a DNS zone for example2.com. I’m using example2.com since we already created example1.com in our previous test. You can copy and paste the following code into a file named dns-example.pl using your favorite text editor. The file is named with the “.pl” extension because it is a Perl script. It looks like there is a large amount of code necessary to create a DNS zone, but much of this is just the access hash.

#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
use XML::Simple;
use Data::Dumper;
use HTTP::Cookies;
 
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
 
my $hostname = 'localhost';
my $protocol = 'https';
my $accesshash = <<'END';
a1afa058158ada545f9cd9c0bb3cde63
0baa595074c2e42e2f8513103688eb6c
bb6c343a05826b6b6e300b77e566b876
de4c14ad947efc3d27566c5bc69caeea
4edcb02301fb87b49bcf2e7ccfb4184a
b42b83f41ded645c7c9061ab369bddc9
c786062777d7832e123a8334f56aef3e
4388f368249022cabde665d7261ab88a
70d030daefafdaead1ce815e98558d6c
cb7bbc1052a60df4ed110e0c0f909bd6
efc43e9923542e290fc6209d038adae9
bee24339bf9d849fcd78c50d29474193
dfeb9de9f979cb06e90d3d66b618369d
180ae4382550a177316f872254739990
8b5de8ab871029a47f29ccd90ee5e52f
b12bf41f37de3ead8cdd26027d50364d
1a6df8c0f2d29ecd29aab9254eeb6808
d232f1e729453a5a5de27e276e9bba1d
8a27ba0d4690af299d4e461757bfa412
1a0bb3474b46d14926ff7351a1d2d550
b19351d670c82c82cfdf661ed7effc8d
530af69720062aa62e48ea5c45261691
d2c49b4def5f2e47beac5f796304a024
4ecb921948a8c77c00d78a4fee6e8743
7430731106a8f56e2853798533672868
d92f2eb9b9444492ac2701f1367e0b9f
843078ac419a2e6a90342848f756edde
1dfb59a5fdfed2ad8954ec3c2ee7b868
2c9aa7f30d722a566d755b54778c6a96
END
$accesshash =~ s/\n//g;
my $useragent = LWP::UserAgent->new(
cookie_jar => HTTP::Cookies->new,
);
$useragent->default_header( 'Authorization' => "WHM root:$accesshash" );
 my $url = "$protocol://$hostname:2087/json-api/adddns?api.version=1&domain=example2.com&ip=127.0.0.1";
 my $response = $useragent->get($url);
 my $response_data = $response->decoded_content;
 print $response_data;

When you go to use this code you’ll need to replace lines 14-42 with your own access hash. There are also ways to have the script read the access hash directly from the server but that level of programming is beyond the scope of this guide.

To better understand what is happening in this code, here is a line-by-line description:

Lines 1-48: Creates the user agent and declares variables, including the access hash
Lines 49-51: The actual API code
Line 52: The output from the code

You’ll also need to make sure the script has executable permissions so it can run on the server. After you’ve saved the file with all of your changes you can issue the following command from shell to change the permissions so the script can be executed

chmod 755 dns-example.pl

If this code were being used in a production environment the “&domain=example2.com” and the “&ip=127.0.0.1″ sections would ideally be variables that get their values from data entered by a user through some type of form. However, since we’re just providing an example of how the code works outside of a working graphical interface they’ll need to be hard-coded.

Executing the Script

Once you have the file saved you can execute it by running the following command:
/usr/bin/perl dns-example.pl

If everything goes well you should get output that looks similar to the following:

example_output

Just as with the previous JSON results, seeing “1” in the output indicates that the action completed successfully. If you check your /var/named/ directory you should see the DNS zone file for example2.com.db which looks like this:

final_zone

I hope that gives you an idea how the WHM API works and that you found these examples useful!

Category: Tips & Tricks | 9 Comments

Upcoming changes to the cPanel end-user webmail experience in 11.48

I want to give people a preview of some changes we’re working on as we bring Paper Lantern to the webmail interface of cPanel & WHM. It’s more than skin deep, as you’ll see below.

Step 1 – Login

Step 1 - Logging in

You always have to start at the beginning. In this case, step 1 of the webmail user-experience stays the same. The user signs in to their account.

Step 2 – Inbox

Step 2 - The user sees their inbox

After the user signs into their account, they see their inbox. When we don’t know they’re preferred webmail application, we ask them only once. After they set a default, boom, inbox immediately after login.

Yes, really.

Don’t worry. All of the configuration options like Email Filtering, Auto-responders and Forwarders are all still there. We’ve relocated them into the User Preferences pulldown at the top right just like we did with the User Preferences in the cPanel Paper Lantern interface.  The top navigation now appears on every page, including inside each webmail application.

Webmail Configuration Options

Additionally, the customizations to Paper Lantern from the cPanel account that owns this webmail account apply here as well. If you upload a company logo, configure a documentation or help url, or apply a company stylesheet, your webmail users now get that experience as well.

With these changes, we put the emphasis on reading email, rather than accessing these options, because…well…it’s the number 1 reason users access webmail.

Category: Product Development | 2 Comments

MariaDB® support is coming in 11.48

In order to provide you with greater flexibility and more database options, we will be adding MariaDB 10.0 database support to cPanel & WHM version 11.48 in the first quarter of 2015.

MariaDB acts as a MySQL® replacement, and all interface and API function calls that refer to MySQL will work seamlessly with MariaDB, too.

Please note that if you upgrade to MariaDB 10.0, you cannot revert to MySQL. The system cannot safely perform downgrades, and it considers MariaDB to be an upgrade from MySQL.

Also, please note that some of the interfaces will still display MySQL after you install MariaDB. In future releases, we will update the user interface to explicitly reference MariaDB if you decide to upgrade to MariaDB.

Category: Product Development | 3 Comments

Our Hands Got a Little Dirty: cPanel Conference 2014 Recap

This past week, Andrew Davis explained how his quest for meatloaf led him to discover that Google is the center of our universe, Cody McClain reminded us of the importance of adventure—even when you’re building a company, and roughly 400 web hosting professionals turned a city known for oil & gas into their own personal playground.

10277706_10152764171071788_529944891356277928_n

The ninth installment of our annual cPanel Conference began last Monday. After a day filled with unloading, unpacking, organizing, and other forms of physical activity foreign to people who work in tech, the cPanel team waited as our first exhibitors strolled in that afternoon to prepare for the coming days.

10698531_10152764603146788_657713486842313055_n10665833_10152764601651788_4909086051473318728_n

Our exhibitors, who came prepared to dole out endless amounts of t-shirts and goodies, also came equipped with some of the most elaborate booth setups we had ever seen. The SSL Store brought out every tailgater’s favorite pastime, cornhole, SoftLayer challenged attendees to a high-intensity server installation game, and our friends at McAfee gave away brand new iPhone 6’s to a few lucky guests. But perhaps the most exciting thing on the exhibit floor was WHMCS’s assortment of specialty sodas, which included flavors such as graham cracker, PB&J, s’mores, and our personal favorite, bacon.

10305031_10152764602456788_2591494600210587055_n 10712899_10152764602746788_8682202410111066149_n 10270543_10152764170211788_1513367789314555498_n 10449531_10152764220521788_8270592206427641476_n

When the guests weren’t snagging free knick-knacks and enjoying games in the exhibit hall,  they were attending sessions put on by cPanel’s very own employees and some of our very special guests. Some of the sessions available for our guests included “The Latest Stories from the Nasty Edge of the Net” and “How to Not Develop Crappy Plugins” (we pride ourselves on doing this whole conference thing a little different). From engaging keynotes to hands-on workshops, our attendees could choose to sit back and absorb information, or dive into a lab and start playing around with new technology.

As with any conference, the true value comes from the opportunities offered to connect with other professionals and interface with potential clients. With that in mind, we made sure to add our special cPanel touch to the provided networking sessions. From opening night, where we enjoyed food and live music from guest DJ Elle Morgan, to the closing event where we all reunited with our inner twelve-year-olds at the Houston barcade, Joystix, our evenings were spent with laughter, festivities and lots of moments to truly get to know the faces and personalities behind the hosting industry.

10665193_10152764925216788_8476445808596813407_n It’s pretty easy to understand why the cPanel Conference is one of our favorite times of year. In three intense days, knowledge was gained, fun was had, and the big world of hosting became a little smaller. And while we pride ourselves on connecting hosting providers with website owners, we have to admit that sometimes it feels pretty good to just connect people…with people.

Sign up here to find out where we’re taking cPanel Conference 2015. Also, be sure to head over to our Facebook page to check out all the photos from the event.

, | Category: Inside cPanel®, Partners & Customers | 1 Comment

A preview of what’s possible with Paper Lantern

While developing customization support for Paper Lantern, the team and I created a number of styles to explore what is now possible.  Here are some screenshots of the kinds of styles we created internally.  Which one do you like the best? Can you think of any ideas we should explore?

Continue reading

Category: Product Development | 2 Comments

Visit WHMCS in Booth #1 at cPanel Conference

This post was provided by WHMCS, the exclusive Diamond sponsor for cPanel Conference 2014.


With just under 2 weeks to go until the cPanel Conference: Hands On Houston 2014, we’re busy preparing for our favorite conference of the year. And this time, we’re doing it in style!

Continue reading

, | Category: Special Guests | 3 Comments

Dealing with InnoDB Corruption – Common Misconceptions

InnoDB, given its (relatively) recent change as the default engine of MySQL, can quickly take an unfamiliar administrator off-guard if they’re not aware of the way that InnoDB works behind the scenes. With that in mind, there’s a few key concepts you should probably be aware of if you’re working with any InnoDB tables – which, if you’re running cPanel on a remotely updated system, then by default, you are:

Continue reading

Category: Tips & Tricks | 9 Comments
Page 1 of 1512345...10...Last »