php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29485 Segfault problem.
Submitted: 2004-08-01 22:22 UTC Modified: 2004-08-02 12:36 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: ph8 at theplayboymansion dot net Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 5CVS-2004-08-01 (dev) OS: Redhat Taroon(enterprise) & RH9
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ph8 at theplayboymansion dot net
New email:
PHP Version: OS:

 

 [2004-08-01 22:22 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-02 10:17 UTC] tony2001@php.net
Please, try this patch:
http://tony2001.phpclub.net/dev/tmp/session.diff
 [2004-08-02 12:16 UTC] tony2001@php.net
Please try using this CVS snapshot:

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

Shoud be fixed now.
 [2004-08-02 12:36 UTC] ph8 at theplayboymansion dot net
The patch worked, i assume that's all that has changed in the latest update. Nice work! They should pay you more :)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 16:02:26 2025 UTC