Tag Archives: cpanel

Run PHP file with cron

This is the script to paste in cron to run a PHP file

php -f /home/username/public_html/cron-daily.php

Anyway I haven’t tried to put the script outside public_html directory. Logically PHP cannot run outside web root folder unless you set it to run outside web root folder in apache.

And you can use this script to run PHP by full URL. Even script on other server

lynx -dump http://yourdomain.com/yourscript.php >/dev/null 2>&1

Problem uploading big sql file via phpMyAdmin

I faced problem uploading a huge sql file to my shared hosting server. The size was not that big. It was only 1.8MB in size with about 30,000 records but phpMyAdmin (provided in cpanel) still failed to fully upload and run the file.

I then googled for a solution.

One of the solutions suggest to use SSH but I’m not familiar with it.

Another solution is by using mysqldumper but the configuration seems quite tedious.

Then I found another solution called BigDump which is very straight forward. You upload a PHP script together with your huge sql file via FTP. Then just run the PHP script as usual. In a second all the data has been restored in your database.

Use Gmail with your own domain name

Gmail so far is the best known e-mail service provider. I don’t have to list the features of Gmail here.

If you want to have google powered applications (especially Gmail) but using your own domain, you have come to the right place. You can do that with Google Apps (standard edition)

With standard edition (there is premier edition for big corp), you can create 50 email accounts with 7GB space for free and other standard google applications like docs, calendar, chat and google sites.

Below is the steps to start using Gmail with your very own domain name. Very easy.

1. Start here – list of what you get besides gmail. Click on the “Get Started” button

2. Enter your domain name and other details in the provided form.

3. Create admin account and agree with the term

4. Activate gmail and change MX records in cPanel (you can choose from a list of hosting management applications). change MX in cpanel use following values

Priority Mail Server


At first I thought it was so complicated because I need to change the MX record, then all the A’s records, then CNAME and then other xx records but actually you have to change only MX record and it is in you hosting cPanel (not even in the domain management).

After changing your MX record, you are done. Wait for few hours (sometimes just in few minutes). You can also use all other applications offered as in the intro page.

To log on to your email and other app, just point your browser to

Direct link to email is http://mail.google.com/a/your-domain.com

It is a good idea to make a forwarding or subdomain from your domain to above URL. Easier to remember..

Update: To import all your old emails, you can use mail fetcher by going to Settings > Accounts > Add a mail account you own. Tips for cpanel user, if you are using same email address with same domain, just enter any email address when asked. The important thing is use the real email address in the username. Save and wait while all old emails being fetched.

Hope this article helps. All the best.

For more info, can also check google app setup guide