Results 1 to 2 of 2

Thread: Zend_Auth storage fails to persist

  1. #1
    schacko is offline Junior Member
    Join Date
    Oct 2008
    Posts
    3

    Default Zend_Auth storage fails to persist

    Hello,

    I am doing some authentication, it works fine
    1. I verify through isValid()
    2. store the data I want to persist using Zend_Auth's getStorage()->write(...)
    3. forward to the default (homepage) action


    The data persists to this point, but when I move to another page, the data is lost.
    Is this a common problem with a quick fix?

    here's a snippet from my php.ini file
    Code:
    session.save_path = "c:\Temp"
    
    ; Whether to use cookies.
    session.use_cookies = 1
    
    ;session.cookie_secure =
    
    ; This option enables administrators to make their users invulnerable to
    ; attacks which involve passing session ids in URLs; defaults to 0.
    ; session.use_only_cookies = 0
    
    ; Name of the session (used as cookie name).
    session.name = PHPSESSID
    
    ; Initialize session on request startup.
    session.auto_start = 0
    
    ; Lifetime in seconds of cookie or, if 0, until browser is restarted.
    session.cookie_lifetime = 0
    
    ; The path for which the cookie is valid.
    session.cookie_path = \
    
    ; The domain for which the cookie is valid.
    session.cookie_domain =

  2. #2
    schacko is offline Junior Member
    Join Date
    Oct 2008
    Posts
    3

    Lightbulb problem solved!

    hello,

    for anyone interested, when developing on the local machine I was using http://localhost/myapp/public to test.

    With that URL, sessions failed to work properly.

    In another forum I stumbled upon a post that pointed out there is a difference between using 'localhost' and using the explicit 127.0.0.1

    After changing the url to http://127.0.0.1/myapp/public, sessions worked as expected

    oh, and the php.ini settings described in the post above were not an issue.

    If someone has encountered this and has an explanation of why using localhost is a problem, please share.

Similar Threads

  1. Zend OpenID Provider DB Storage
    By johnjackson in forum Authentication & Authorization
    Replies: 3
    Last Post: 01-22-2011, 08:58 PM
  2. How to dictate the session storage with Zend_Session_Namespace?
    By darrenl in forum Authentication & Authorization
    Replies: 1
    Last Post: 07-30-2010, 02:57 AM
  3. Zend_Auth - is creation of multiple Zend_Auth instances dangerous?
    By eMBeer in forum Authentication & Authorization
    Replies: 2
    Last Post: 12-08-2009, 07:17 AM
  4. zend search lucene - how to open larger index storage
    By rassen in forum Mail, Formats & Search
    Replies: 0
    Last Post: 05-06-2008, 12:46 AM
  5. Using custom storage session
    By pablo in forum Authentication & Authorization
    Replies: 1
    Last Post: 03-19-2008, 05:27 PM

Posting Permissions

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