MySQL general error – 2006 MySQL server has gone away


Does this error message scare you ?

SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

Today we will take a look at it and find ways to deal with it 🙂 . after investigating the issue and google it online, i founded two most common reasons (and fixes) for the MySQL server has gone away (error 2006) are:

Continue reading

Unix – new user strange shell


I faced this issue when i tried to create a new user on Ubuntu server, new user was given the Bourne shell rather than the Bash shell, this is a basic shell located in /bin/sh, and it looks boring, you won’t be able to use auto-completion with such shell. in this article, i will show you how to change default shell of an unix user.

Continue reading

Unix – Recursively chmod only directories or files


Have you ever come across the problem of needing to chmod many directories and sub-directories, but you don’t want to touch any of the files? Maybe it’s the exact opposite, or you need to recursively change the permissions on only files with a specific extension. If so, this article is for you

To change permission of all directories to 755, execute this command in terminal

Continue reading

Mac OSX – clean duplicate entries in ‘open with’ menu

LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local\
-domain system -domain user

All you have to do is copy and paste this into Terminal and run it… (note: it takes a little bit of time for it to run so be patient)

Relaunch Finder (control+option+click on Finder icon in the Dock)…

Ta-da! The duplicate or old items are now gone!

Compiling latest version of PHP on Mac OS X


Mac OSX has a lot of Unix utilities, they’re very useful. You can start using many of your favorite Unix/Linux application out-of-the-box. But when it come to PHP, it’s not as good as PHP on Linux, What you have is an outdated version and you don’t have new features and performance of latest PHP .In this article, i’ll show you how to upgrade php on your Mac to latest version.

Continue reading