Warning: session_start() [function.session-start]: open(/tmp/sess_e07..42c14904, O_RDWR)

前端 未结 2 703
醉话见心
醉话见心 2020-12-05 22:20

I got this error when I changed my index.php file into index.html file and then changed back again to its original index.php file

Can anyone tell me what to do to pre

相关标签:
2条回答
  • 2020-12-05 22:45

    Create folder "tmp" on your root directory with permission 777 then before start_session,

    ini_set('session.save_path', 'tmp');
    

    Done

    0 讨论(0)
  • 2020-12-05 22:58

    when using ini_set be sure to set the path '/tmp' rather than just 'tmp' didn't work in my case 'tmp'. just like

    ini_set('session.save_path', '/tmp')
    

    Steps to solution

    1. create folder tmp inside of the website root

    2. change permission to 777

      sudo chmod -R 777 tmp

    3. enter this line above session_start() in your code

      ini_set('session.save_path', '/tmp');

    done.

    0 讨论(0)
提交回复
热议问题