php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39636 PHP 5.2.1-dev crashes Apache 2.2.3
Submitted: 2006-11-26 13:09 UTC Modified: 2006-11-29 20:58 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:4 (100.0%)
Same OS:4 (100.0%)
From: dj02 dot net at nbl dot fi Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 5.2.1-dev (Nov 29 2006 12:17:35) OS: Windows XP PRO SP2 (5.1.2600)
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: dj02 dot net at nbl dot fi
New email:
PHP Version: OS:

 

 [2006-11-26 13:09 UTC] dj02 dot net at nbl dot fi
Description:
------------
PHP 5.2.0 crashes Apache 2.2.3 after long Online period.

Reproduce code:
---------------
http://www.dj02net.com/crashreports/

Expected result:
----------------
http://www.dj02net.com/crashreports/


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-27 09:52 UTC] tony2001@php.net
Please try using this CVS snapshot:

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


 [2006-11-29 15:44 UTC] dj02 dot net at nbl dot fi
Didn't help.

Build: Nov 29 2006 12:17:35

Changed server to run PHP a CGI. Hope it doesn't crash anymore.

PHP crashes on the following code (in PHP 5.1 it didn't):

// -------------------------------------------- Kirjautumiseen liittyv?t ----------------------------------------

if (in_array("logout",$_operation)) // LogOut
{
  timed_delete($bandb, $div, 4);
  lock($db);
  db_delete_col($db, $div, 3, 3);  // poistetaan viestit roskakorista
  unlock($db);
  lock($sesdb);
  db_delete_col($sesdb, $div, $_SESSION['ssid'], 1);  // poistetaan vanha sessiovarmistustunniste
  unlock($sesdb);
  lock($userfile);
  $value = db_modify_line($userfile, $div, $_SESSION['name'], 0, 15, time());  // asetetaan viimeisin k?yntiaika
  unlock($userfile);

  setcookie(session_name() ,"", time()-100, "/"); // poistetaan sessio
  unset($_SESSION);

  header("Location: " . $server_php_self . "?loggedout=true$get_more");
  exit;
}
 [2006-11-29 15:47 UTC] dj02 dot net at nbl dot fi
-
 [2006-11-29 15:53 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2006-11-29 17:09 UTC] dj02 dot net at nbl dot fi
Only problem is that code is from guestbook. So it includes quite much code.

Guestbook ZIP-Package: http://www.zuronet.org/getfile.php?filename=vk206
The Code i copied previously was from file called: "index.php"
 [2006-11-29 17:16 UTC] dj02 dot net at nbl dot fi
Mistake in URL. Here's the right one.

Guestbook ZIP-Package:
http://www.dj02net.com/crashreports/vk206.zip
The Code i copied previously was from file called: "index.php"
 [2006-11-29 17:28 UTC] tony2001@php.net
Thanks, but the guestbook is a bit too much for a reproduce case.
 [2006-11-29 17:46 UTC] dj02 dot net at nbl dot fi
Hi,

What would be better category?
I would be really thanksful if you could check the code.
 [2006-11-29 18:02 UTC] tony2001@php.net
I would be thankful too if you provide a short (20-30 lines max) but complete reproduce code.
 [2006-11-29 19:02 UTC] dj02 dot net at nbl dot fi
I'll tray now (i'll tell you three files).

Config.php (1/3):
$path = "C:/www/fncustomers/heebu/guestbook/";
$http = "http://www.heebu.com/guestbook/";
$get_more = "";
$server_php_self = $_SERVER['PHP_SELF'];
$server_php_self = $_SERVER['PHP_SELF'];
if(empty($path))
{ $path = getcwd().'/'; /* jos polkua ei ole asetettu, yritet??n hakea se. */
  if(!file_exists($path."dbfunctions.php")) die($path.'<br>Polku on v??rin, tai t?rkeit? tiedostoja puuttuu!'); }

if(empty($http))
{ array_pop($http = explode("/","http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']));
  $http = implode("/",$http)."/"; }


$version = "2x06"; /* Versiotieto */
$div = "\t"; /* erottelija 1 */
$div2 = "|"; /* erottelija 2 */

$updateaddr = "http://koti.mbnet.fi/turazuro/updates/zurogb.txt";
$ipcheckaddr = "http://www.ripe.net/perl/whois?form_type=simple&full_query_string=&do_search=Search&searchtext=";

$userfile = $path . "data/users.txt";              /* K?ytt?j?tietokanta  */
$cfgfile = $path . "data/config.txt";		       /* Asetustietokanta */
$sesdb = $path . "data/sesdb.txt";                 /* Sessioj?rjestelm?n aputiedosto */
$bandb = $path . "data/banned.txt";		           /* Bannaustietokanta */
$db = $path . "data/db.txt";			           /* Viestitietokanta */
$oldmsgsfile = $path . "data/archive.txt";         /* Vanhojen viestien tietokanta */
$badwordfile = $path . "data/badwords.txt";        /* Kirosanasuodatintiedosto */
$floodfile = $path . "data/flood.txt";             /* Floodaustietokanta */

$smilefolder = $http."smilies";                    /* Hymi?kansio */
$skinpath = "skins/";                              /* Nahkakansio */
$langpath = "lang/";                               /* Kielikansio */
?>
 [2006-11-29 19:04 UTC] dj02 dot net at nbl dot fi
Index.php (2/3):
// -------------------------------------------- Kirjautumiseen liittyv?t ----------------------------------------

if (in_array("logout",$_operation)) // LogOut
{
  timed_delete($bandb, $div, 4);
  lock($db);
  db_delete_col($db, $div, 3, 3);  // poistetaan viestit roskakorista
  unlock($db);
  lock($sesdb);
  db_delete_col($sesdb, $div, $_SESSION['ssid'], 1);  // poistetaan vanha sessiovarmistustunniste
  unlock($sesdb);
  lock($userfile);
  $value = db_modify_line($userfile, $div, $_SESSION['name'], 0, 15, time());  // asetetaan viimeisin k?yntiaika
  unlock($userfile);

  setcookie(session_name() ,"", time()-100, "/"); // poistetaan sessio
  unset($_SESSION);

  header("Location: " . $server_php_self . "?loggedout=true$get_more");
  exit;
}
 [2006-11-29 19:07 UTC] dj02 dot net at nbl dot fi
Functions.php(3/3):

If you could check this from:
http://www.dj02net.com/crashreports/dbfunctions.php.txt
 [2006-11-29 20:51 UTC] tony2001@php.net
20-30 lines. Please.
 [2006-11-29 20:58 UTC] dj02 dot net at nbl dot fi
Hey,

I don't know how to tell much important code (which is used in logout) to 20-30 lines.

But i'll got it work as CGI Mode, Thanks.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 05 06:01:36 2025 UTC