Wrong mail quota in CPanel

May 9, 2010 | Technical Stuffs | , , , ,

Today I found my CPanel displays wrong disk quota for an email account. It shows 58/100 MB (58 MB used, of 100 MB preserved) while actually the mailbox is empty.

I have checked with du -sh command (a command to check disk usage) and it returned 100 KB or something, so there must be something wrong.

After googling around, I got some trick to solve this problem. Perform this action from shell/SSH or simply using file manager in CPanel:

  1. Go to /home/usercpanel/mail/domain.com/emailaccount/.
  2. Delete file named maildirsize, this file stores disk usage information
  3. Change the number of disk quota for that email account from CPanel (inside menu Email Accounts), it will regenerate a new maildirsize file.

Refresh your browser and now you should see the correct disk quota for that email account.

5 comments


Agregator sederhana dengan Yahoo! pipes

May 4, 2010 | Technical Stuffs | , , , , ,

Yahoo! PipesAda 3 blog saya yang ingin saya masukkan ke dalam agregator milik CahAndong, namun saya tidak ingin membebani Kang Zamroni dengan memasukkan 3 URL yang berbeda, dan mungkin bisa bertambah jumlahnya.

Akhirnya saya manfaatkan Yahoo! Pipes untuk membuat sebuah agregator sederhana yang akan mengambil data dari RSS feed di ketiga blog yang saya kelola. Selanjutnya pipes ini akan menyortir entry terbaru (berdasar tanggal posting) dan mengirimkan hanya 9 output terbaru saja.

Saya kurang yakin apakah langkah keempat dalam alur piping di sebelah kiri ini ada gunanya atau tidak, agak malas ngotak-atik lagi hehe.

Enaknya Yahoo! Pipes ini adalah kita bisa memilih output yang diinginkan. Dalam hal ini saya memilih output dalam bentuk RSS, lalu saya grab dan bisa diakses dengan mudah dari alamat rss.sandalian.com 😀

Jadi jika nanti saya nambah blog lagi, saya cukup memasukkan ke dalam pipe ini saja sebagai input awal dan output-nya akan otomatis menyesuaikan.

Beginilah kalau terlalu malas he..he..

9 comments


Create PDF Files For Free

April 11, 2010 | Technical Stuffs | , ,

I was wondering why many people still using Adobe Acrobat for creating PDF files from their documents. It’s bloated –or you can say my computer is too old– and of course expensive! Some minutes ago I’ve checked the price on their website, it costs US$ 299.

Why don’t people find an alternative PDF-maker software which is free and lightweight? I know that you can get any serial number from Internet for Adobe Acrobat to turn that pricey software into a free one. But hey, it’s like stealing from a kid’s pocket.

A few days ago –when I needed a software to convert my documents into PDFs– I found doPDF which is free and lightweight. And most of all, it doesn’t require any Ghostscript installation just like any other PDF printers.

cap-0109

Perhaps it doesn’t have all the features you want and requires you to upgrade to the paid version but it’s enough for me. Awesome PDF printer.

This way I thank to doPDF developer(s) for their great work.

1 comment


Redirect Old URLs to New URLs

April 3, 2010 | Technical Stuffs | , , ,

When we have a completely new website and uses different CMS, there will be old URLs that already spread everywhere on the Net. Discarding old URLs is not an option because we will lost visitors from search engines. So we must redirect all old URLs into new URLs.

Using redirect in .htaccess is great, but when your old URLs contain question mark, most likely it will fail to redirect.

Following code will work:

redirect 301 /old-url.html http://domain.com/new-url.html
redirect 301 /very-old.html http://domain.com/very-new.html  

But following code will –at least in my case– failed:

redirect 301 /file.php?age=old http://domain.com/new-url.html
redirect 301 /file.php?age=old&id=12 http://domain.com/very-new.html  

Luckily there’s 404 directive from Apache using .htaccess. We can mix the power of custom 404 page with PHP to perform this directions stuff. Here’s how to mix them up:

Create custom 404 page using .htaccess

ErrorDocument 404 /redirect.php

Then create file redirect.php with following contents:

< ?php
$req = trim($_SERVER['REQUEST_URI']);
switch($req){
	case "/file.php?age=old":
		$goto = "http://domain.com/new-url.html";
	break;
	case "/file.php?age=old&id=12";
		$goto = "http://domain.com/im-very-new.html";
	break;
	default:
		$goto = "http://domain.com";
}
header ("HTTP/1.1 301 Moved Permanently");
header ("Location: $goto");
?>

By this method, old URLs that are no longer exist are forwarded to our custom 404 page (named redirect.php) and that redirect.php will bring visitors to new URLs.

Nice, isn’t it?

4 comments


Error on Webmail, Query: SELECT “INBOX”

November 7, 2009 | Technical Stuffs | ,

If you got following error message when accessing webmail using Squirrelmail or other brand:

Query: SELECT “INBOX”
Reason Given: Internal error occurred. Refer to server log for more information. [2009-11-03 15:47:40]

The cure is really easy. Check /home/user/mail/ and see its subdirectories’ permission.

In my case, I just need to perform chown command to assign the directories/files under user’s ownership and the problem is gone.

No comment


Invalid field count in csv input on line 1

July 18, 2009 | Technical Stuffs | , , , ,

When importing CSV data into my MySQL database using PHPMyAdmin, I found following error: Invalid field count in csv input on line 1.

It’s odd since I’ve manually count field numbers and compared with column on my CSV files, they’re exactly match.

Then I found something strange. PHPMyAdmin is automatically use semicolon ( ; ) as field delimiter instead of comma ( , ). Quick fix for this problem is to change the delimiter symbol manually.

phpMyAdmin screenshot

In the picture above, I replaced semicolon (rounded with blue circle) with comma and everything is alright.

38 comments


WordPress: Your hosting does not support this feature

June 12, 2009 | Technical Stuffs | , , , , ,

I was moving wordpress installation from one server into another. I copy the files, import database and modify configuration file (wp-config.php) and trying to access the page. But I only get following message:

Your hosting does not support this feature.

I logged into my shell account, checked permission files and found that some files have wrong user permission. So I just change user permission using command chown -R myuser:mygroups *.

I refresh the page, and the world become so beautiful tonight.

3 comments


Multiple Shoutcast Streams on A Single Machine

May 24, 2009 | Technical Stuffs

It’s very easy to set multiple shoutcast streams/servers on a single server. In this example I’m using Centos.

All you need to do is copy sc_serv binary into 3 different files (ie: sc_serv1, sc_serv2, sc_serv3) and create 3 different configuration files (ie: sc_serv1.conf, sc_serv2.conf, sc_serv3.conf).

Don’t forget to specify different ports for the three configuration files.

I put them into /usr/local/sbin/ directory:

[root@myserver sbin]# ls | grep -v log
sc_serv1
sc_serv1.conf
sc_serv2
sc_serv2.conf
sc_serv3
sc_serv3.conf

(more…)

1 comment


Desktop Blog Editor Failed to Post Article on WordPress 2.7

April 8, 2009 | Technical Stuffs | , , , , , , , , , ,

If you’re writing article for your blog using desktop blog editor –such as ecto, Qumana, Performancing for Firefox, Flock blog editor, Zoundry, ScribeFire, w.bloggar or aything else — there is a big chance that you are experiencing problem when your wordpress engine is upgraded to 2.7.

Error message may vary, but you will see something like:
XML-RPC services are disabled on this blog. An admin user can enable them at http://www.yourdomain.com/wp-admin/options-writing.php

To fix this problem is very easy. Just login to your wp-admin and go to options-writing.php page. Look at the Remote Publishing part, now give checkmark on the Enable the WordPress, Movable Type, MetaWeblog and Blogger XML-RPC publishing protocols.

Now you can write article using your favourite desktop blog editor again.

No comment


Zenwalk 6.0 RC, with Open Office

March 3, 2009 | Daily, Technical Stuffs | , , , , ,

Zenwalk has announced their release candidate for Zenwalk 6, a big leap from previous version, 5.2.

Zenwalk 6.0 will be packaged with XFCE 4.6, kernel 2.6.28.7 and Open Office. I think Open Office is the main reason why the ISO is multiplied in size. The ISO size for previous version was + 400mb and now it is + 700mb!

I don’t like Open Office and I don’t use office application very often, so I’m gonna remove it away and replaced with Abi Word and Gnumeric Spreadsheet. Two other applications that would be removed are Iceweasel and Icedove. I will replace them with Opera, my favourite browser that already has mail client and RSS reader, very cool.

Now I can’t wait to download and install stable release of Zenwalk 6.0, please hurry! 😀

No comment