Use only cookies for sessions (not working)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
czamora
Forum Newbie
Posts: 8
Joined: Thu Feb 26, 2004 9:30 am

Use only cookies for sessions (not working)

Post by czamora »

Hi,
I want to configure my scripts to use only cookies for sessions (so that session ids don't get embedded into urls). In theory you can set the session.use_only_cookies to '1' for this purpose.
I've tried that in the .htaccess file adding the following line:

php_value session.use_only_cookies 1

And I have also tried inside my php script with:

ini_set('session.use_only_cookies', '1');

as the first line (well before session_start(); )

In both cases I still get the session id embedded into the links of the first page displayed on the generated page (?PHPSESSID=c82fdc...).

Why is this so? Shouldn't it work like that? Am I missing something here?

Thanks a lot for any help.


__________________
Post Reply