New cPanel login theme!

cPanel Login Theme

New cPanel Login theme

Take a look for this is your new VlexoFree cPanel Login theme. ūüėÄ

It took me a little while to finish this as I had to wait on cPanel staff for almost 2 weeks just to be told that they are not 100% themer friendly. I worked around the problem and finished it all up today.

I think I tested everything pretty well. The theme works alright on IE8 or above but works the best on Firefox, Chrome, Safari or Opera (basically anything but IE).

What do you think, Like it or hate it? Cast your vote people!

Remember, you can access cPanel at

Plan addon domain typo

Nothing big here but I have just realized that on the plans page I had the number of addon domains listed ad “2” for the Personal 300 plan when accounts were¬†actually¬†being created with only one.

I have fixed this problem by adding an one more addon domain to everyone on the P300 plan.

Enjoy your extra addon domain slot ūüôā

How to use PECL with /tmp mounted with ‚Äúnoexec‚ÄĚ

The situation here is that you run a server and when trying to install a PHP module via PECL you receive the “checking whether the C compiler works… configure: error: cannot run C compiled programs.” error followed by the build failing.

The problem is that PECL is trying to write and run the files its trying to build in your /tmp directory, but your /tmp directory is mounted with “noexec” so the files can not be¬†executed. What you will see will look something like this:

Note: I’m building APC on a cPanel CentOS server.

$ pecl install apc
downloading APC-3.0.19.tgz ...
Starting to download APC-3.0.19.tgz (115,735 bytes)
.........done: 115,735 bytes
47 source files, building
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
Use apxs to set compile flags (if using APC with Apache)? [yes] : yes
building in /var/tmp/pear-build-root/APC-3.0.19
running: /root/tmp/pear/APC/configure --with-apxs
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
ERROR: `/root/tmp/pear/APC/configure --with-apxs' failed

One solution out there is to unmount then remount /tmp without ‘noexec’ when trying to build via pecl, but this method opens up a security hole in the server for the time you have it mounted without ‘noexec’. The next method is to build the¬†module yourself using the typical “phpize”, “./configure” then “make install”. This method is better then the first but this one is just a workaround for the problem making you unable to use PECL and still makes you od much more work then you have to with PECL.

My solution to this seems to be the most simple, and easiest one of the bunch. All you have to do is create a symlink from where PECL wants to save and run the files to somewhere where it can run them, in this case /root/tmp, with the following command:

$ mkdir /root/tmp/pear-build-root && ln -s /root/tmp/pear-build-root /tmp/

After running that command (as root or other super user) retry installing your module via PECL and it should now work without issue.

Automatically install DomainKeys on new accounts in cPanel

DomainKeys is an e-mail authentication system designed to verify the DNS domain of an e-mail sender and the message integrity. cPanel supports this but the feature is disabled by default on new accounts. If you want to make it easy on your users and enable this automatically you just need to add a few lines to your postwwwacct file.

The following code runs the domain_keys_installer script at then end of a new account creation, thus enabling DomainsKeys for all new accounts.

Create (if not already there) /scripts/postwwwacct then copy and past the following code into the file:

$opts = array();
$argv0 = array_shift($argv);

while(count($argv)) {
 $key = array_shift($argv);
 $value = array_shift($argv);
 $opts[$key] = $value;
shell_exec("/usr/local/cpanel/bin/domain_keys_installer " . $opts['user']);

DomainsKeys will now be installed on all new accounts you create.

Automatically exclude backing up new accounts in cPanel

cPanel is setup so is that if automatic backups are enabled in WHM then every new account will be added to the backup list. If you’re picky about which accounts you want the be backed up and don’t want to manually¬†exclude the¬†accounts¬†upon creation, you can use this method.

What the following code does is writes the username of the account currently being created to the system’s /etc/cpbackup-userskip.conf file to be¬†excluded¬†from backups.

Create (if not already there) /scripts/postwwwacct then copy and past the following code into the file:

$opts = array();
$argv0 = array_shift($argv);

while(count($argv)) {
 $key = array_shift($argv);
 $value = array_shift($argv);
 $opts[$key] = $value;

$fp = fopen('/etc/cpbackup-userskip.conf','a');

All new accounts will now be excluded from the backup list!