Sam San
Sam San

Reputation: 6903

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

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 prevent this error?

Warning: session_start() [function.session-start]: open(/tmp/sess_e0725de9954b..2c14904, O_RDWR) failed: Permission denied (13) in /home/accn/public_html/dbc.php on line 42

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/accn/public_html/dbc.php:42) in /home/acceptin/public_html/dbc.php on line 42

Upvotes: 3

Views: 39911

Answers (2)

Zablon
Zablon

Reputation: 157

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.

Upvotes: 0

Pathic
Pathic

Reputation: 400

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

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

Done

Upvotes: 20

Related Questions