Mustafa, this is easiest way to implement this feature.
In php53-fpm-pool.conf.tpl you have 2 of the same lines:
php_admin_value[session.save_path] = <?php echo $session_save_path_flag; ?>
Remove the first one, then change:
php_admin_value[max_input_vars] = <?php echo $max_input_vars_flag; ?>
php_admin_value[session.save_path] = <?php echo $session_save_path_flag;
change to:
php_admin_value[max_input_vars] = <?php echo $max_input_vars_flag;
if (!file_exists("/home/{$user}/php_session")) {
mkdir("/home/{$user}/php_session");
shell_exec("/bin/chown {$user}:{$user} /home/{$user}/php_session");
}
?>
php_admin_value[session.save_path] = /home/<?=$user;?>/php_session
Perfect! Now fixphp creates php_session in /home/{user} directory, changes ownership properly, and sets session.save.path correctly.
HOW EASY IS THAT?