Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 03-25-2004, 10:44 PM   #1 (permalink)
mtlinfo
Registered User
 
Join Date: Mar 2004
Posts: 3
mtlinfo is on a distinguished road
Send a message via ICQ to mtlinfo
Sessions are constantly dropping

Hi,

I have a script where the session are constantly dropping and since we ran out of ideas on how to fix it, I tought of installing a super simple script to test if session would also drop at any given time and I found this tutorial here...

http://codenewbie.com/tutorials/1131.html

I installed that "login with session" script on my site where you can login using the username/password joe/joe at this url.

http://www.justedesrabais.com/richard/index.php

The problem that I have with it is that sometimes I can login and click the links and everything looks fine and other times I login but when I click the links to arrive at page 2 for example, the session drops and it brings me back to the login form on index.php.

Do you have a clue where the problem might come from?

Since the session is dropping on both scripts, It has to be a problem on my ISP's server but where exactly!

What should I tell him to look for?

Thanks for any advices you might give me.

Mtlinfo
mtlinfo is offline   Reply With Quote
Old 03-25-2004, 10:48 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,489
sde is on a distinguished road
i guess you read my mind while i was replying to the pm =)

well i really think the session is not starting in the first place.

do you know what o/s the server is running? and what web server?

i think the session paths are defined in the php.ini file, .. and you do have to make sure that path is a valid directory.

i've never had to mess with it much though .. usually it just works =/
__________________
Mike
sde is offline   Reply With Quote
Old 03-25-2004, 11:04 PM   #3 (permalink)
mtlinfo
Registered User
 
Join Date: Mar 2004
Posts: 3
mtlinfo is on a distinguished road
Send a message via ICQ to mtlinfo
Read you pm,

It's not a coding error sde because I have another browser window open right now on your script (see URL above) and without ever closing it, the script worked fine for a while (I can click links and be redirected to the other pages with no problems) and 5 minutes or so later the session are dropped again the login form comes back.

Now you think this was normal right? It's just the session is out of time !

Well NO, I login again and I can get back in it alright but this time I click the links and i'm given the login form again everytime I click the links on the index.php page!!!

It's not the first time and script where that bug happens. Sometimes everything is fine, it keeps the sessions for a while and the next time i login, the session either closes as fast as I can login.

It's definitely a server bug. I'm not a pro but would bet 100$ bucks here :-)

You see, as I wrote this reply, the script ****** up again and now the links are working fine again and the script keeps it's session alive.

Anyone had this weird bug before?

Mtlinfo
mtlinfo is offline   Reply With Quote
Old 03-26-2004, 12:20 AM   #4 (permalink)
mtlinfo
Registered User
 
Join Date: Mar 2004
Posts: 3
mtlinfo is on a distinguished road
Send a message via ICQ to mtlinfo
Ok guys listen to this...

By luck the tech support of my ISP was available on ICQ even at 4am cool hey.

You were right sde, the bug was coming from the file named php.ini and it helped them focus on that file and 5 minutes later they updated this value:

session.gc_dividend / session.gc_divisor.

This value was making the session ID change from time to time and that was causing the crash of our scripts.

Everything work fine now.

Thanks guys and remember that value.

By fixing it, it will save you countless nights without sleep because your script would be crashing all the time while in fact the bug was coming from that stupid server value hehe.

Ciao :-)


Richard
mtlinfo is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
php sessions a_o PHP 6 11-27-2003 02:05 AM


All times are GMT -8. The time now is 09:14 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting