sessions dont work

#1
I installed a fresh version LiteSpeed/2.1.14 Standard.

configured a listener with ssl
configured a virtual host
linked the host to the listener
copied the files to the document root
set up mysql

the first page you see is a login page
when you enter valid user/pass,
it athenticates ok with the database, reads user privileges, stores them into the $_SESSION array.
then i call header:location: other page
but the next page says the user has no rights

a session cockie is created in /tmp with all correct values, AND another with empry session.
this script is working fine in several other servers, so I asume it's a issue with the
/opt/lsws/fcgi-bin/lsphp
or /opt/lsws/conf/php.ini
file

I have been reading PHP ' online manual's coments and someone mentions that i have to use session_write_close or something but didnt work

Looking at the php in server admin, a noticed that the access method has changed from fast cgi to lsapi, could this be my problem?
I tried creating another handler with fastcgi, but the server just reponds with 503 server busy.

I hope you can help me.
 

xing

LiteSpeed Staff
#2
1) You are getting the 503 error because you are attempting to use a FCGI handler with a the stock php binary that is compiled for LSAPI only.

2) Do a "echo phpinfo();" at the top of your authentication php page to see what cookies are actually received by php.

3) Seek the session class/function you are using to see if there is a SSL bit toggle.

4) Try settings output_buffering = 8192 in /opt/lsws/conf/php.ini. See if this helps.

The best way to check is to to make sure cookies are sent/received properly. Have one script set a cookie and the same or another to receive/echo it.

What it looks like if that the end user's browser is not receiving/storing the cookies.
 
#3
session do not work

1) ok, dropped that.
2) What am i looking for? (appended session output)
3) SSl bit toggle? not sure/no idea what you mean by that
4) Did not work.

phpinfo()
Session Support enabled
Registered save handlers files user

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 Off Off
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_divisor 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 Off Off

I have formatted this server 3 times, and this is the first time i got this behavior. Previous versions of lsws worked fine.
I will try whit an older version to see what happens.
 
Top