php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17451 session_start timeout
Submitted: 2002-05-27 07:24 UTC Modified: 2002-10-14 19:26 UTC
Votes:8
Avg. Score:4.6 ± 0.7
Reproduced:7 of 7 (100.0%)
Same Version:4 (57.1%)
Same OS:3 (42.9%)
From: eM_gotcha at gmx dot net Assigned:
Status: No Feedback Package: Session related
PHP Version: 4.2.1 OS: Linux 2.4.17
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
41 - 23 = ?
Subscribe to this entry?

 
 [2002-05-27 07:24 UTC] eM_gotcha at gmx dot net
i'm using apache 1.3.24 with php 4.2.1.

session_start sometimes takes too long and i get a timeout.
i've tryed to set the max. execution time for php higher then 30 seconds (60,90,...).
i've tryed to change rights for /tmp, running apache with another user and and and... i tryed different php-session settings. i don't do anything before i call session_start.
an apache restart sometimes help but not always. also it seems the problem appears only after several hours.
i don't get any error or warning message in my log files.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-31 12:24 UTC] eM_gotcha at gmx dot net
it seems that php sometimes ignores session.save_path and tries to save the session in the default path "/tmp".
i've set the path to another temp directory on my windows pc.
"/tmp" exists on my linux pc but not on the windows pc. the script which uses session_start crashes sometimes on my windows pc (also i've changed the path).
my php-debugger ALWAYS shows a warning that "/tmp" doesn't exist.
 [2002-08-27 19:33 UTC] michael dot schlottke at sloede dot com
I have RH73 and the same problems... it occurres with php4.2.0, 4.2.1, 4.2.2, 4.3.0 and with apache1.3.26, 2.0.39.

First the scripts seem to work, after a while of using the script the browser will say something like Request data from localhost... and I can wait forever :(
It's directly related to session_start because if I remove the session_start directive or make a "rm -f /<tmp-dir>/sess*", it will work again
 [2002-08-27 22:17 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-08-30 04:33 UTC] michael dot schlottke at sloede dot com
Nah, it doesn't work either.
It is even worse, now the script crashes the very first time after calling a session_start() while a session variable is registered.
 [2002-08-30 04:51 UTC] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

A backtrace would be very nice, it is much easier debugging with it.

Derick
 [2002-09-19 19:12 UTC] christian dot pontesegger at web dot de
I guess I have the same problem:
When storing an object within a session it only works as long as the session filesize doesn't change. When I change some values so that the filesize grows, PHP crashes as soon as I touch another object value.
Apache reports:
notice] child pid 6571 exit signal Segmentation fault (11)

I've got some Example files for you, if you like to reproduce the error:

File 1 - object definition:
---------------------------

class User {
	var $valid;
	var $punkte;

	function User() {
		$this->clear_values();
	}

	function clear_values() {
		$this->valid = false;
		$this->punkte = 0;
	}

	function login() {
		$this->valid = true;
	}

	function logout() {
		$this->clear_values();
	}
}

file 2: login.php (just the PHP part)
-----------------

	require("User2.class.php");
	$user = new User();
	session_register('user');

	$user->login();
	echo "Status: " . $user->valid;
	echo "<br>Punkte: " . $user->punkte;

file 3: modify
--------------

	require("User2.class.php");
	$user = new User();
	session_register('user');

	if ($user->valid) $user->punkte++;
	echo "Status: " . $user->valid;
	echo "<br>Punkte: " . $user->punkte;

file 4: logout
--------------

	require("User2.class.php");
	$user = new User();
	session_register('user');

	$user->logout();
	echo "Status: " . $user->valid;
	echo "<br>Punkte: " . $user->punkte;


for testing:

call login.php, then recall modify.php several times until $user->punkte is bigger than 10
then call logout.php -> apache will report that segmentation fault and your session is dead. Any further access to that session will timeout your browser. Other php functions work perfectly!
The content of the session file itself is still valid and there is no problem with system rights...

my system:
Redhat 7.1, kernel 2.4.2-2
Apache 2.0.39
PHP 4.2.1
compile options:
./configure' '--with-mysql' '--with-apxs2=/www/bin/apxs' '--enable-trans-sid' '--enable-sysvsem' '--enable-sysvshm'
 [2002-09-23 07:28 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-10-14 19:26 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 22:01:26 2024 UTC