Subject: Session information in URL
Posted By: Anupam Chatterjee Post Date: 1/10/2006 2:49:38 AM
My website automatically adds session information to the URL of each link. Please review http://www.homeadvertisingnetwork.com

I have tried to sort out the problem by including the lines to the top of each page:-
ini_set("session.use_only_cookies", "1");
ini_set("session.cookie_domain", ".domain.top_domain");

This still does not prevent the session info to appear onto the home page. Once a link is clicked or page refreshed, the problem is sorted out.

Please help

Reply By: Mantis Reply Date: 1/10/2006 6:04:05 AM
if there is nothing in the coding that write the PHP session ID in the URL then it has to be something on the server configuration..

you can do an easy test:
page1.php
<?php
session_start();
$_SESSION['TEST1']=1;
?>
<html><head></head><body><a href="page2.php">TEST</a></body>
page2.php:
<?php
session_start();
echo $_SESSION['TEST1'];
?>

if the session id show up in the url its defo a server configuration issue.
Reply By: Anupam Chatterjee Reply Date: 1/10/2006 8:16:24 AM
I have isolated the following line within php.ini to be causing the problem.

session.use_only_cookies =0

But, I don't have access to the php.ini and need to resolve the issue through either .htaccess file or through coding. But, so far nothing seems to be working. Any suggestions anybody??


Go to topic 38487

Return to index page 399
Return to index page 398
Return to index page 397
Return to index page 396
Return to index page 395
Return to index page 394
Return to index page 393
Return to index page 392
Return to index page 391
Return to index page 390