php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18962 session_register() does not work
Submitted: 2002-08-19 08:24 UTC Modified: 2002-08-21 09:15 UTC
From: hirac dot kasapoglu at turkcell dot com dot tr Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.2.2 OS: Tru64 5.1
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hirac dot kasapoglu at turkcell dot com dot tr
New email:
PHP Version: OS:

 

 [2002-08-19 08:24 UTC] hirac dot kasapoglu at turkcell dot com dot tr
GCC   : 3.0.2
Apache: 1.3.26
PHP   : 4.2.2

I compiled apache with:
./configure --prefix=/usr/local/apache --enable-module=so
I compiled php with:
./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/apxs

compilation was successful. Everything seems to be ok except when I try to use session_register() functions. function return TRUE value but sessions not stored. 

I use XOOPS and postnuke portal systems. They did work on Linux machine without any error, but same scripts' session related parts does not work on Tru64.

Best regards



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-19 08:30 UTC] hirac dot kasapoglu at turkcell dot com dot tr
register_globals = On

all other option was set to default values for Apache and PHP.
 [2002-08-19 16:27 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip
 [2002-08-20 03:11 UTC] hirac dot kasapoglu at turkcell dot com dot tr
php4-latest.tar.gz gives compile errors:

#./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/apxs
----> finished without errors
#make
......
/bin/ksh libtool --silent --mode=compile gcc  -Imain/ -I/usr/tmp2/php4-200208192100/main/ -DPHP_ATOM_INC -I/usr/tmp2/php4-200208192100/include -I/usr/tmp2/php4-200208192100/main -I/usr/tmp2/php4-200208192100 -I/usr/tmp2/php4-200208192100/Zend -I/usr/local/mysql/include -I/usr/tmp2/php4-200208192100/ext/xml/expat  -DOSF1 -DUSE_HSREGEX -DUSE_EXPAT -I/usr/tmp2/php4-200208192100/TSRM  -g -O2  -prefer-pic -c /usr/tmp2/php4-200208192100/main/streams.c -o main/streams.lo 
/usr/tmp2/php4-200208192100/main/streams.c: In function `_php_stream_stat':
/usr/tmp2/php4-200208192100/main/streams.c:238: structure has no member named `_F64_stat'
/usr/tmp2/php4-200208192100/main/streams.c: In function `php_stdiop_cast':
/usr/tmp2/php4-200208192100/main/streams.c:734: warning: cast to pointer from integer of different size
*** Exit 1
Stop.
 [2002-08-20 07:53 UTC] hirac dot kasapoglu at turkcell dot com dot tr
I run following scripts:

## i2.php
<?php
session_start();
$counter = 1;
session_register("counter");
header("Location: /i.php");
?>

## i.php
<?php
session_start();
$counter = 0;
### uncomment this to see the difference
# session_unregister("counter");
session_register("counter");
unset($counter);
$counter = 4;
session_register("counter");
header("Location: /i1.php");
?>

## i1.php
<?php
session_start();
print $counter;

?>

When I run http://xxxx/i2.php

On Tru64 there are 3 session files under /tmp.

aasdo17.sss.turkcell.tgc#root>cd /tmp
aasdo17.sss.turkcell.tgc#root>ls -l
total 2
-rw-------   1 nobody   system        12 Aug 20 14:45 sess_11623a76ef789a894a11ea31cce5e4c1
-rw-------   1 nobody   system         0 Aug 20 14:45 sess_392754fba1927790fe035bcd9e7bd4bb
-rw-------   1 nobody   system        12 Aug 20 14:45 sess_8b48be57c2a42e9d0c73bbad6ad281e3

But on another (and working) system there are only one session file.
 [2002-08-20 22:56 UTC] kalowsky@php.net
The three session files are because the session var is being lost.  There is nothing wrong with PHP in that sense... thats a local issue.

The session_unregister() issue was fixed though in the current cvs HEAD.  Your compile issues though are of issue.  What did you do to get around them?
 [2002-08-21 02:31 UTC] hirac dot kasapoglu at turkcell dot com dot tr
I managed to compile latest STABLE: 
php4-STABLE-200208202100

But result is same :(

my session options in php.ini is (as default except register_globals)

[Session]
; Handler used to store/retrieve data.
session.save_handler = files

; Argument passed to save_handler.  In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this 
; variable in order to use PHP's session functions.
session.save_path = /tmp

; Whether to use cookies.
session.use_cookies = 1


; Name of the session (used as cookie name).
session.name = PHPSESSID

; Initialize session on request startup.
session.auto_start = 0

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0

; The path for which the cookie is valid.
session.cookie_path = /

; The domain for which the cookie is valid.
session.cookie_domain =

; Handler used to serialize data.  php is the standard serializer of PHP.
session.serialize_handler = php

; Percentual probability that the 'garbage collection' process is started
; on every session initialization.
session.gc_probability = 1

; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
session.gc_maxlifetime = 1440

; Check HTTP Referer to invalidate externally stored URLs containing ids.
; HTTP_REFERER has to contain this substring for the session to be
; considered as valid.
session.referer_check =

; How many bytes to read from the file.
session.entropy_length = 0

; Specified here to create the session id.
session.entropy_file =

;session.entropy_length = 16

;session.entropy_file = /dev/urandom

; Set to {nocache,private,public} to determine HTTP caching aspects.
session.cache_limiter = nocache

; Document expires after n minutes.
session.cache_expire = 180

; trans sid support is disabled by default.
; Use of trans sid may risk your users security. 
; Use this option with caution.
; - User may send URL contains active session ID
;   to other person via. email/irc/etc.
; - URL that contains active session ID may be stored
;   in publically accessible computer.
; - User may access your site with the same session ID
;   always using URL stored in browser's history or bookmarks.
session.use_trans_sid = 0

url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
 [2002-08-21 07:47 UTC] hirac dot kasapoglu at turkcell dot com dot tr
I've discovered following:

I have another Tru64 system but has operating system level is 5.1A instead of 5.1. 5.1A is next version of 5.1.

I tried with same parameters on Tru64 5.1A and it works!!!

Does anybody has any opinion what about 5.1?
 [2002-08-21 09:14 UTC] hirac dot kasapoglu at turkcell dot com dot tr
You can close this case as Bogus :)
Because I tried with different Tru64 5.1 system and it worked. So problem must be local to that system.
Best regards
 [2002-08-21 09:15 UTC] kalowsky@php.net
As per request
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 15:00:01 2026 UTC