Try following - 1 by 1:-
* make sure portrait lock is not on & try turning on/off several times
* turn off mobile and turned it back on
* hard reset by pressing lock and home at same time
If problem persist, you need to try following but be careful since the following impact your iphone.
* resetting all setting: this will reset all settings of your iphone back to factory setting
* resetting all setting by erasing all data: this will reset all setting and erase all data so do back-up and proper syncing and read relevant details
* restoring from itunes: this will also erase all data and take mobile back to day 1
last 3 options are last resort and only be done if you are sure you can restore your data.
Please don't hold me responsible for any data loss while doing last 3 options