3 Jan 2012

How to tackle "500 Internal Server Error"

I got an email from a client saying that one of his website has been down for a while, and the error message reads "500 internal server error". The 500 error is the web equivalence of Blue Screen of Death of Windows. For unexperience web developers or users it could get very frustrating because you may find yourself trying everything you can but nothing changes. Here is where I usually tackle the problem.

  1. 500 error is a server side error. If the error is caused by recent changes made to the system, try to revert the changes.
  2. If you don't belive you have done anything that caused the error. It usually has nothing do to with your script (ie. php). Don't waste time tweaking the script compiler to report the error (i.e. enable PHP error reporting), it won't work. You best bet is to view the server log to find out what went wrong. The best way is to access the server log in command line. FTP doesn't usually give you access to system log unless you are on a private server where you are given full access to.

    for exmaple:
    tail /var/apache2/access_log
    tail /var/apache2/error_log

  3. If you are on a shared host that doesn't give you command line access, contact technical support of the host company. They will probably fix it for you, but do ask for access to the system log for future reference.
  4. If you find the information in the system log doesn't give you enough insights to figure out the problem. Try to wrap your head around these possible causes:
    1. Is your rewirte engine running in a endless loop? (i.e. there are two page being redirected to each other) If you belive this is the cause, temparily rename .htaccess to something else see if the message changes to something else. If so the problem is in .htaccess.
    2. There maybe any syntax error in .htaccess. Validate your .htaccess file  i.e. http://shop.alterlinks.com/htaccess-validator/htaccess-validator.php
    3. Have you recently change permission on certain files on your server? If so try to revert the change.
2 Jan 2012

My 2012 RESOLUTIONS ~ What're yours?

Become better at what I do for living
- Achieve all my department monthly and quarterly goals.
- Stick to the Knowledge Ladder I set up for myself. One step at a time.
- Complete at least one personal project on the Idea List and keep it alive.

Prepare for the next position in my career
- Improve presentation and public speaking skills
- Read two books about leadership
- Join a leadership club.
- Take a communication/effective writing class

Make an impact to other people's life
- Share knowledge and experience to help others
- - Help at least one teenager to learn better
- - Help at least one person in my age to learn a new skill
- - Help at least one orderly to do one thing better
- Volunteer to help/save one person/animal

Improve overall fitness and well being
- Return to the court, win back the respect.
- Go to the gym regularly. Get rid of the gut and build bigger biceps. Finally be able to do 10 pull-ups without the belt.
- Finish my personal Achievers top 1. Learn to play one song with the guitar and sing it in front of people.

Home is no longer China, or SF. Home is where I am. Don't take other people's love/respect from granted.
- Save enough money for down payment of my dream home.
- Cherish and appreciate those who love me, and learn to accept those who disagree with me.
- Make my girl the happiest woman on the planet.
- Visit the folks at least two times in 2012 if not more.
- Organize a local friend reunion

2 Jan 2012

Looks like I am back.

The sign "Gone building websites" has been up on my posterous space for two years and I am finally making a come-back. I have built a ton of websites for others during the last two year and a personal in Drupal 6 site for myself. I am very tired of maintaining my own site and feel bad for those who had followed and supported me for the last two year for the lack of update, so I decided to move back to a robuts blog like posterous.

Whether if you are new or if you have known me for a while, here is breifly what happened to me the last two year. I have moved two job Fulcrum.ca , upinc.ca and now I am working at Achievers. During these jobs, I have moved from a 100% developer to now a marketer, online marketer. It's exciting to learn the buinsess side of the web and how it makes money, a bucket load of $$$. I have also gone from a Dreamweaver to Eclipse, from making copies of files to version control, from Actionscript to Javascript, and finally from manual QA to Selenium beginner. The flip side is I haven't done much painting like I used to in college, and I get to listen to graphic designer to tell me how the end product on the web doesn't match their mock up in Photoshop.

In terms of personal and social life, umm....I guess the biggest change is I don't need to deal with sleepy, smelly and oblivious TTC passagers who won't step further back because they are too busy looking at whatever the f**k is happening on their iPods and iPads, yet they never miss the stop. I finally brought a car. It's not a big deal. I live 20 mins away from work and I drive everyday. I am just happy that I don't have to wait in the snow for the streetcar but the driver won't open the door when one finally arrived because the cart is "full". If you live or have you been to Toronto and have taken the streetcar during rush hours, you know what I am talking about.

Other than that, I am just out sociallizing when I still can.

I met a guy during my trip to Quebec this Chrismas who has two children. He told me he didn't go anywhere on vocation for three years after he had his first kid.

Alright, more to come, stay tuned.

17 Oct 2009

At the airport Windows win

Mac: PC you suck. Look at what you did. You have all these ppl waiting at the airport.

PC: So what? They picked me.

Photo

6 Oct 2009

The other side of this city

If you live in the city, have you ride the first bus or subway in the morning?
If you are a weekday 9 to 5 person who happens to live in a city that's busy but not enough to run 24 hr transit, try to get on the 1st train in the morning. I guarantee your eyes will be opened to a whole new world. I went a few times to the airport this months for some pick up and drop off. It amazes me when I see how many people are still working even the the oldest and the most loyal worker, the sun, is resting.

People are busy getting things ready for the rest of us. Coffee is being loaded, floor is being modded, out-of-service buses are running to fill up the gas tank, news papers are being moved to the most convenience corner. Several small pieces of our life seen insignificant don't come in easy.

Buses don't run as often as the rest of the day. People who have been waited since earlier are all bundled up in order to stay warm while they are waiting outside. Nobody holds a coffee. Coffee is for after 9am. I was seeing people in professions that start a lot earlier than those in Bay street. Rather than business suit and laptop, there is hummers, early TV program scripts or maybe a just a blow-up pillow.

On the platform and at bus stops, there are more people than regular rush hours since the trains don't come every 2 minutes, instead, every 10 to 12 mins.

Lucky that I am in Toronto to learn the other side of this city. Not anywhere else would have a transit system that doesn't run 24-7 that a lot of people relay on, relatively cold climate, and the hard work ethic that we all share.

5 Oct 2009

Muku muku riding the TTC

Photo

3 Oct 2009

Gaint rabbit in eton center

Photo

 

3 Oct 2009

Geuvara little thinker version

Photo

3 Oct 2009

Che geuvara wooden craft

After the trip to Cuba, everything about Cuba becomes so cool to me especially Che Geuvara. He isn't just a symbol of revolution, but also a simple of dignity and hope. Cooool....

Photo

Location: Kensington market

30 Sep 2009

My birthday present

(download)

Desmond Liang's Space

Growing up in Southern China, living in Toronto Canada. I have gone through education in both countries which gives me the capability to read, write, speak and understand three different languages, and the eyes to read two very distinct cultures from different angles.

The east taught me to be a hardworking and responsible man, while the west shown me how I can take what I have to go even further, all the way to the top of the world.

I am fascinated by the Internet and by how's evolving. Over the last decade I have accumulated substantial amount of industrial experience and best practices to make information available for people in organizations. Now I am all about making software smarter and scalable for future growth.

Find me on Facebook or Twitter @desmondliang