#29485 [Opn->Fbk]: Segfault problem.
| From: | tony2001@php.net | Date: | Mon, 02 Aug 2004 08:17:42 +0000 |
| Subject: | #29485 [Opn->Fbk]: Segfault problem. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-63891@lists.php.net to get a copy of this message | ||
ID: 29485
Updated by: tony2001@php.net
Reported By: ph8 at theplayboymansion dot net
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: Redhat Taroon(enterprise) & RH9
PHP Version: 5CVS-2004-08-01 (dev)
New Comment:
Please, try this patch:
http://tony2001.phpclub.net/dev/tmp/session.diff
Previous Comments:
------------------------------------------------------------------------
[2004-08-01 22:22:08] ph8 at theplayboymansion dot net
Description:
------------
http://pastebin.com/88196
------------------------------------------------------
This page generates a seg fault in apache using php5-dev
NB: If you comment out the include, it works. Why? Who the hell knows
[Sun Aug 01 18:53:16 2004] [notice] child pid 30397 exit signal
Segmentation fault (11)
[Sun Aug 01 18:53:19 2004] [notice] child pid 30398 exit signal
Segmentation fault (11)
-------------------
Index.php
-------------------
<?php
include('../include.php');
function getmicrotime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
echo('rahrahrah');
//$s = &session::getInstance();
//$loggedin = $s->verifySession();
$p = strtolower($_GET['p']);
// If the page is not set, and they're logged in
if (!$p && $loggedin)
{
$p = 'announce';
}
elseif (!$p && !$loggedin)
{
$p = 'login';
}
//$o->getPage($p);
$time_end = getmicrotime();
$sid = session_id();
//$query = $d->q("SELECT session_id FROM |users");
//$r = $d->fO($query);
echo('Logged in = '.$loggedin.' :: Sid = '.$sid.' :: Needed =
'.$r->session_id."<br />");
echo('<!-- Execution time: '.($time_end-$time_start).' -->'."<Br
/>");
?>
--------------
include.php
---------------
<?php
/*
* include.php
* Description: Includes all the important files
*/
if (!session_id()) { session_start(); }
require_once('functions.inc.php');
//$d = &sql::getInstance();
//$i = &input::getInstance();
//$o = &output::getInstance();
?>
Can anyone reproduce this or tell me something that is blatantly wrong?
Reproduce code:
---------------
http://pastebin.com/88196
Expected result:
----------------
see the page displayed as normal - not a segfault from opening a
session!!
Actual result:
--------------
segfault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29485&edit=1