ID: 17451 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Feedback Bug Type: Session related Operating System: Linux 2.4.17 PHP Version: 4.2.1 New Comment:
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' Previous Comments: ------------------------------------------------------------------------ [2002-08-30 04:51:13] [EMAIL PROTECTED] 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-08-30 04:33:53] [EMAIL PROTECTED] 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-27 22:17:58] [EMAIL PROTECTED] 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-27 19:33:27] [EMAIL PROTECTED] 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-05-31 12:24:55] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/17451 -- Edit this bug report at http://bugs.php.net/?id=17451&edit=1