I have a shared hosting on godaddy.
I tried to change session save path in php.ini file with this line,
sessions.save_path = "/session"
I've controlled the sessions save path with sessions.save_path() function. It returns /tmp
before and after changing php.ini
Is it possible to change session save path on shared hosting?
Where am I wrong?
You can modify the session save path on shared hosting by creating a custom php.ini.
Include this in your file: session.save_path = "/path/to/your/folder"
Otherwise, you can use:
ini_set('session.save_path', '/path/to/your/folder')
The folder you use should be under your domain/account but not accessible through a Web browser. It also needs to have world-writable permissions on it. And every page that uses sessions must include that line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With