PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
If a page is reloaded after that time I'm guessing the $_SESSION() array is empty. Is that correct? If so then I'll just checking if $_SESSION['username'] is set upon each page load.
Did you also try changing this in the PHP.ini ? it is possible that your configuration prevents you from changing that value directly. Do you have a full script example?
I think this one is going to be a little tricky. Using ini_set() changes the setting for the duration of the execution of the script only, and allows it to return to the original setting when the script terminates. So you have to be certain that you set the lifetime before the session is created, and that you create the session while the same script is running. It would be easy to lose that particular sequence, either creating the session in a earlier script, or in a script subsequent to the one using ini_set().
My site works from an index page which then uses a switch statements to determine which page to include. So session_start is only used once and that's in the index page. If this is going to be a problem then I can use a less preffered way of inserting rows into a database for each IP upon a page request, and kill the session if the last page accessed was over the 600 second timeframe.