By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,652 Members | 1,337 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,652 IT Pros & Developers. It's quick & easy.

Urgent Help with Session

P: n/a
Dear All, i have developed an application located on a server that has
a front end and a back end interface, the application uses session
object. when i log on as a backend user and a client user form the same

computer, the sessions conflict together and i get unexpected results,
and i found out that this happenes when one of the sessions ends. Ex:
when i log on as a backend user, and then as a front end one(from the
same computer at the same time), if i log out(destroy the session) as a

front end user the back end user no longer works because the session
variables are destroyed. Any Ideas how to fix that, or is there a
solution in the first place???

Thnx

May 4 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Meena wrote:
Dear All, i have developed an application located on a server that has
a front end and a back end interface, the application uses session
object. when i log on as a backend user and a client user form the same

computer, the sessions conflict together and i get unexpected results,
and i found out that this happenes when one of the sessions ends. Ex:
when i log on as a backend user, and then as a front end one(from the
same computer at the same time), if i log out(destroy the session) as a

front end user the back end user no longer works because the session
variables are destroyed. Any Ideas how to fix that, or is there a
solution in the first place???

Thnx


Not a PHP problem, but how things work. The session id is stored in a cookie,
and obviously you can only have a one cookie with that name.

The solution is to use two different browsers - not two windows of the same browser.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
May 4 '06 #2

P: n/a
On Thu, 04 May 2006 05:23:25 -0700, Meena wrote:
Dear All, i have developed an application located on a server that has
a front end and a back end interface, the application uses session
object. when i log on as a backend user and a client user form the same

computer, the sessions conflict together and i get unexpected results,
and i found out that this happenes when one of the sessions ends. Ex:
when i log on as a backend user, and then as a front end one(from the
same computer at the same time), if i log out(destroy the session) as a

front end user the back end user no longer works because the session
variables are destroyed. Any Ideas how to fix that, or is there a
solution in the first place???


One solution is to use different domain names for them.

for example, you could setup www.yourdomain.com to go to the frontend and
backend.yourdomain.com to go to the backend

For testing, you can simply map these domains in your HOSTS file
(/etc/hosts or c:\windows\system32\drivers\etc\hosts I think) and point
them to the ip of your development server.

Cheers,

Ben
May 4 '06 #3

P: n/a
Meena wrote:
Dear All, i have developed an application located on a server that has
a front end and a back end interface, the application uses session
object. when i log on as a backend user and a client user form the same

computer, the sessions conflict together and i get unexpected results,
and i found out that this happenes when one of the sessions ends. Ex:
when i log on as a backend user, and then as a front end one(from the
same computer at the same time), if i log out(destroy the session) as a

front end user the back end user no longer works because the session
variables are destroyed. Any Ideas how to fix that, or is there a
solution in the first place???

Thnx


You can have different names for frontend and backend session
variables: $_SESSION['fe_xxx'] and $_SESSION['be_xxx'].
Using this solution, you must not destroy whole session, just unset
needed session members, i.e. unset($_SESSION['fe_xxx']);

May 10 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.