You cannot do it inside the script as the trans-sid stuff happens before
your script is executed.  The setting is changed, so ini_set() is doing
its job, it's just that it sets it too late.

In your .htacess file, just do it per-location:

<Location foo.php>
php_value session.use_trans_sid 0
</Location>

-Rasmus

On Tue, 13 Aug 2002, Sean Brown wrote:

> After reading other posts, I have found that there are two ways to disable
> use_trans_sid at runtime.  I do NOT have the ability to change the php.ini
> file, so I am stuck with handling this at runtime.
>
> 1.  in code:
> ini_set("session.use_trans_sid","0");
>
> 2.  in an .htaccess file:
> <IfModule mod_php4.c>
>     php_value session.use_trans_sid 0
> </IfModule>
>
> I have found that using the htaccess method work very well, however it
> affects an entire directory.  If I want to only disable use_trans_sid on
> certain pages, I need to use the code method.  However, I have yet to be
> able to get it to work.  Here's a sample of the code I'm using:
>
> <?php
> $something = ini_set("session.use_trans_sid","0");
>
> include...
> ?>
>
> and so on.  That code snippet is the first thing in my file, before any
> other HTML or PHP code, yet I still get PHPSESSIONID in my URLs when cookies
> are turn off.  Any ideas?
>
> php4.2.1
> apache1.3.22
> linux
>
> Thanks,
>
> Sean
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to