Removing PHPSESSID from URL

Removing PHPSESSID from URL

Posted by: kumaranoop83
Posted on: 2007-08-24 00:08:00

I have my site hosted on dreamhost.

Whenever i disables cookies, PHPSESSID get added up in url.
I wanna remove PHPSESSID.

I tried many thing with .htaccess and my php config file as shown below.

.htaccess file

Re: Removing PHPSESSID from URL

Posted by: misterhaan
Posted on: 2007-08-24 07:36:00

first of all, if you get rid of PHPSESSID and have cookies off, sessions won't work for you.

generally the .htaccess way of setting php values doesn't work at dreamhost because php runs as cgi and not an apache module. the ini_set commands should work though -- do you call them before session_start?

track7 - my dream-hosted site

Re: Removing PHPSESSID from URL

Posted by: kumaranoop83
Posted on: 2007-08-26 23:51:00

I was calling ini_set at the top of code then i am calling session_start like this
________________________
@ini_set("session.use_cookies", "1");
@ini_set("session.use_trans_sid", "false");

@session_cache_limiter('none');
@ini_set('session.save_handler', 'files');
@session_start();

_____________
Anoop kumar
NxtCty

Re: Removing PHPSESSID from URL

Posted by: kumaranoop83
Posted on: 2007-09-04 01:02:00

I got the solution for this problem.
I just have upgraded the PHP version from 4 to 5.2.3
By default in PHP 5.x.x
session.use_cookies = 1
session.use_trans_sid = false

So problem is solved now, But not for PHP 4 at dreamhost.
I hope anyone will provide its solution too.

_____________
Anoop kumar
NxtCty

Tags: htaccess fileconfigsiddreamhostphp filesfile phpphp filedisablesthanks in advance