session_start() problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sky2070

    session_start() problem

    session_start() ;
    $_SESSION['visits']++;
    print 'You have visited here '.$_SESSION['visits'].' times.';

    returned:

    Warning: session_start() [function.sessio n-start]:
    open(/tmp\sess_c8bf20 07256f6e15a938c 0254adb21e4, O_RDWR) failed: No
    such file or directory (2) in C:\Program Files\Apache
    Group\Apache2\h tdocs\session.p hp on line 3

    Warning: session_start() [function.sessio n-start]: Cannot send session
    cookie - headers already sent by (output started at C:\Program
    Files\Apache Group\Apache2\h tdocs\session.p hp:3) in C:\Program
    Files\Apache Group\Apache2\h tdocs\session.p hp on line 3

    Warning: session_start() [function.sessio n-start]: Cannot send session
    cache limiter - headers already sent (output started at C:\Program
    Files\Apache Group\Apache2\h tdocs\session.p hp:3) in C:\Program
    Files\Apache Group\Apache2\h tdocs\session.p hp on line 3
    You have visited here 1 times.
    Warning: Unknown(): open(/tmp\sess_c8bf20 07256f6e15a938c 0254adb21e4,
    O_RDWR) failed: No such file or directory (2) in Unknown on line 0

    Warning: Unknown(): Failed to write session data (files). Please
    verify that the current setting of session.save_pa th is correct (/tmp)
    in Unknown on line 0


    i have /tmp folder inside my htdocs directory so why it is still
    saying that the /tmp is unknown?
  • jack

    #2
    Re: session_start() problem

    sky2070 wrote:[color=blue]
    > session_start() ;
    > $_SESSION['visits']++;
    > print 'You have visited here '.$_SESSION['visits'].' times.';
    >
    > returned:
    >
    > Warning: session_start() [function.sessio n-start]:
    > open(/tmp\sess_c8bf20 07256f6e15a938c 0254adb21e4, O_RDWR) failed: No
    > such file or directory (2) in C:\Program Files\Apache
    > Group\Apache2\h tdocs\session.p hp on line 3
    >
    > i have /tmp folder inside my htdocs directory so why it is still
    > saying that the /tmp is unknown?[/color]

    Not in htdocs. Php looks for 'tmp' folder in root, in your case - in 'c:\'.
    You can change it in php.ini.

    --
    --- --- --- --- --- --- ---
    jack@croatiabiz .com


    Comment

    • skate

      #3
      Re: session_start() problem

      remember also that with windows you should only use the \ when navigating
      directories. so it should be \tmp

      it may also be looking for your /tmp folder in the php install folder. i
      believe that's where mine sticks all it's tmp stuff...



      "jack" <jack@croatiabi z.com> wrote in message
      news:begfb9$7vb g$1@as201.hinet .hr...[color=blue]
      > sky2070 wrote:[color=green]
      > > session_start() ;
      > > $_SESSION['visits']++;
      > > print 'You have visited here '.$_SESSION['visits'].' times.';
      > >
      > > returned:
      > >
      > > Warning: session_start() [function.sessio n-start]:
      > > open(/tmp\sess_c8bf20 07256f6e15a938c 0254adb21e4, O_RDWR) failed: No
      > > such file or directory (2) in C:\Program Files\Apache
      > > Group\Apache2\h tdocs\session.p hp on line 3
      > >
      > > i have /tmp folder inside my htdocs directory so why it is still
      > > saying that the /tmp is unknown?[/color]
      >
      > Not in htdocs. Php looks for 'tmp' folder in root, in your case - in[/color]
      'c:\'.[color=blue]
      > You can change it in php.ini.
      >
      > --
      > --- --- --- --- --- --- ---
      > jack@croatiabiz .com
      >
      >[/color]


      Comment

      Working...