Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Session Variable not Detecting Login In


juniorprg

Recommended Posts

Posted

This has been bothering me for weeks now. I have contacted some professionals either but no use yet.

 

session time for a customer in oscommerce is 24mins after that session expires... when a customer tries to login after this session time, the index.php page simply reloads back, without logging in.

 

But when the browser is refreshed , and then entered thee login details, it will login...

 

I was told that its because the session variables are not detected when tried to login... please help me if there is a way to fix this, as most of my customers tend to leave there page open and when they try to login , it wont let them and will simply piss them off

 

I use the remote shared hosting service hence i cannot change anything in the server side, i read somwhere that pple had problems with the admin the same level, but not with front end.....

l8ter

Posted
This has been bothering me for weeks now. I have contacted some professionals either but no use yet.

 

session time for a customer in oscommerce is 24mins after that session expires... when a customer tries to login after this session time, the index.php page simply reloads back, without logging in.

 

But when the browser is refreshed , and then entered thee login details, it will login...

 

I was told that its because the session variables are not detected when tried to login... please help me if there is a way to fix this, as most of my customers tend to leave there page open and when they try to login , it wont let them and will simply piss them off

 

I use the remote shared hosting service hence i cannot change anything in the server side, i read somwhere that pple had problems with the admin the same level, but not with front end.....

Are you saying that after 24 minutes, when their session expires, when they try to login as the first thing, it redirects back to index.php without doing anything? Or are you saying that after 24 minutes, when they try to do something else, like add another product to their cart, it's not automatically logging them back in?

 

Richard.

Richard Lindsey

Posted

the first one, when i try to login in after 24mins , it wont login, it just reloads the page back to how it was, and then no matter how many times i try it just that, but when i refresh the browser and then login it goes fine...

l8ter

Posted
the first one, when i try to login in after 24mins , it wont login, it just reloads the page back to how it was, and then no matter how many times i try it just that, but when i refresh the browser and then login it goes fine...

This may be due to the session id that's being sent with the login request, since the database (or file, however your sessions are stored) is maybe holding onto that sessionid, but marking it as expired, so when you try to use that session id, it's going screwy... I'm not sure... Check your admin console, under Configuration -> Sessions, and try turning on the option to recreate the session id at the time of login... See if that helps, as it may automatically regenerate a new session id for them when they make the login attempt...

 

Richard.

Richard Lindsey

Posted

recreate session does the same thing, but im trying again...

 

it happens at login.php too....

 

is there a way i can test if what you said is really happening, i.e session is getting expired after 24mins

 

also if i delete the session keys from database will it help (i use define('STORE_SESSIONS', 'mysql'))

l8ter

Posted
recreate session does the same thing, but im trying again...

 

it happens at login.php too....

 

is there a way i can test if what you said is really happening, i.e session is getting expired after 24mins

 

also if i delete the session keys from database will it help (i use define('STORE_SESSIONS', 'mysql'))

Sorry, but I can't give you a definitive answer in either case... You might be putting some checkpoints in your code before you try this post-session-expiration... Just drop some lines randomly throughout the login procedure like:

 

echo "A<br>";

echo "B<br>";

echo "C<br>";

echo "D<br>";

echo "E<br>";

 

And then recreate your test and see where it's failing, by which lines output...

 

Richard.

Richard Lindsey

Posted

i dint quiet understand when you said about putting those in login procedures, did you mean in login.php page?

 

how's this supposed to help understand the problem?

 

 

What i did was in login.php under the session_recreate...

 

if (SESSION_RECREATE == 'True') {

tep_session_recreate();

echo"recreated";

 

but im not able to see this echo anywhere, which makes me under if i did was right

l8ter

Posted
i dint quiet understand when you said about putting those in login procedures, did you mean in login.php page?

 

how's this supposed to help understand the problem?

What i did was in login.php under the session_recreate...

 

if (SESSION_RECREATE == 'True') {

tep_session_recreate();

echo"recreated";

 

but im not able to see this echo anywhere, which makes me under if i did was right

Yes, these will go into login.php, and you'll place them at key checkpoints in the login process, but right after conditions, before function calls, so using your example above, I would personally do something like this:

 

echo "A<br>";
if (SESSION_RECREATE == 'True') {
echo "B<br>";
 tep_session_recreate();
echo "C<br>";

Then, when I retested it, if I saw say:

 

A

B

 

Then I would know that it passed the SESSION_RECREATE check, but never returned from the call to tep_session_recreate, since C was never output... If I saw just the A, I would know it didn't even pass the SESSION_RECREATE check... If you drop these things in throughout the login processing code, you can see what path the program execution takes, and where it stops, and then you'll know why it stopped the login process, and you can focus on that as the problem...

 

Richard.

Richard Lindsey

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...