Question: How to keep session alive for 1week without logout PHP, overwriting default server values?

I need to do this in the PHP code.

Answer: 
Just wanted to add this even though it's an old thread for the sake of completeness for future googlers:

> 
> Beware if you are on a Debian system.
> 
> 
> 

The `/etc/cron.d/php5` script will still clean your `/var/lib/php5/` directory containing your sessions based on the `php.ini` value `session.gc_maxlifetime`.
Alternative solution:

You say people are leaving open their browsers for days and complain that session expire. Simple solution: don't let session expire by sending an keep-alive request using eg. XMLHttpRequest every 10 minutes.