|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
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'