Godaddy Full Website Backup on a Shared Hosting Account

I had been grappling with this problem since there is no straight forward backup website button in the godaddy’s control panel. PHP scripts seem to run into script timeouts or http timeouts because of the mammoth size of the website.

Heres the solution with help and information from:
http://www.bala-krishna.com/permission-denied-error-with-godaddy-cron-job

Bala Krishna has an excellent writeup on how to use the cron job on godaddy and to avoid the permissions error.

  1. Hence create a shell script file called sitebackup.sh
  2. Copy and paste the following:
    /bin/sh tar -cvvf /$HOME/html/fullsite.tgz .
  3. Save it.
  4. Upload to godaddy.
  5. Go into the control panel and locate the Cron Manager.
  6. Add a new Cron Job and Browse for the script you uploaded.

The backup should be created in the root of your web folder accessible via FTP or the web.

A technology unrelated post (Food and Games)

A good friend of mine recently opened a games cafe at 2nd Avenue, so if you are residing in Singapore and looking for a nice quiet place to hang out and have fun with your friends, head down to Bukit timah 2nd Avenue and look for a place called Munch Kings and Queens.

They are similar to the popular minds cafe and serve food and a great array of board games. The food and atmosphere has a nice homely touch to it. Just remember to bring cash as they don’t accept cards at the moment.

Flyer

Amazon launches CloudFront

I was going through my cluttered mailbox when I came across that amazon had launched CloudFront! This is a new web service that can distribute content using a worldwide network of edge locations that provide low latency and high data transfer speeds. It works with S3 out of the box!

This is awesome news because I had been fretting over the issue of slow content delivery in different geographical locations for an upcoming project. Traditional methods would have required the content to be mirrored across geographically targetted locations and then code had to be written to take advantage of these servers in different locations.

The server distribution is as follows currently, which I guess basically serves the major markets in the world today.

United States

  • Ashburn, VA
  • Dallas/Fort Worth, TX
  • Los Angeles, CA
  • Miami, FL
  • Newark, NJ
  • Palo Alto, CA
  • Seattle, WA
  • St. Louis, MO

Europe

  • Amsterdam
  • Dublin
  • Frankfurt
  • London

Asia

  • Hong Kong
  • Tokyo
I will be playing with the service very soon once I find time and I’ll post my findings.

Hmailserver version 5 adds support for SSL!

This is awesome news, I just found out that Hmailserver version 5, which is currently in beta, adds support for SSL. I guess that is pretty awesome news to server administrators running hmailserver (I am one of them). In case you haven’t heard of hmailserver, it is a pretty solid free mail server that runs on windows servers. I have been running it for years now and it has served me very well so far. There is even API support that you could tap on for your applications.

Virtualmin on EC2 Mailman cannot be created issue

If you are getting the following error:

Failed to create virtual server : Mailman cannot be enabled unless the administration list mailman has been created.This can be done in the Mailman plugin module.

I had just came across a solution that I have tried and verified to be working from tidiar on the Amazon Web Services Developer Community. The link to the thread is http://developer.amazonwebservices.com/connect/entry.jspa?externalID=767

Click on the Network Configuration link

Click on the Network Configuration link

Click on the Hostname and DNS Client

Click on the Hostname and DNS Client

Set the Hostname field to your EC2 instance external address

Set the Hostname field to your EC2 instance external address

Thereafter just head to Virtualmin Mailman Mailing Lists in webmin, if mailman does not exist, you will find a block that looks like this:

This block will show if the default mailman is not created

This block will show if the default mailman is not created

Fill in an administration username and password. You can leave the Associate with Domain to

Hit “Create” and you are done.

You should see the following box appear on top now:

After default mailman has been created

After default mailman has been created

You can now enable mailman mailing lists when you create your virtual websites under virtualmin and you should not get the error anymore.

Again credits to tidiar on AWS forums for sharing the solution.

Back from The Actionscript Conference!

Just got back from a hectic but great day at the Actionscript Conference down at the Singapore National Library. It was a great conference with wonderful speakers like Lee Brimelow, Peter Elst, Marco Casario, Michael Plank, Prayank Swaroop, Stefan Wessels, Eksandar Gvozden (Alex) and Mohammad Khan covering topics that spanned the new flash player 10 to star wars (flash lite). Special thanks to many of them for taking the time to fly into the country. Its an amazing experience to meet these guys close up in person and talking about actionscript and everything else under the sun =)

The response to the conference was great with full attendance and we are looking forward to garnering feedback from the audience and the organising team for post-event analysis. The materials for the conference will be posted on the TAC website’s post event webpage soon so if you attended the conference, you will be able to download the materials for reference/review/practise very soon.

It was also nice to meet some of the guys from the local media, design, development agencies/houses and hearing their thoughts of flash/flex and how they are actually adopting the technologies in their day-to-day work and projects. The conference was fertile ground for networking and I guess that everyone involved would have gained a friend, a contact or some knowledge, one way or another :)

If you dropped by the conference, do leave a comment behind to say “Hi!”. Cheers!

Update: (Some of the conference photos)

IMG_4406

IMG_4316

IMG_4306

IMG_4302

Full set here: http://www.flickr.com/photos/alvinzhang/sets/72157608166830061/

TAC Group pool on flickr: http://www.flickr.com/groups/tacsg/

Losing the Logitech MX AIR mouse receiver and fixing it back

If you happen to be unfortunate and lose your AIR mouse receiver like I do (which happens to render that piece of hardware entirely useless) and then purchase a replacement receiver from eBay, you will have to go to http://www.logitech.com/index.cfm/447/3516 and download the Logitech Connection Utility. The MX AIR mouse is not listed at the bottom but you can download the one for MX Revolution, I tried it and it works. Just follow the instructions there. Voila! The AIR mouse is alive again.

MySQL prompt Display all possibilities when running stored procedures

If you keep getting the Display all <insert number> possibiilities prompt when you are pasting queries into your mysql shell, it will cause your queries to fail. This is due to the use of the tab character that triggers the behaviour. To resolve this, convert the tab characters in your statement to spaces.

Most SQL management software like EMS allows you to use spaces instead of tabs. They usually fall under the options.

MySQL Error/Warning: Too Many Connections

This post is to help server administrators who are managing MySQL servers. If you run into users complaining about error regarding too many connections to MySQL, do check the script that runs and make sure that connections are closed.

For example if you open a connection in php using:

$mysqli = new MySQLI(’localhost’,'root’,'password’,'dBName’);

At the end of the script, do remember to close the connection by calling:

mysqli_close($mysqli);

To verify that things are working, SSH into your system,

1) go into MySQL command line by typing something like mysqld -u root -p
2) type in “show processlist;
3) take note of the processes already running
4) Run the php (or .net or whichever script)
5) type in “show processlist;” again a while after the script has finished executing
6) If you see new processes being in Sleep status then the script is not closing the connections properly (unless this is a deliberate action by the developer to re-use a connection, but this usually should not happen)
7) You can manually kill the process by typing “kill <process id>;” (You can see the process id in the process list table

So if the script is not closing connections, the script should be checked to ensure that they are closed and run through the test above again. This will assist in the server’s performance as well.

Note: The default max_connections, which govern the maximum number of connections to the MySQL server instance is 100, you can increase this, but it is not a good solution compared to the above which addresses the root of the issue. MySQL has a suggestion that dynamically increases the max_connections which works as well but it has to be dependent on the scenario you are facing.

Google Chrome and iPhone 3G = Usability

I have recently acquired one great hardware and one great software. First the iPhone 3G, which I have been fondly amazed by. Why I love iPhone? Because it works in ways which I expect it to. Its all about usability which apparently is common-sense to some people. No. People have common-sense but machines do not. You have to “engineer” common-sense into machines. Something that doesnt come up on the project spec very often and when it does, a teeny weeny budget is allocated for it.

What I really liked about the iPhone:

1) The music dims down when you make/receive a phone call and resumes after the call, automatically and with grace

2) (Yes, I love the feeling of music fading away), the music dims down when you launch youtube videos

3) iPhone web apps are straightforward and simple back and forward navigation is extremely easy to use, at least for me when I first came into contact with it

What I did not like:

1) There is a mild lag to the machine, perhaps something like allocating more memory resources to messaging with a good (larger?) IO buffer might really help in smoother text entry. Engineers figure that piece out please, Phone = Phone Calls (Priority no. 1 or 2) and Messaging (Email/SMS Priority no. 1 or 2) so these two pieces should be hyper-responsive, never mind other applications, when I write Emails on my mobile, it already sucks without a full-sized keyboard, at least make it responsive.

2) No Flash. Stunning browser but no flash.

3) Syncing with Outlook doesn’t copy SMTP authentication details automatically. No useful message comes up to indicate to the user what is happening. I set up my iPhone for the first time and tried to send emails but got that sender is unknown error.

(Read: to a common user, sender is unknown translates into the system not knowing who I am and cannot send the email, people do not know that SMTP authentication details are missing out especially when it works fine on their outlook accounts.

Resolution: Change the message to something like “Some email settings are missing. Please go to ….. and set the username and password”)

—————

Google Chrome

I am currently using Google Chrome to open up wordpress and write this post and I have to say that this is another piece of software that works! Although there seem to be bugs. I couldn’t remove boxes in facebook when I’m using Chrome.

Its simple, imports all my firefox settings and fast. A new tab showing my recent surfed pages is also a big welcome. Firefox wastes that space by showing a empty page when you open a new tab.

Chrome also maximises surfing space by having a floating status bar that disappears and appears as and when it is required, as well as not having a traditional application menu bar.

Great phone and great software and it is heartening to see that people are using technology to make things easier to use.

Download Google Chrome
http://www.google.com/chrome/index.html?hl=en&brand=CHMG&utm_source=en-hpp&utm_medium=hpp&utm_campaign=en