Python changes: 2.7 installed and 2.6 updated

Python Logo
Here’s good news for members who take advantage of our Python!

I’ve installed Python 2.7 for all users; it is located at “/usr/bin/python2.7″. I have also removed my ‘unofficial’ install of Python 2.6 and installed an updated version from the CentOS repos.

Lastly I reconfigured cPanel to use Python 2.6 instead of 2.4.

Enjoy :)

Chromatic cPanel Login theme

Today I am releasing Chromatic, a unique cPanel login theme that VlexoFree members have gotten use to now, free to the public. I have licensed it under GPLv3 so you’re free to do what you wish with it.

Chromatic is fully XHTML 1.1 and CSS3 valid. The theme uses no images (except for the favicon) and all styling is done via CSS. It’s tested with Firefox3 and 4, Opera 10, Safari 5, Google Chrome 6 and IE8.

This theme is great as a elegant streamlined login thats considerably smaller then the default cPanel login theme.

A screenshot (using Chrome on Mac) is below:

Chromatic cPanel Login theme

Chromatic

Demo: WHM | cPanel | webmail

Let me know how you like it and if you see any problems. Also, read the INSTALL file included.

Download Chromatic:
Chromatic-1.0.0.tar

Changelog:
1.0.0 – Initial release

Tips: Speed up your WordPress blog or website

Wordpress Logo

For those of you who use a WordPress blog or use it as a CMS this tip will show you how to dramatically speed up your sites by decreasing your sites’ loading time, bandwidth, load on the server, file size and making use of better caching; all with just one plugin.

The plugin is called W3 Total Cache and  I will show you some of the settings you can enable to take advantage of speed improvements.

First thing you want to do is go into your WordPress control panel and click Add New under the Plugins menu then search for “W3 Total Cache” and click on Install.

Once installed there will now be a menu in your sidebar called Performance; go to General Settings. There you want to Enable the Page Cache using Disk (Enhanced), Minify using Disk and lastly enable Browser Cache. Then click on the Save Changes button if you made any changes. Note: These are the default settings and don’t try to use Opcode caching on our server as SuPHP prevents it from working.

Next click on Page Cache and Enable the Cache 404 (not found) pages setting. Save Changes.

Then click on Minify and check everything under HTML minify settings. Then under Ignored comment stems add the following:

AdCode
LinkBack

Then Save Changes.

After that go to Browser Cache and check/enable everything on the page.

When you have everything set go back to General Settings and Disable the Preview Mode setting to turn the system on.

PHP update: 5.3.2 to 5.3.3

Just a notice to all users that the server’s PHP version has been updated from version 5.3.2 to version 5.3.3.

Changes include:

Security Enhancements and Fixes in PHP 5.3.3:

  • Rewrote var_export() to use smart_str rather than output buffering, prevents data disclosure if a fatal error occurs (CVE-2010-2531).
  • Fixed a possible resource destruction issues in shm_put_var().
  • Fixed a possible information leak because of interruption of XOR operator.
  • Fixed a possible memory corruption because of unexpected call-time pass by refernce and following memory clobbering through callbacks.
  • Fixed a possible memory corruption in ArrayObject::uasort().
  • Fixed a possible memory corruption in parse_str().
  • Fixed a possible memory corruption in pack().
  • Fixed a possible memory corruption in substr_replace().
  • Fixed a possible memory corruption in addcslashes().
  • Fixed a possible stack exhaustion inside fnmatch().
  • Fixed a possible dechunking filter buffer overflow.
  • Fixed a possible arbitrary memory access inside sqlite extension.
  • Fixed string format validation inside phar extension.
  • Fixed handling of session variable serialization on certain prefix characters.
  • Fixed a NULL pointer dereference when processing invalid XML-RPC requests (Fixes CVE-2010-0397, bug #51288).
  • Fixed SplObjectStorage unserialization problems (CVE-2010-2225).
  • Fixed possible buffer overflows in mysqlnd_list_fields, mysqlnd_change_user.
  • Fixed possible buffer overflows when handling error packets in mysqlnd.

Key enhancements in PHP 5.3.3 include:

  • Upgraded bundled sqlite to version 3.6.23.1.
  • Upgraded bundled PCRE to version 8.02.
  • Added FastCGI Process Manager (FPM) SAPI.
  • Added stream filter support to mcrypt extension.
  • Added full_special_chars filter to ext/filter.
  • Fixed a possible crash because of recursive GC invocation.
  • Fixed bug #52238 (Crash when an Exception occured in iterator_to_array).
  • Fixed bug #52041 (Memory leak when writing on uninitialized variable returned from function).
  • Fixed bug #52060 (Memory leak when passing a closure to method_exists()).
  • Fixed bug #52001 (Memory allocation problems after using variable variables).
  • Fixed bug #51723 (Content-length header is limited to 32bit integer with Apache2 on Windows).
  • Fixed bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP >= 5.3).

For a full list of changes in PHP 5.3.3, see the ChangeLog.

New cPanel login theme!

cPanel Login Theme

New cPanel Login theme

Take a look for this is your new VlexoFree cPanel Login theme. :D

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 http://vlexofree.com/cpanel.

Mail Server Issue

About an hour ago I realized that I was not receiving any emails from our server. So I did a few tests and found that no mail was coming out of the server.

Oddly I could not figure out where the exact problem was located so I did a server reboot hoping it would fix it and that did the trick.

All emails that should have been sent were not deleted and were just waiting in our mail queue for the problem to be fixed so they could be sent. And once the server was rebooted all emails in the queue were sent out. They were just late.

I’m really sorry for the inconvenience and hopefully this doesn’t happen again.

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.

“New” website and Blog

Gears

Moving and moving.

In my ongoing effort to improve VlexoFree we now have a “new” website and a new blog!

The reason I’m saying new with quotes is that all the content and the basic look of the site is basically the same. The sidebar styles on the pages are now changed to match the blog and I’ve moved all pages over to be managed by WordPress (except for iPanel and Blesta).

Some pages have been removed from the menu (but can still be accessed if you try hard enough) as they really had no usable content that you cant get from the wiki..

Also, in a addition to VlexoFree related content in this new blog, there will (and already is) other content related to programming, server maintenance and other things that people might find helpful.

I guess if anyone else thinks they could post some useful content on this blog contact me and show me what you got.

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:

#!/usr/bin/php
<?php
$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.