1

i have session_start(); on line 2 of my home.php file and im getting this error:

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

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

What do these usually mean? My hosting company have told me its nothing to do with them but im not so sure

  • Check your session save path in php.ini and change it if necessary or PHP does not have permissions to write on /tmp directory. You need to use chmod command to open /tmp permissions. – sourabh kasliwal May 23 '13 at 07:39
  • just set permissions to your /tmp/ that's all – Robert May 23 '13 at 07:39
  • its seems that your script doesn't have permissions to write on tmp folder, when you use session it creates file on your server. – Rizwan Yahya May 23 '13 at 07:41

1 Answers1

2

It looks like the user that PHP is running as does not have write permissions to the /tmp directory, where session data is stored in the form of files.

Either your host has messed something up or you need to configure PHP to use another directory for session storage (your host will tell you what that might be, and you will need to call session_save_path before starting the session).

Jon
  • 428,835
  • 81
  • 738
  • 806