In a shared hosting, change the location where sessions are saved.
Create the directory: /public_htm/tmp, give the permissions (777) <- then you have to tune it (for security).
Create a file .htaccess in the directory /public_htm/tmp with:
order deny, allow
deny from all
allow from 127.0.0.1
And in your PHP script, on top (in your front controller):
session_save_path(dirname($_SERVER['DOCUMENT_ROOT']).'/public_html/tmp');
Important: You must be added before session_start()
Check this with a script:
<?php
session_save_path(dirname($_SERVER['DOCUMENT_ROOT']).'/public_html/tmp');
session_start();
$_SESSION['Text'] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed quis nunc eu ut elit eget adipiscing facilisis turpis."
phpinfo();
?>
Check if changed the directive "session.save_path"