SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Addict itsource's Avatar
    Join Date
    Jun 2001
    Location
    Thailand
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    My session can not save cookie.

    My browser enable cookie.
    and I register variable as session but it cannot generate cookie on mycomputer.

    In php.ini i confing

    session.use_cookies=1
    session.use_trans_sid=0

    But not cookie in my computer. Any one suggess me another confing?
    I live in Thailand. My English grammar not well.

  2. #2
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sessions will not actually create cookies in your temporary internet files folder. The cookies created by sessions are only temporary and exist (on the client side) as long as the browser session

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  3. #3
    SitePoint Addict itsource's Avatar
    Join Date
    Jun 2001
    Location
    Thailand
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In this article Managing Users with PHP Sessions and MySQL

    All secure page include accesscontrol function. If user has right username and password, then register as session. so each page accesscontrol function check if already session variable. If has session set, user can view information. if not user must login again.

    If user login correct in page 1, he can click link to access page 2 without login again because his cookie already has session ID. But my problem is every page I must login becasue not cookie in my computer.

    This problem occur only in my computer(PWS + PHP) but when I upload to f2s it not happen. I think something wrong in my php.ini
    I live in Thailand. My English grammar not well.

  4. #4
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you set session.save_path in your php.ini to something like:

    session.save_path = c:\apache\sessions

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  5. #5
    SitePoint Addict itsource's Avatar
    Join Date
    Jun 2001
    Location
    Thailand
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I set, I have session file, but why not has cookie.
    I live in Thailand. My English grammar not well.

  6. #6
    SitePoint Member
    Join Date
    Jun 2001
    Location
    germany
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    simple fault...

    HI, in Your php.ini it should read:

    session.use_trans_id=0 .

    You had an extra s: ..trans_sid...

    Bombel

  7. #7
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No it should not. The setting is:

    session.use_trans_sid = 1

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  8. #8
    SitePoint Addict itsource's Avatar
    Join Date
    Jun 2001
    Location
    Thailand
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My purpose is, I want session id save in cookie in client. not pass in url. I read many article that session save in cookie by default.

    I don't someone see session id that pass in url. so I'm not set session.use_trans_sid=1. I try to set many method

    session.use_cookies=1
    session.use_trans_sid=0

    and change to 1,1 0,0 and 0,1 each try have session file in server but all not save session id in cookie in client

    Can anyone help me?

    (I want user login only one, and can view all secure page and not have session id in url)
    I live in Thailand. My English grammar not well.


Bookmarks

Posting Permissions

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