Skip to main content

Why can't I change session.gc_maxlifetime in CPANEL?

Comments

6 comments

  • HostNoc
    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
  • p1p2
    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
  • cPRex Jurassic Moderator
    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
  • p1p2
    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 idea
    0
  • cPRex Jurassic Moderator
    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
  • p1p2
    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. Regards
    0

Please sign in to leave a comment.