What are the potential pitfalls of using ini_set to modify session parameters in PHP?
Using `ini_set` to modify session parameters in PHP can lead to inconsistencies and unexpected behavior, as it changes the configuration at runtime and may affect other parts of the application. To avoid this, it's recommended to set session parameters directly in the php.ini file or by using `session_set_cookie_params` and `session_start` functions in the PHP script.
// Set session parameters using session_set_cookie_params and session_start
session_set_cookie_params(3600, '/', '.example.com', true, true);
session_start();