session hang problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
stclaus
Forum Newbie
Posts: 2
Joined: Sat Aug 12, 2006 8:13 am

session hang problem

Post by stclaus »

Hi,
I'm currently experiencing a problem using sessions under php 4.4.2. I
store variables and objects inside session variables, and all works
well under php 5.x, but when I upload those pages to my hosting
(tiscali italia business) the whole site and session variables seem to
work at the beginning, but after a variable number of request
(sometimes the second, sometimes the fifteenth page requested) all the
site get stuck, every request from the site domain 'hangs up' from this
moment.

But the site isn't really stuck, any request to a page (plain html or
php+html) that not use sessions (without session_start()) works well
and these type of pages are sent to browser.

If I make requests from another browser, but from the same host, or if
I switch to another client host, a new session is created, I can
navigate through a few pages and after some requests I experience the
problem again.

Notice that after about thirty minutes (a sort of timeout?) I can
navigate again from this host+browser.

So, after these tests, I'm pretty sure that the problem is caused by
some stranges behaviours of sessions, but I don't know if I didn't
consider some hosting provider's php.ini session settings, or if it
could even be a bug or an unexpectedly weird handling of session
variables.

Thanks everyone for any clue you would give me to resolve this problem.

-- Lorenzo
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I've never experienced such behaviour. Please post your code.
stclaus
Forum Newbie
Posts: 2
Joined: Sat Aug 12, 2006 8:13 am

Post by stclaus »

Obviously cant' post the whole site..

I simply call session_start(); on every page before sending any other header information, and access session variables via $_SESSION array..

This is the way I always used sessions in PHP and I never experienced this problems. Am I missing something ? I'm pretty sure that objects in session variables are well supported under PHP 4.4.2 too, am I wrong ?
toasty2
Forum Contributor
Posts: 361
Joined: Wed Aug 03, 2005 10:28 am
Location: Arkansas, USA

Post by toasty2 »

At least post some of your code, try to find some that may be relevant, we can't just "know" how your website works :o
Post Reply