Why can't I change session.gc_maxlifetime in CPANEL?
I keep trying to increase the user's session time, but for some reason it still lasts 24 minutes, I've read that changing that variable could increase the time, do you know how to do it?
-
If you customize the session.gc_maxlifetime value, but do not customize the session.save_path value, the script does not use the session.gc_maxlifetime variable value. So try a custom php.ini file with below two lines in a specific cPanel account might do a trick. Code: session.gc_maxlifetime = {your value} session.save_path = "/home/{USER}/tmp" Regards 0 -
If you customize the session.gc_maxlifetime value, but do not customize the session.save_path value, the script does not use the session.gc_maxlifetime variable value. So try a custom php.ini file with below two lines in a specific cPanel account might do a trick. Code: session.gc_maxlifetime = {your value} session.save_path = "/home/{USER}/tmp" Regards
My problem is that i cant' access php.ini file because of my host. And I have tried to modify these values in php but it doesn't work, maybe I should try it on all pages, I don't know.0 -
Can you elaborate more on this part: My problem is that i cant' access php.ini file because of my host
Do you only have cPanel access to the machine and not root?0 -
Can you elaborate more on this part:
My problem is that i cant' access php.ini file because of my host
Do you only have cPanel access to the machine and not root?
I don't understand much of this because I'm a newbie, but I can perfectly access the following sites, edit the database, create files, I'm the owner. The thing is that I have the host with another company, I don't know if that will affect the user session time. I've tried to modify it with PHP but nothing works, and I can't find the ini.php anywhere, I guess I'll have to create a custom one, but I'm worried because I don't have much idea0 -
Thanks for the details - you'll have to contact your hosting provider to have them help with this change as that confirms you don't have root access to the server. The provider will be able to check the logs and settings on the server and determine why that isn't working. I'm sorry there isn't more we can do on our end for this. 0 -
Thanks for the details - you'll have to contact your hosting provider to have them help with this change as that confirms you don't have root access to the server. The provider will be able to check the logs and settings on the server and determine why that isn't working. I'm sorry there isn't more we can do on our end for this.
Don't worry, I really appreciate your help. Regards0
Please sign in to leave a comment.
Comments
6 comments