Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    435
    Thanks
    1
    Thanked 0 Times in 0 Posts

    php session_start() error

    Warning: session_start(): open(/tmp/phpsessions/sess_dfa484cbeaadba0bb5791c557bcd75a3, O_RDWR) failed: Permission denied (13) in /home/overdriv/public_html/config.php on line 2

    Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/overdriv/public_html/config.php:2) in /home/overdriv/public_html/config.php on line 2

    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/overdriv/public_html/config.php:2) in /home/overdriv/public_html/config.php on line 2

    what the f**k???

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    session_start() has to be added before anything is outputted to the browser, that includes whitespace, html, text.

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Your PHP script has no permission to read the session directory on the server. Ask your host to fix that, i.e. he must make the session directory readable for your script.
    De gustibus non est disputandum.

  • #4
    Regular Coder
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    435
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Nightfire
    session_start() has to be added before anything is outputted to the browser, that includes whitespace, html, text.

    im not that stupid

    Quote Originally Posted by mordred
    Your PHP script has no permission to read the session directory on the server. Ask your host to fix that, i.e. he must make the session directory readable for your script.
    thanks, so what must he do? I've never encountered an error like this, my session functions are basically
    session_start();
    $_SESSION['name'] = 'blah';

    it seems wierd to me that on this server i need permissions for session files when i've never had to have them before..

    does this mean my server has got good security?

  • #5
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Wasn't to know you knew that

    All your host needs to do is chmod the tmp dir to 777 or similar, but with them bein a host they should already know what to do if you told them the error you're getting. There's nothing you or anyone else can do apart from your host

  • #6
    Regular Coder
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    435
    Thanks
    1
    Thanked 0 Times in 0 Posts
    thanks, my server techs fixed it


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •