[PHPLIB] Bad environ strings causing coredumps in session.inc From: Sam C. Nicholson !! (scion <email protected>)
Date: 11/02/99

IN trying to get things down to their simplest, I now have a
simple pinfo.php3 that calls page_open(), phpinfo() and page_close().
In this case, I am only using the session code.

local .inc is similarly short, and has auth and user
removed so as only to use sessions, and prepend.php3 is also cut down:

All are attached below:

Session is putting something into the php/apache environment which is
causing a coredump. It happens with session.inc newer than 1.34.

In case anyone wants to see the result, check out stratus.webrelay.net/pinfo.php3
It's running right now with a fresh 7.2 tarball extract, and session.inc 1.48.

I use 1.48, because I thought I was running into an expression of too many '\'
somewhere. However, I think this is not an issue for me in this case.

Regards,
-sam

pinfo.php3:
----------
<?php
  page_open(array("sess" => "Example_Session"));
 ?>
<html>
<head><title>PHP3 test page</title></head>
<body bgcolor="#ffffff">
<?php
  page_close();
  phpinfo()
 ?>
</body>
</html>

local.inc:
---------
<?php
class Example_CT_Shm extends CT_Shm {
  var $max_sessions = 500; ## number of maximum sessions
  var $shm_key = 0x123754; ## unique shm identifier
  var $shm_size = 64000; ## size of segment
}

class Example_Session extends Session {
  var $classname = "Example_Session";

  var $cookiename = ""; ## defaults to classname
  var $magic = "Hocuspocus"; ## ID seed
  var $mode = "cookie"; ## We propagate session IDs with cookies
  var $fallback_mode = "get";
  var $lifetime = 0; ## 0 = do session cookies, else minutes
  var $that_class = "Example_CT_Shm"; ## name of data storage container
  var $gc_probability = 5;
}
?>

prepend.php3:
------------
<?php
if (!is_array($_PHPLIB)) {
  $_PHPLIB["libdir"] = "";
}

require($_PHPLIB["libdir"] . "ct_shm.inc");
require($_PHPLIB["libdir"] . "session.inc");
require($_PHPLIB["libdir"] . "local.inc");
require($_PHPLIB["libdir"] . "page.inc");
?>
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.