Riz Khan on April 27th, 2010

Perl is normally installed without thread support, but you may need to install threaded perl on your server to fulfill requirement for any application or for perl based software development.
This require additional -Dusethreads parameter used during the configuration step of installation. Below are the exact steps that you can follow to install threaded perl on your server :

wget http://www.cpan.org/src/perl-5.8.8.tar.gz
tar -xzvf stable.tar.gz
cd perl-5.8.8
./Configure -Dprefix=/usr -Dusethreads
make test
make install

and you are done !

Tags: , ,

Riz Khan on April 24th, 2010

Cpanel now support the optional apache module mod_spelling using which you can have the optoin for your URLs to load even if they have one spelling mistake or there is one capitalization error, which would give non found 404 otherwise as Linux is cases senstive operating system.

e.g. If you have below URL :


Then after installing mod_spelling and enabling it for this domain the below URLs will also open above page :


And if with one correction the module see more than one options matching the criteria then it will give you option to load any of the available pages.

Below is how you can achieve this.

First run belwow on Cpanel based server :


And select ‘Spelling’ from the available module list for apache.

Once apache/php are recompiled with this option and easyapache finishes, you can put below code in the .htaccess to apply it to any directory/directories :

< IfModule mod_speling.c >
CheckSpelling On
< / IfModule >

Enjoy !

Tags: , , ,

When sending emails from scripts, not setting proper from address can give two problems, once is email ending up in spam/junk box of recieving email server and second is that the return path would be user@server.hostname.com.

To avoid this and to setup return path using php mail() function you need to use the fifth parameter of php mail() function :

Reference : http://php.net/mail

bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]] )

You can see above that the parameter 4 and 5 are optional. Exim supports the 5th parameter and you should be able to setup the return path using format like below like this:

mail($email, $subject, $msg, $mailheaders, "-f$from_email");

Tags: , , , ,

Riz Khan on April 24th, 2010

If you happen to mess up your ssh configuration some how and lock yourself out of ssh then you can reset the ssh config from Cpanel using below method :

  • Login to WHM on non secure port i.e 2086
  • And then use below URL to reset the config :


If it do not help in your case then ofcourse you either need to contact your hosting/data center or can use KVM if you have it installed for your server.

Tags: , , ,

Riz Khan on April 24th, 2010

You can export the mailman mailing list memebers using below steps :

cd /usr/local/cpanel/3rdparty/mailman/bin
./list_members mailinglistname_domain.com > /home/username/list.txt
chown username:username /home/username /list.txt

mailinglistname_domain.com is the name of the mailing list (@ changes to_ )

Tags: , ,

Riz Khan on April 24th, 2010

If you want to redirect your visitors every time they catch into an HTTP 404 error, use can use the below code in your .htaccess file :

ErrorDocument 404 /errors/notfound.html

This redirects the user to /errors/notfound.html whenever a 404 error happen. You can of course redefine also other http errors codes (403, 500… and so on)

Tags: ,