you have to set the php session times in the php.ini file (for php4). this is a major flaw in php4, as session lifetime should be controllable by the application developer, instead of solely the system administrator.
if you want to control session lifetimes, you may have more success using php3 with the implememtation of sessioning in phplib.