homepage Welcome to WebmasterWorld Guest from 54.226.147.84
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
htaccess - SetEnvIf/Browsermatch & php_value
Can I conditionally set php_values depending on Browser
ruserious

10+ Year Member



 
Msg#: 274 posted 6:07 pm on Jun 27, 2003 (gmt 0)

I can set an environment Variable
Browsermatch "GoogleBot" isBot

Or I can use SetEnvIf combined with Host-Ip matching to set it.

Independently I can also use php_value
php_value session.use_trans_sid 0

to turn of transitional sessions (i.e. appending session_ids to the URL if cookies are disabled).

My Question is: Can it be combined? Can I set the value for session_use_trans_sid depending on an environment variable or User_Agent_string/IP?

 

jatar_k

WebmasterWorld Administrator jatar_k us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 274 posted 10:07 pm on Jun 29, 2003 (gmt 0)

I guess it is possible with ini_set but I am not sure how well it will work. You would have to call ini_set on each page and I am not sure if it may mess with the session.

Interesting idea but I am not sure what will happen, have you tried it at all?

ruserious

10+ Year Member



 
Msg#: 274 posted 3:03 pm on Jul 2, 2003 (gmt 0)

ini_set cannot work. The session-part is initialized before the script is even being parsed.

[de.php.net...]

session.use_trans_sid "1" PHP_INI_SYSTEM¦PHP_INI_PERDIR
[...]
PHP_INI_PERDIR 2 Entry can be set in php.ini, .htaccess or httpd.conf
PHP_INI_SYSTEM 4 Entry can be set in php.ini or httpd.conf

The value for session_use_trans_sid cannot be set in a script. It has to be done in .htaccess

I have tried to use an environment-variable with php_value, but that does not work. I thought there might be a workaround with rewriting and/or <files> etc.. But I am not firm enough with apache to do it myself. But maybe it is not even possible at all...

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved