Solution if you got problem with sys_temp_dir
If your problem with sys_get_temp_dir is permission denied. I have some solutions that's work.
# Solution 1: Change sys_temp_dir by use putenv();
# Solution 2: For CodeIgniter, I found permission denied in $config['sess_save_path'] which the default value is map to 'sys_get_temp_dir()'. So, I change value to the folder that have permission (Ref. to https://forum.codeigniter.com/thread-64570.html)
# Solution 1: Change sys_temp_dir by use putenv();
# Solution 2: For CodeIgniter, I found permission denied in $config['sess_save_path'] which the default value is map to 'sys_get_temp_dir()'. So, I change value to the folder that have permission (Ref. to https://forum.codeigniter.com/thread-64570.html)