CodeIgniter is generating too many sessions file at server tmp folderDude, where's my php.ini? (server config)Is there any way to get session data in folder outside Application folder of Codeigniter?Unable to load the requested class: Session Codeigniter 3Codeigniter - unserialize session not working outside application folderCodeIgniter 3.0.3 ci_session not saving session data to ci_sesstion tablecodeigniter 3 ajax not preserve SESSIONCodeigniter session SET on one server but not on anotherUntil the browser is closed, session maintain without cookie in CodeIgniterHow to get last_activity in Codeigniter 3?Codeigniter - Lost Connection to MySQL server during query. CI_SESSION_LOCK error

c++ conditional uni-directional iterator

Can a tourist shoot a gun in the USA?

Why are lawsuits between the President and Congress not automatically sent to the Supreme Court

Developers demotivated due to working on same project for more than 2 years

Is random forest for regression a 'true' regression?

Getting a similar picture (colours) on Manual Mode while using similar Auto Mode settings (T6 and 40D)

When did game consoles begin including FPUs?

Can anyone give me examples of the relative-determinative 'which'?

Do high-wing aircraft represent more difficult engineering challenges than low-wing aircraft?

Why were the bells ignored in S8E5?

UUID type for NEWID()

Why is the marginal distribution/marginal probability described as "marginal"?

Why would company (decision makers) wait for someone to retire, rather than lay them off, when their role is no longer needed?

the correct order of manual install WP and SSL on server

Is my test coverage up to snuff?

Why did the metro bus stop at each railway crossing, despite no warning indicating a train was coming?

What do you call the hair or body hair you trim off your body?

Why did the soldiers of the North disobey Jon?

Should I communicate in my applications that I'm unemployed out of choice rather than because nobody will have me?

Can my American children re-enter the USA by International flight with a passport card? Being that their passport book has expired

Why does SSL Labs now consider CBC suites weak?

What is the status of the Lannisters after Season 8 Episode 5, "The Bells"?

​Cuban​ ​Primes

What is the effect of the Feeblemind spell on Ability Score Improvements?



CodeIgniter is generating too many sessions file at server tmp folder


Dude, where's my php.ini? (server config)Is there any way to get session data in folder outside Application folder of Codeigniter?Unable to load the requested class: Session Codeigniter 3Codeigniter - unserialize session not working outside application folderCodeIgniter 3.0.3 ci_session not saving session data to ci_sesstion tablecodeigniter 3 ajax not preserve SESSIONCodeigniter session SET on one server but not on anotherUntil the browser is closed, session maintain without cookie in CodeIgniterHow to get last_activity in Codeigniter 3?Codeigniter - Lost Connection to MySQL server during query. CI_SESSION_LOCK error






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I don't know why but my CodeIgniter application is creating too many ci_sessions file at server tmp folder. like 1000 session file ever min. and seems not deleting old session file



I am using this settings



$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 0;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 1000;
$config['sess_regenerate_destroy'] = TRUE;


How to get rid this issue ?



enter image description here










share|improve this question






















  • which CI and Php version are you using?

    – Vickel
    Mar 23 at 18:09












  • PHP Version 7.1.27 , CI VERSION : '3.0.4'

    – Yogesh Saroya
    Mar 24 at 5:11












  • if possible upgrade do CI 3.1.10, there have been some bugs in the session library resolved: see here codeigniter.com/userguide3/changelog.html

    – Vickel
    Mar 24 at 13:08











  • @Vickel right now added session.gc_probability = 1 and now no session files.

    – Yogesh Saroya
    Mar 24 at 16:03

















0















I don't know why but my CodeIgniter application is creating too many ci_sessions file at server tmp folder. like 1000 session file ever min. and seems not deleting old session file



I am using this settings



$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 0;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 1000;
$config['sess_regenerate_destroy'] = TRUE;


How to get rid this issue ?



enter image description here










share|improve this question






















  • which CI and Php version are you using?

    – Vickel
    Mar 23 at 18:09












  • PHP Version 7.1.27 , CI VERSION : '3.0.4'

    – Yogesh Saroya
    Mar 24 at 5:11












  • if possible upgrade do CI 3.1.10, there have been some bugs in the session library resolved: see here codeigniter.com/userguide3/changelog.html

    – Vickel
    Mar 24 at 13:08











  • @Vickel right now added session.gc_probability = 1 and now no session files.

    – Yogesh Saroya
    Mar 24 at 16:03













0












0








0








I don't know why but my CodeIgniter application is creating too many ci_sessions file at server tmp folder. like 1000 session file ever min. and seems not deleting old session file



I am using this settings



$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 0;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 1000;
$config['sess_regenerate_destroy'] = TRUE;


How to get rid this issue ?



enter image description here










share|improve this question














I don't know why but my CodeIgniter application is creating too many ci_sessions file at server tmp folder. like 1000 session file ever min. and seems not deleting old session file



I am using this settings



$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 0;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 1000;
$config['sess_regenerate_destroy'] = TRUE;


How to get rid this issue ?



enter image description here







php codeigniter






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 23 at 15:18









Yogesh SaroyaYogesh Saroya

71011132




71011132












  • which CI and Php version are you using?

    – Vickel
    Mar 23 at 18:09












  • PHP Version 7.1.27 , CI VERSION : '3.0.4'

    – Yogesh Saroya
    Mar 24 at 5:11












  • if possible upgrade do CI 3.1.10, there have been some bugs in the session library resolved: see here codeigniter.com/userguide3/changelog.html

    – Vickel
    Mar 24 at 13:08











  • @Vickel right now added session.gc_probability = 1 and now no session files.

    – Yogesh Saroya
    Mar 24 at 16:03

















  • which CI and Php version are you using?

    – Vickel
    Mar 23 at 18:09












  • PHP Version 7.1.27 , CI VERSION : '3.0.4'

    – Yogesh Saroya
    Mar 24 at 5:11












  • if possible upgrade do CI 3.1.10, there have been some bugs in the session library resolved: see here codeigniter.com/userguide3/changelog.html

    – Vickel
    Mar 24 at 13:08











  • @Vickel right now added session.gc_probability = 1 and now no session files.

    – Yogesh Saroya
    Mar 24 at 16:03
















which CI and Php version are you using?

– Vickel
Mar 23 at 18:09






which CI and Php version are you using?

– Vickel
Mar 23 at 18:09














PHP Version 7.1.27 , CI VERSION : '3.0.4'

– Yogesh Saroya
Mar 24 at 5:11






PHP Version 7.1.27 , CI VERSION : '3.0.4'

– Yogesh Saroya
Mar 24 at 5:11














if possible upgrade do CI 3.1.10, there have been some bugs in the session library resolved: see here codeigniter.com/userguide3/changelog.html

– Vickel
Mar 24 at 13:08





if possible upgrade do CI 3.1.10, there have been some bugs in the session library resolved: see here codeigniter.com/userguide3/changelog.html

– Vickel
Mar 24 at 13:08













@Vickel right now added session.gc_probability = 1 and now no session files.

– Yogesh Saroya
Mar 24 at 16:03





@Vickel right now added session.gc_probability = 1 and now no session files.

– Yogesh Saroya
Mar 24 at 16:03












2 Answers
2






active

oldest

votes


















0














Solution



Add this code



ini_set('session.save_path',realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/tmp'));
ini_set('session.gc_probability', 1);





share|improve this answer






























    0














    In your php.ini add this



    session.gc_probability = 1
    session.gc_divisor = 1000
    session.gc_maxlifetime = 1440


    Also in your codeigniter configuration file check that you have enabled the regenerate_destroy and expiration enabled.



    $config['sess_driver'] = 'files';
    $config['sess_cookie_name'] = ‘mysession';
    $config['sess_expiration'] = (60 * 60);
    $config['sess_save_path'] = FCPATH . "sessions";
    $config['sess_match_ip'] = FALSE;
    $config['sess_time_to_update'] = 300;
    $config['sess_regenerate_destroy'] = TRUE;


    Basically gc_probability is set by default in 0 and those files can't be deleted. So changed to 1 enable the file deletion automatically.






    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55315226%2fcodeigniter-is-generating-too-many-sessions-file-at-server-tmp-folder%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      Solution



      Add this code



      ini_set('session.save_path',realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/tmp'));
      ini_set('session.gc_probability', 1);





      share|improve this answer



























        0














        Solution



        Add this code



        ini_set('session.save_path',realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/tmp'));
        ini_set('session.gc_probability', 1);





        share|improve this answer

























          0












          0








          0







          Solution



          Add this code



          ini_set('session.save_path',realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/tmp'));
          ini_set('session.gc_probability', 1);





          share|improve this answer













          Solution



          Add this code



          ini_set('session.save_path',realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/tmp'));
          ini_set('session.gc_probability', 1);






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 24 at 16:03









          Yogesh SaroyaYogesh Saroya

          71011132




          71011132























              0














              In your php.ini add this



              session.gc_probability = 1
              session.gc_divisor = 1000
              session.gc_maxlifetime = 1440


              Also in your codeigniter configuration file check that you have enabled the regenerate_destroy and expiration enabled.



              $config['sess_driver'] = 'files';
              $config['sess_cookie_name'] = ‘mysession';
              $config['sess_expiration'] = (60 * 60);
              $config['sess_save_path'] = FCPATH . "sessions";
              $config['sess_match_ip'] = FALSE;
              $config['sess_time_to_update'] = 300;
              $config['sess_regenerate_destroy'] = TRUE;


              Basically gc_probability is set by default in 0 and those files can't be deleted. So changed to 1 enable the file deletion automatically.






              share|improve this answer



























                0














                In your php.ini add this



                session.gc_probability = 1
                session.gc_divisor = 1000
                session.gc_maxlifetime = 1440


                Also in your codeigniter configuration file check that you have enabled the regenerate_destroy and expiration enabled.



                $config['sess_driver'] = 'files';
                $config['sess_cookie_name'] = ‘mysession';
                $config['sess_expiration'] = (60 * 60);
                $config['sess_save_path'] = FCPATH . "sessions";
                $config['sess_match_ip'] = FALSE;
                $config['sess_time_to_update'] = 300;
                $config['sess_regenerate_destroy'] = TRUE;


                Basically gc_probability is set by default in 0 and those files can't be deleted. So changed to 1 enable the file deletion automatically.






                share|improve this answer

























                  0












                  0








                  0







                  In your php.ini add this



                  session.gc_probability = 1
                  session.gc_divisor = 1000
                  session.gc_maxlifetime = 1440


                  Also in your codeigniter configuration file check that you have enabled the regenerate_destroy and expiration enabled.



                  $config['sess_driver'] = 'files';
                  $config['sess_cookie_name'] = ‘mysession';
                  $config['sess_expiration'] = (60 * 60);
                  $config['sess_save_path'] = FCPATH . "sessions";
                  $config['sess_match_ip'] = FALSE;
                  $config['sess_time_to_update'] = 300;
                  $config['sess_regenerate_destroy'] = TRUE;


                  Basically gc_probability is set by default in 0 and those files can't be deleted. So changed to 1 enable the file deletion automatically.






                  share|improve this answer













                  In your php.ini add this



                  session.gc_probability = 1
                  session.gc_divisor = 1000
                  session.gc_maxlifetime = 1440


                  Also in your codeigniter configuration file check that you have enabled the regenerate_destroy and expiration enabled.



                  $config['sess_driver'] = 'files';
                  $config['sess_cookie_name'] = ‘mysession';
                  $config['sess_expiration'] = (60 * 60);
                  $config['sess_save_path'] = FCPATH . "sessions";
                  $config['sess_match_ip'] = FALSE;
                  $config['sess_time_to_update'] = 300;
                  $config['sess_regenerate_destroy'] = TRUE;


                  Basically gc_probability is set by default in 0 and those files can't be deleted. So changed to 1 enable the file deletion automatically.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 24 at 16:08









                  Luis Cardoza BirdLuis Cardoza Bird

                  165316




                  165316



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55315226%2fcodeigniter-is-generating-too-many-sessions-file-at-server-tmp-folder%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                      Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                      Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript