Thread: Session error

    #1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2008
    Posts
    674
    Rep Power
    38

    Session error


    OK, I'm looking my error log and it appears as though the server is unable to write session variables.

    Here's the error I get in the error log:
    Code:
    PHP Warning:  session_start(): open(/var/php_sessions/sess_885e27a41aca51cca48721d27084b856, O_RDWR) failed: No such file or directory (2) in /hermes/waloraweb028/b2361/moo.nancys2/CMS//about.php on line 2
    Can anyone tell me how to fix this? I believe the hosting company upgraded the PHP as this was an old project, and now the code is failing.

    Please let me know if you need more info.
    thanks
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,237
    Rep Power
    9400
    Apparently /var/php_sessions does not exist.

    Do you have any code that sets session-related INI settings? Like the save path? If so then it needs to be updated to the new save path, or left out so that the defaults will be used.
    If not then the hosting provider needs to change the save path.

    You can tell more by using phpinfo() to look at the session.* settings. "Master" is the default, "local" is what you have configured for yourself.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2008
    Posts
    674
    Rep Power
    38

    Hey requinix


    My PHP ini file has this for the sessions:: [Session]
    session.save_handler = files
    session.save_path = "/tmp"
    session.use_cookies = 1
    session.name = PHPSESSID
    session.auto_start = 1
    session.cookie_lifetime = 9999999999
    session.cookie_path = /
    session.cookie_domain =
    session.serialize_handler = php
    session.gc_probability = 1
    session.gc_divisor = 1000
    session.gc_maxlifetime = 1440
    session.bug_compat_42 = 0
    session.bug_compat_warn = 1
    session.referer_check =
    session.entropy_length = 0
    session.entropy_file =
    session.cache_limiter = nocache
    session.cache_expire = 180
    session.use_trans_sid = 0
    session.hash_function = 1
    session.hash_bits_per_character = 5
    url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"


    The CMS that needs the sessions to work is like three folders deep from the root. I'm not sure what I need to adjust in the PHP ini file. Can you help?

    thanks
  6. #4
  7. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,237
    Rep Power
    9400
    Honestly I would just ask your hosting provider. Something in the upgrade broke your code, they should at least help you find out why. There might be symlinks or a chroot jail or something else in place affecting this and they're the ones who would know about it.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2008
    Posts
    674
    Rep Power
    38

    Thanks Requinix


    The hosting company fixed the path for the session read and write, and now, everything works.

    thanks for the help!!

IMN logo majestic logo threadwatch logo seochat tools logo