Can't Control Volume on Lockscreen with Volume Buttons on iPhone
★ [Settings > Sounds > Ringer and Alerts > Change with Buttons = ON]

Tapping the home button twice should bring up the audio player/volume slider on the lock screen. While it's visible try the buttons on the side — depending on whether or not you see the volume slider move on the screen should tell you if your buttons are not actually working.



This is straight from the iOS 5 user guide:

When iPhone is locked, nothing happens if you touch the screen. iPhone can still receive calls, text messages, and other updates. You can also:


Listen to music
Adjust the volume using the buttons on the side of iPhone (or on the
iPhone earphones) while you’re on a phone call or listening to music.


Use the center button on iPhone earphones to answer or end a call, or to control audio playback.


iPhone User Guide For iOS 5.0 Software (PDF)