Jump to content

$_SESSION value not being set IE ONLY


BoarderLine

Recommended Posts

PHP 5.3.3

 

I am trying to redirect a user (currently logged in) to a page where they are able to edit a posted comment.

 

To keep things secure I am using a forms hidden input value to pass the {postID} to a redirect page

 

<form name="post_edit" method="post" action="post-edit-redirect.php" >	
<input type="hidden" name="local" id="local" value="<?php echo $row_rsPosts['postID']; ?>" />
<input type="image" src="../imgs/managepost.png" name="submit" />
</form>

 

On the redirect page (simplified below) I am setting the {postID} in a SESSION before redirecting to the user to the page to edit their post with the new $_SESSION val for {postID} set.

 

session_start();
$id = $_REQUEST['local'];
$_SESSION['postID']=$id;
header("Location: edit-post.php");

 

This is working fine in every browser except IE (some one please just put an end to it), where when the edit-post.php page is reached the $_SESSION['postID'] is empty.  If I regenerate the session ID from the redirect page as below IE then sets the SESSION ok.

 

session_start();
session_regenerate_id();
$id = $_REQUEST['local'];
$_SESSION['postID']=$id;
header("Location: edit-post.php");

 

However there should be no need to do this and would rather not if there is no need.

 

Any help on why IE is not setting the SESSION is appreciated, and I hope I am not covering old ground here however I am unable to find a solution anywhere. - Cheers

Link to comment
Share on other sites

Here are my settings, which seem to have worked well up till now:

 

Session Support enabled

Registered save handlers files user

Registered serializer handlers php php_binary wddx

 

Directive Local Value Master Value

session.auto_start On On

session.bug_compat_42 Off Off

session.bug_compat_warn Off Off

session.cache_expire 180 180

session.cache_limiter nocache nocache

session.cookie_domain no value no value

session.cookie_httponly Off Off

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_divisor 1000 1000

session.gc_maxlifetime 1440 1440

session.gc_probability 1 1

session.hash_bits_per_character 5 5

session.hash_function 0 0

session.name PHPSESSID PHPSESSID

session.referer_check no value no value

session.save_handler files files

session.save_path /var/lib/php/session /var/lib/php/session

session.serialize_handler php php

session.use_cookies On On

session.use_only_cookies On On

session.use_trans_sid 0 0

 

Link to comment
Share on other sites

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.