
Our service allows you to use a custom php.ini file to change PHP settings. However, a small number of php.ini directives might not work as you expect. As we come across these, we document them on this page.
Changing date.timezone in php.ini for PHP 5 won't change the default time zone your script uses. That's because that setting is only used if the TZ environment variable is not set — but it is set on our servers.
To get your script to use a different time zone, you could specify it in your code, like so:
date_default_timezone_set("America/New_York");
By default, we use a setting of 21600 (6 hours) for session.gc_maxlifetime. If you change the session.gc_maxlifetime setting in your php.ini file, it won't have any effect on our servers. That's because we use Debian Linux, which runs a separate hourly task that deletes any global session files older than the session.gc_maxlifetime value in the main php.ini file.
To really change this setting, you'd need to change both session.gc_maxlifetime and session.save_path so that the session files are stored in a location that the main session cleanup task won't find. You'd also probably want to set session.gc_probability and session.gc_divisor to make sure the files are occasionally cleaned up.
For example, if you created a directory named "php_sessions" in your home directory for example.com, these php.ini entries would allow you to make sessions last for one day:
session.gc_maxlifetime = 86400 session.save_path = /home/ex/example.com/php_sessions session.gc_probability = 1 session.gc_divisor = 100