Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 10th, 2006, 03:49 AM
Registered User
 
Join Date: Jan 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Anupam Chatterjee
Default Session information in URL

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

 
Old January 10th, 2006, 07:04 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
 
Old January 10th, 2006, 09:16 AM
Registered User
 
Join Date: Jan 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Anupam Chatterjee
Default

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??





Similar Threads
Thread Thread Starter Forum Replies Last Post
Extra Information in displayed URL wlangel ASP.NET 2.0 Basics 0 March 6th, 2007 10:34 AM
how to record session information Mystic C# 0 July 8th, 2006 08:03 AM
Can you save a url in a session or cookie rinventive Beginning PHP 1 June 22nd, 2006 01:03 AM
ASP.NET loses / drops Session State information Quickdraw General .NET 0 February 8th, 2005 03:09 PM
ASP.NET loses / drops Session State information Quickdraw VS.NET 2002/2003 1 February 8th, 2005 03:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.