Jump to content

Session Handling Problem in PHP 5.1.5


hammadtariq

Recommended Posts

Is there any problem in session handling functions of php 5.1.5?

Suppose I store member id in session["id"] on login and recall this variable again and again where I need to show options or membername who is logged in.

This was working exactly fine in all earlier versions on my machine, running IIS, windows xp, and php 5.1.4, it was working perfectly.

Now what is happening on my server, where I set

AddHandler application/x-httpd-php5 .php

in my .htaccess because some classes in my code need php 5.
Following is happening.

$id=$_SESSION["id"]; //outputs $id=1 which is correct
$id=$_GET["somepassedvariable"]; //outputs $id=765 which is also correct

now if i again check $_SESSION["id"] this will be changed to 765 means:


$id=$_SESSION["id"]; //outputs $id=765

which is wrong as nonewhere in the code session variable is changed!

Did any one know this? Is it a bug? I am tracking this thing down from yesterday, it has taken all my night and now I finally believe that its some bug in php 5.1.5!

What you people say?
Link to comment
https://forums.phpfreaks.com/topic/33203-session-handling-problem-in-php-515/
Share on other sites

Do you get 500 error still if you use this instead:
[tt]php_value register_globals "on"[/tt]

If you do which version of Apache do you have installed? Also is PHP configured as an Apache module? As [tt]php_flag[/tt] or [tt]php_value[/tt] only works if PHP is an Apache module. It wont workif PHP is configured as GCI.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.