php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25761 session not woking in 4.3.1 and working in 4.2.2
Submitted: 2003-10-06 11:32 UTC Modified: 2003-10-06 18:03 UTC
From: joao dot rei at iestradas dot pt Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.1 OS:
Private report: No CVE-ID: None
 [2003-10-06 11:32 UTC] joao dot rei at iestradas dot pt
Description:
------------
I have an aplication in PHP Version 4.2.2 working and stop working in PHP Version 4.3.1 because of session variables...

Both versions have register_globals ON

In the 4.2.2 if i do echo $var; it would be recognized as the POST on any form field registered

In the 4.3.1 i have to do echo $_REQUEST["var"]; or call the function import_request_variables; or... 

CFG of 4.3.1:

System  Linux deswww1 2.4.9-e.27smp #1 SMP Tue Aug 5 15:49:54 EDT 2003 i686  
Configure Command  './configure' '--prefix=/usr' '--with-config-file-path=/etc' '--libdir=/usr/lib' '--with-gd' '--with-openssl' '--with-mm' '--with-png' '--with-zlib' '--with-layout=GNU' '--with-gettext' '--with-apxs=/usr/sbin/apxs' '--with-oci8=/u01/appl/oracle9i' '--enable-track-vars' '--disable-debug' '--disable-cgi' '--enable-sigchild'  

session
Session Support  enabled  
Registered save handlers  files user mm  

Directive Local Value Master Value 
session.auto_start On On 
session.bug_compat_42 Off Off 
session.bug_compat_warn On On 
session.cache_expire 180 180 
session.cache_limiter nocache nocache 
session.cookie_domain no value no value 
session.cookie_lifetime 0 0 
session.cookie_path / / 
session.cookie_secure Off Off 
session.entropy_file no value no value 
session.entropy_length 0 0 
session.gc_dividend 1000 1000 
session.gc_maxlifetime 1440 1440 
session.gc_probability 1 1 
session.name PHPSESSID PHPSESSID 
session.referer_check no value no value 
session.save_handler files files 
session.save_path /tmp /tmp 
session.serialize_handler php php 
session.use_cookies On On 
session.use_only_cookies Off Off 
session.use_trans_sid On On 

CFG of 4.2.2:

System SunOS iepdes1 5.8 Generic_108528-13 sun4u sparc 
Configure Command './configure' '--with-apache=../apache_1.3.26' '--disable-debug' '--enable-pic' '--enable-shared' '--enable-inline-optimization' '--enable-sigchild' '--with-regex=system' '--with-gettext' '--with-gd=/usr/local' '--with-png-dir=/usr/local' '--with-zlib-dir=/usr/local' '--with-jpeg-dir=/usr/local' '--with-freetype-dir=/usr/local' '--with-oci8=/u01/appl/oracle8i' '--enable-debugger' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-yp' '--enable-ftp' '--enable-wddx' '--without-mysql' '--with-xml' '--enable-exif' 


session
Session Support enabled 

Directive Local Value Master Value 
session.auto_start On On 
session.cache_expire 180 180 
session.cache_limiter nocache nocache 
session.cookie_domain no value no value 
session.cookie_lifetime 0 0 
session.cookie_path / / 
session.cookie_secure Off Off 
session.entropy_file no value no value 
session.entropy_length 0 0 
session.gc_maxlifetime 1440 1440 
session.gc_probability 1 1 
session.name PHPSESSID PHPSESSID 
session.referer_check no value no value 
session.save_handler files files 
session.save_path /tmp /tmp 
session.serialize_handler php php 
session.use_cookies On On 
session.use_trans_sid 1 1 


Reproduce code:
---------------
This code is working fine in 4.2.2 and failing in 4.3.1
<? 
session_start(); 
session_register("login0"); 

echo "LOGIN=$login0<br>";
echo $_REQUEST["login0"]." REQUEST<br>";

print"<FORM action=teste.php method=post>
<INPUT type=TEXT maxLength=40 size=15 name=login0 value=10>
<INPUT style='FONT-SIZE: 8pt; FONT-FAMILY: Arial' type=submit value=Send> 
</FORM>";
?> 


Expected result:
----------------
LOGIN= 10
10 REQUEST

Actual result:
--------------
LOGIN=
10 REQUEST

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-06 18:03 UTC] sniper@php.net
In PHP 4.3.3 sessions work just fine as long as they're used correctly. Upgrade.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 20:01:28 2024 UTC