Jump to content

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.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.