It has been 2 years since my passport was renewed. At that time my hair was too short, hence the photo on my passport has short hair. Now I have a bit longer hair as compared to my passport photo. Would that cause entry problems when entering Dubai? Is it all right if I do not renew my passport?
Passports are usually valid for 5 or 10 years. It's quite rare to see people who look the same during the whole period of 5 or 10 years, yet governments aren't complaining.
Hair, beard, weight, etc. can change how people look, but identifying them is something else. Immigration officers know how to deal with this stuff.
Nothing to worry about, do not cut your hair to match the passport photo!