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

                      SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                      은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현