February 13th, 2013, 05:17 PM
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:
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.
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
Please let me know if you need more info.
February 13th, 2013, 05:21 PM
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.
February 13th, 2013, 05:27 PM
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.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.entropy_length = 0
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?
February 13th, 2013, 06:35 PM
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.
February 13th, 2013, 08:19 PM
The hosting company fixed the path for the session read and write, and now, everything works.
thanks for the help!!