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

前端 未结 2 724
醉话见心
醉话见心 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: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.

提交回复
热议问题