SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    monitormensch oerdec's Avatar
    Join Date
    Sep 2004
    Location
    Hamburg
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Failed to initialize session module

    Hi there,

    I get sometimes the following error:
    Code:
    Fatal error: session_start() [function.session-start]: Failed to initialize session module in /www/htdocs/.../index.php on line 10
    Does anybody know how to get rid of this? I searched the forums but didnīt find a clear answer.

    thanks,

    oerdec

  2. #2
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is your session module active?
    Try to see if phpinfo() shows you a section named session, if it does not, sessions are not active in your php installation.

  3. #3
    monitormensch oerdec's Avatar
    Join Date
    Sep 2004
    Location
    Hamburg
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    sessions are enabled. Hereīs the part of my phpinfo()

    Code:
    Session Support 	enabled
    Registered save handlers 	files user mm
    
    Directive	Local Value	Master Value
    session.auto_start	Off	Off
    session.bug_compat_42	On	On
    session.bug_compat_warn	On	On
    session.cache_expire	180	180
    session.cache_limiter	nocache	nocache
    session.cookie_domain	no value	no value
    session.cookie_lifetime	0	0
    session.cookie_path	/	/
    session.cookie_secure	Off	Off
    session.entropy_file	no value	no value
    session.entropy_length	0	0
    session.gc_dividend	100	100
    session.gc_maxlifetime	1440	1440
    session.gc_probability	1	1
    session.name	PHPSESSID	PHPSESSID
    session.referer_check	no value	no value
    session.save_handler	files	files
    session.save_path	/tmp	/tmp
    session.serialize_handler	php	php
    session.use_cookies	On	On
    session.use_only_cookies	Off	Off
    session.use_trans_sid	On	On
    In my script Iīm using
    PHP Code:
    session_set_cookie_params("31536000");
    ini_set ('url_rewriter.tags'''); 
    to set the lifetime to 1 year and to get rid of the session ID in URLs.

    The problem is not permanent. It occurs from time to time.

    oerdec

  4. #4
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you comment out those two lines does session_start() work?

  5. #5
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    session_set_cookie_params() takes an int as the first parameter, so get rid of those double quotes

  6. #6
    monitormensch oerdec's Avatar
    Join Date
    Sep 2004
    Location
    Hamburg
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hehe - ok, that seems to cause the error. thanks!

  7. #7
    monitormensch oerdec's Avatar
    Join Date
    Sep 2004
    Location
    Hamburg
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ahhhrg. I got a new one:

    Code:
    Notice: session_start() [function.session-start]: ps_files_cleanup_dir: opendir(/tmp) failed: Permission denied (13) in /www/htdocs/.../index.php on line 10
    edit: ok, itīs just a notice but I donīt want any notices.


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
  •