[PHP-DEV] PHP 4.0 Bug #3844: sessions not being recognized From: ajprice <email protected>
Date: 03/16/00

From: ajprice <email protected>
Operating system: linux 2.2.12-20
PHP version: 4.0 Beta 4 Patch Level 1
PHP Bug Type: Misbehaving function
Bug description: sessions not being recognized

I am using phpb4pl1 as a statically compiled module with apache 1.3.12. I configured php as follows:
CFLAGS="-O2 -DEAPI" \
./configure \
--disable-debug \
--with-mysql \
--with-unixODBC=/usr/local/unixODBC

The problem I am having is that the following script is not running as expected on my machine. However, I know that this scripts runs correctly on a win98 box with phpb4 (or perhaps phpb4pl1, i'm not sure, it's not my box).

*********
<?

session_start();
if(!$m){
  echo "<br>registering m";
  $m="first time";
  session_register('m'); //only gets called the first time the page is loaded
}

echo '
        <html><head><title>test</title></head><body>
        <form action="me.php" method="post">
        new m: <input type="text" name="new_m"><br>
        set m: <input type="radio" name="set_m"><br>
        <input type="submit" value="submit">
        </input>
        </body>
        </html>
';

if($set_m){
  $m=$new_m;
  echo "<br>m: $m";
}else{
  echo "<br>m: $m";
}

?>

************
On my machine, everytime I click submit or reload the page, a new session is created instead of using the session created the first time the page is loaded.

The session related options from my php.ini file are as follows:

session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_maxlifetime = 1440
session.referer_check = 1
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180

Thanks in advance.

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>