It is not done on the page with php. You have to updated it in the php.ini file. session.gc_maxlifetime in php.ini is set to 24 minutes (1440 seconds) by default. You can set it to anything you want, but may need to talk to your hosting company to find out where and how they allow updates to php.ini.... it may not be possible on some shared hosting platforms.